-
Notifications
You must be signed in to change notification settings - Fork 206
[WIP] sphinx_gallery_expected_error code-block directive #930
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
Open
smarie
wants to merge
12
commits into
sphinx-gallery:master
Choose a base branch
from
smarie:feature/912_expected_error
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…lery into feature/912_expected_error � Conflicts: � CHANGES.rst
…d `TextBlock` classes. Blocks-level configuration is now present too.
… scrapers. Added a nicer str and repr for debugging.
@larsoner there seem to be an error on CI happening when the following line is executed : May I assume that this is probably not related to my code so far ? |
Merged
Fixed in #932, feel free to rebase or merge to fix CIs here |
…lery into feature/912_expected_error
Thanks ! let's see if it goes well now. |
5 tasks
5 tasks
github-merge-queue bot
pushed a commit
to Deltares/imod-python
that referenced
this pull request
Nov 7, 2024
Fixes #1273 # Description Add example of cleanup utilities to the user guide. I think it shows a common use-case for cleaning up data. Technically the most challenging issue was to work around the fact that sphinx_gallery doesn't have an option to select expected errors in specific code blocks. There is [this PR](sphinx-gallery/sphinx-gallery#930) to introduce this, but unfortunately for us this has not been finished yet. I resorted to trapping the error and printing it with a context manager, that seemed like the cleanest solution to me. I added this small context to the public API, so that users can also read in the online documentation what the context manager does. # Checklist - [x] Links to correct issue - [x] Update changelog, if changes affect users - [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737`` - [x] Unit tests were added - [x] **If feature added**: Added/extended example
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Will fix #912