Render and display tutorials #3
Merged
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.
This branch will render and display tutorials from the https://github.com/g-adopt/tutorials repository. For development, I've set up the
build.ymlaction to pull from the branch behind this pull request, which is where the changes to the tutorials should probably end up: g-adopt/tutorials#3.Deployment
The pull model of incorporating the tutorials definitely isn't how things should be done for the actual deployment! I think I'll set up a time-based (weekly, or similar) Action on the tutorials repository that will run the notebooks and upload the versions with populated plots/outputs as an artifact. Then the build step of the website can just grab the latest build artifact and include that, without requiring a separate build step (which takes ages when the geodynamics notebooks are included...)
Development
For local development/testing of the notebooks' functionality and formatting, there are a couple of steps.
angus-g/tutorialspython3 -m pip install -r requirements.txtdocs/tutorials/directoryTo actually render the notebooks, you can install the
nbconvertpackage, and runTo start with, I've included the first 5 tutorials (up to PDE Constrained Optimisation). To include further tutorials, you'll need to add them into
mkdocs.ymlin thenavsection (the file should be a pretty good guide for the required format).Note
As always, don't forget to clear the outputs of the notebooks before committing them to the tutorials repository!