Skip to content
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

DOCS: Skip execution of some examples #220

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

SMoraisAnsys
Copy link
Collaborator

This PR reworks the way the doc was previously created by adding a few steps.

The main change is that we are manually using jupytext to create the notebooks while we were delegating that previously.
While see could seem like a trivial change, it provides us the opportunity to then extend the metadata associated to the notebook while previously it was executed on the fly without us being able to add metadata.

Now, after the creation of the notebook, we disable some examples execution by adding this to the notebook’s JSON metadata:

"nbsphinx": {
  "execute": "never"
},

Note: Now that we have something working, it might have been possible to simply add a unique event hook at readtime to add the previously mentioned metadata. However, I'm not sure to how easy this would be as we are not directly the one "playing" with the file content. I might rework that in a future PR to simplify things.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 28, 2024
Copy link
Member

@Samuelopez-ansys Samuelopez-ansys left a comment

Choose a reason for hiding this comment

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

Great!

@Samuelopez-ansys Samuelopez-ansys merged commit 19b1a35 into main Aug 28, 2024
11 checks passed
@Samuelopez-ansys Samuelopez-ansys deleted the docs/add-skip-execution-capability branch August 28, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants