Skip to content

DOC: switching to use the plot directive #23814

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2023
Merged

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented May 26, 2023

These examples in the docstrings seem to have the sole purpose of generating the plot, there isn't anything in them that should be tested, and the pop-up windows somewhat annoying when running the tests locally.

Therefore, after consulting with @seberg, we think it's better to switch to use the plot directive. Whether the code is executing without error or not will be checked during the sphinx-build, no need to run the doctests, too.

(This came up during #23812, but that PR will be monster big, and thus I'm chopping it up to smaller pieces. Also, there are more plots generated in the API docs, but those were not triggering pop-up windows)

Copy link
Member

@melissawm melissawm left a comment

Choose a reason for hiding this comment

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

Looks good @bsipocz - do we want to set up a tracking issue with existing occurrences or is that not necessary?

@bsipocz
Copy link
Member Author

bsipocz commented May 26, 2023

do we want to set up a tracking issue with existing occurrences or is that not necessary

none of the rest triggered pop-ups yet during testing, so it's not totally necessary. But if cleanup is preferred, maybe this could be an extra-low-hanging fruit for a sprint where participants want to practice the contributing process more than actual code development.

@seberg
Copy link
Member

seberg commented May 26, 2023

It seems like things are not going through because plt is not defined (looking and errors and blackman has no picture in the build artifact).

@bsipocz
Copy link
Member Author

bsipocz commented May 26, 2023

It seems like things are not going through because plt is not defined (looking and errors and blackman has no picture in the build artifact).

Oh, interesting. That should have triggered a build failure. (and I have only tested locally with the hanning plots, those showed up)

@bsipocz
Copy link
Member Author

bsipocz commented May 27, 2023

I don't see any more plot-generating errors, and opened #23821 to follow-up on why circleCI giving a false green status.

@seberg
Copy link
Member

seberg commented May 27, 2023

Thanks for fixing the import issue, the plots look good now. Let's put this in, hopefully it helps with pushing the larger changes!

@seberg seberg merged commit 1b15004 into numpy:main May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants