Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

doc: add pandas and xarray fixtures to testing API docs#28879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 2 commits intomatplotlib:mainfromstory645:doc-fixtures
Sep 26, 2024

Conversation

story645
Copy link
Member

PR summary

Motivated by#28830, figured it'd be a lot easier for contributors to use/reviewers to suggest if the pandas and xarray fixtures were exposed in the docs. I'm not fond of the subheading title but also can't think of a better one.

PR checklist

@story645story645 added topic: testing Documentation: APIfiles in lib/ and doc/api labelsSep 24, 2024
@timhoffm
Copy link
Member

Does not render for some reason.

@story645
Copy link
MemberAuthor

it's rendered here, but getting lost:
https://output.circle-artifacts.com/output/job/33765224-5d37-442d-9e80-dfb6348738b2/artifacts/0/doc/build/html/api/testing_api.html#data-container-testing-fixtures

Was wondering if I should maybe add sample usage to the docstrings

@timhoffm
Copy link
Member

That's what I meant. For some reason autofunction does not produce content here.

If nothing else helps, you could resort to a manual.. Py::function::. Not preferred to have doc content in rst away from the function, IMHO bearable in this special case.

@story645
Copy link
MemberAuthor

Weird cause it works locally:

image

@timhoffm
Copy link
Member

timhoffm commentedSep 25, 2024
edited
Loading

Theory: I suspect the reason is thatmatplotlib.testing.conftest importspytest. This fails becausepytest is not present in the doc build environment. I know that Sphinx autodoc silently ignores failed package imports and does not produce output in this case.

You may tryautodoc_mock_imports but I don't know whether that can mock decorators (if not you will still fail when the import ties to run the@pytest.fixture).

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Mock import works 👍

Was wondering if I should maybe add sample usage to the docstrings

This would be very helpful.

@timhoffm
Copy link
Member

@story645 you can add the usage examples or merge immediately - as you see fit.

@story645
Copy link
MemberAuthor

I'm locally building the usage examples, will push in a bit

@story645story645force-pushed thedoc-fixtures branch 2 times, most recently from3534879 to291541aCompareSeptember 25, 2024 21:25
@story645
Copy link
MemberAuthor

I so don't understand how it's even more broken now

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

"Example" is not a numpydoc section. It's the pluralhttps://numpydoc.readthedocs.io/en/latest/format.html#examples

Maybe this is tripping up numpydoc/autodoc?

story645 reacted with thumbs up emoji
@story645
Copy link
MemberAuthor

how would you all feel about more pre-commits:https://numpydoc.readthedocs.io/en/latest/validation.html

@QuLogic
Copy link
Member

Well, it currently outputs a 27K-line table of issues on just the files inlib/matplotlib/*.py, so I'm not sure how feasible that is right now.

story645 reacted with confused emoji

@story645
Copy link
MemberAuthor

Well, it currently outputs a 27K-line table of issues on just the files in lib/matplotlib/*.py, so I'm not sure how feasible that is right now.

I know linting fix PRs aren't folks faves, but this seems like a good low hanging fruit task for sprints

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
@timhoffmtimhoffm merged commitba05b44 intomatplotlib:mainSep 26, 2024
40 of 43 checks passed
@timhoffm
Copy link
Member

I know linting fix PRs aren't folks faves, but this seems like a good low hanging fruit task for sprints

Fine as long as the resulting PRs are trivial to review (small enough, only one kind of change at a time).

I suspect the 27k-lines of issues contain a lot of aspects that we cannot or don't want to fulfill. I think you'd have to start with achecks whitelist to work your way up and not get overwhelmed with messages. Then, when the big chunks are done, switch to the blacklist and narrow down further.

story645 reacted with thumbs up emoji

@story645story645 deleted the doc-fixtures branchSeptember 26, 2024 15:41
kyracho pushed a commit to kyracho/matplotlib that referenced this pull requestOct 10, 2024
…8879)Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Documentation: APIfiles in lib/ and doc/apiDocumentation: buildbuilding the docstopic: testing
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@story645@timhoffm@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp