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

Tutorials aren't tested in CI #389

Open
stephankramer opened this issue Jan 21, 2025 · 1 comment
Open

Tutorials aren't tested in CI #389

stephankramer opened this issue Jan 21, 2025 · 1 comment

Comments

@stephankramer
Copy link
Contributor

It looks like other than the notebooks, none of the tutorials (demos) are currently tested and thus likely to break. Currently at least the demo_2d_tracer.py is broken (missing x, y = SpatialCoordinate(mesh) line. I know some of them are (more or less) duplicated in the examples/ but that's not a reliable way to ensure they are still runnable. As I don't wont to add significantly to the CI time - and adding if os.getenv('THETIS_REGRESSION_TEST'): logic would be confusing/ugly - maybe we can preprocess the scripts before running in CI, or reversely strip out the logic when building the documentation.

@jwallwork23
Copy link
Contributor

FYI it is possible to run notebooks in the tests - I added https://github.com/firedrakeproject/firedrake/blob/master/tests/firedrake/demos/test_notebooks_run.py to Firedrake some time ago.

In the mesh adaptation packages, @ddundo added some neat functionality for setting parameters when running as tests that avoids the THETIS_REGRESSION_TEST approach. Instead, the modifications are defined in the test_demos.py script. See (for example), https://github.com/mesh-adaptation/animate/blob/main/test/test_demos.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants