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

Run nbval on documentation notebooks to check documentation is up to date #132

Closed
fangohr opened this issue Mar 9, 2019 · 6 comments
Closed

Comments

@fangohr
Copy link
Member

fangohr commented Mar 9, 2019

Might be as simple as making sure the target test-ipynb https://github.com/computationalmodelling/fidimag/blob/master/Makefile#L91 is run as part of the continuous integration on travis.

[This should always have happened.]

A bug was reported that could have been avoided given the feedback from nbval (#131)

@rpep
Copy link
Member

rpep commented Mar 18, 2019

I turned this on, but because the notebooks take a lot of time to run, Travis times out. Do you know how to stop this?

@fangohr
Copy link
Member Author

fangohr commented Mar 20, 2019

Thanks!

You can run the nbval tests on your own machine and get py.test to display the n longest running jobs (in reverse execution time order). Typically there are only a few notebooks or even cells that take a long time. We can exclude cells from execution using the nbvalskip tag.

That may be a simple solution - not perfect but might be easy to achieve and keep most of the benefit.

@rpep
Copy link
Member

rpep commented Mar 25, 2019

Working through these now:

  • 1d_domain_wall.ipynb
  • FMR-stdprob.ipynb
  • grain-structure.ipynb
  • current-driven-domain-wall.ipynb
  • isolated_skyrmion.ipynb
  • skyrmions-applied-field-gradient.ipynb
  • spin-polarised-current-driven-skyrmion.ipynb
  • spin-waves-in-periodic-system.ipynb
  • standard_problem_4.ipynb
  • steepest-descent-atomistic.ipynb
  • tutorial-basics.ipynb
  • tutorial-docker-container

@rpep rpep closed this as completed Mar 25, 2019
@rpep rpep reopened this Mar 25, 2019
@rpep
Copy link
Member

rpep commented Mar 28, 2019

This is now running all of the notebooks using a shell script workaround that prints an output every 9 minutes to keep happy. There are various issues with the notebooks themselves. I've fixed a couple but not everywhere, because some notebooks take a long time to run so I've been doing this in the background while working on other things.

It seems that the Matplotlib checking in Nbval must have changed form, because all of the
cells with matplotlib figures fail, despite the text appearing to have been sanitised.

@fangohr
Copy link
Member Author

fangohr commented Apr 1, 2019

Thanks, Ryan.

With Matplotlib many such tests haven broken with the change from version 2 to 3. If that is the reason, we should rund and save the reference notebook with version 3, and that should fix it.

@rpep
Copy link
Member

rpep commented Apr 14, 2021

#153 should make unnecessary

@rpep rpep closed this as completed Apr 14, 2021
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