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: plot-directive warning filter option#27076

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

Closed

Conversation

story645
Copy link
Member

PR summary

Ended up not needing it in#26989, but figure an option to filter a warning might be useful? This is the most basic implementation

..plot-directive:::filter-warning: Ignore

where the string input is whatever can be passed into warnings.filterwarning, Possibly needs tests.

PR checklist

@jklymak
Copy link
Member

I don't understand why this would be a good idea? If we explicitly need to catch a warning can't we do it in the plot code?

@story645
Copy link
MemberAuthor

If we explicitly need to catch a warning can't we do it in the plot code?

Yes, but that would distract from the plot code. In the original use case, the plot still works - the warnings were of the font not found/missing glyph but fallback variety.

@jklymak
Copy link
Member

I don't think we should have code that warns in the docs unless we make it clear to users. If you have the distracting filter in there, at least it's clear to potential users that the warning may be triggered.

@story645
Copy link
MemberAuthor

story645 commentedOct 13, 2023
edited
Loading

I don't think we should have code that warns in the docs

We already do, we just use simplefilters to keep it out of the doc builds. This was for the use cases where a bulk filter isn't appropriate. Though granted, I also kinda wrote those more as a debugging aide that's nice to have in the directive than necessarily something I think is broadly good practice.

@story645story645 marked this pull request as draftNovember 2, 2023 01:23
@story645
Copy link
MemberAuthor

sphinx-gallery/sphinx-gallery#930 seems like a more elegant version of this

@story645story645 deleted the plot-directive-filter branchMay 2, 2024 16:19
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Documentation: buildbuilding the docs
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@story645@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp