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

Readthedocs: Don't let notebook failures pass silently #2276

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Sep 4, 2024

Adds both to docs/conf.py:

nb_execution_allow_errors = False
nb_execution_raise_on_error = True

To make sure that when one of the (tutorial) notebooks fails, the Readthedocs also fails and doesn't continue silently.

See the myst-nb docs.

Closes #2270.

@EwoutH EwoutH added docs Release notes label ci Release notes label labels Sep 4, 2024
Copy link

github-actions bot commented Sep 4, 2024

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 -1.2% [-2.7%, +0.1%] 🔵 +0.2% [+0.1%, +0.3%]
BoltzmannWealth large 🔵 -0.7% [-34.1%, +36.4%] 🔵 -2.9% [-6.5%, +0.7%]
Schelling small 🔵 -0.9% [-1.3%, -0.5%] 🔵 -1.3% [-1.5%, -1.0%]
Schelling large 🔵 -1.0% [-1.7%, -0.2%] 🔵 -3.5% [-4.8%, -2.1%]
WolfSheep small 🔵 -0.1% [-1.5%, +1.3%] 🔵 -0.7% [-1.0%, -0.4%]
WolfSheep large 🔵 -1.6% [-2.8%, -0.3%] 🔵 -4.2% [-5.9%, -2.5%]
BoidFlockers small 🔵 -0.4% [-1.0%, +0.2%] 🔵 -2.1% [-2.6%, -1.6%]
BoidFlockers large 🔵 +0.7% [+0.1%, +1.4%] 🔵 -0.9% [-1.6%, -0.2%]

@EwoutH
Copy link
Member Author

EwoutH commented Sep 4, 2024

Yeah apparently that's not a thing. Filed an upstream question:

@EwoutH EwoutH mentioned this pull request Sep 4, 2024
@EwoutH
Copy link
Member Author

EwoutH commented Sep 4, 2024

The very friendly maintainers of myst-nb pointed me to these docs, which contained the answer.

When an error is introduced, the build now fails as expected:

IMG_1407

@EwoutH EwoutH added the backport label Sep 4, 2024
@EwoutH EwoutH added this to the v3.0 milestone Sep 4, 2024
@EwoutH EwoutH marked this pull request as ready for review September 4, 2024 19:58
@EwoutH
Copy link
Member Author

EwoutH commented Sep 4, 2024

@wang-boyu @adamamer20 I high recommend enabling this also for Mesa-geo and Mesa-frames.

Adds both to conf.py:

nb_execution_allow_errors = False
nb_execution_raise_on_error = True

To make sure that when one of the (tutorial) notebooks fails, the Readthedocs also fails and doesn't continue silently.

See https://myst-nb.readthedocs.io/en/latest/computation/execute.html#error-reporting-warning-vs-failure
Copy link

github-actions bot commented Sep 4, 2024

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🟢 -25.4% [-26.2%, -24.5%] 🟢 -17.7% [-17.8%, -17.6%]
BoltzmannWealth large 🔵 -11.2% [-25.4%, +10.3%] 🟢 -12.9% [-13.9%, -11.8%]
Schelling small 🟢 -15.9% [-16.1%, -15.8%] 🟢 -21.7% [-21.9%, -21.6%]
Schelling large 🟢 -15.9% [-16.3%, -15.4%] 🟢 -18.4% [-18.8%, -18.1%]
WolfSheep small 🟢 -16.2% [-17.5%, -14.9%] 🟢 -17.4% [-17.6%, -17.1%]
WolfSheep large 🟢 -16.3% [-16.8%, -15.8%] 🟢 -16.5% [-16.9%, -16.0%]
BoidFlockers small 🟢 -18.9% [-19.4%, -18.4%] 🟢 -10.2% [-10.7%, -9.7%]
BoidFlockers large 🟢 -18.4% [-19.0%, -17.9%] 🟢 -12.2% [-12.8%, -11.7%]

@EwoutH EwoutH merged commit 725143f into projectmesa:main Sep 5, 2024
10 of 12 checks passed
@adamamer20
Copy link
Collaborator

@wang-boyu @adamamer20 I high recommend enabling this also for Mesa-geo and Mesa-frames.

that's very useful. I am using a markdown file for the tutorial currently but I need to turn it into a jupyter file. This option is supported into mkdocs-jupyter too

EwoutH added a commit that referenced this pull request Sep 5, 2024
Adds both to conf.py:

nb_execution_allow_errors = False
nb_execution_raise_on_error = True

To make sure that when one of the (tutorial) notebooks fails, the Readthedocs also fails and doesn't continue silently.

See https://myst-nb.readthedocs.io/en/latest/computation/execute.html#error-reporting-warning-vs-failure
EwoutH added a commit to EwoutH/mesa that referenced this pull request Sep 24, 2024
)

Adds both to conf.py:

nb_execution_allow_errors = False
nb_execution_raise_on_error = True

To make sure that when one of the (tutorial) notebooks fails, the Readthedocs also fails and doesn't continue silently.

See https://myst-nb.readthedocs.io/en/latest/computation/execute.html#error-reporting-warning-vs-failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci Release notes label docs Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test tutorials in CI
3 participants