Conversation
Contributor
|
I have pushed a few changes to this over the past week. I think it's generally good to go, but needs a few minor things:
|
drhodrid
approved these changes
Apr 17, 2024
Contributor
drhodrid
left a comment
There was a problem hiding this comment.
This looks good to me. I think the only outstanding thing is ensuring that the "questions" in our tutorials are masked somehow. Once online, I will take a careful look at what we have, and further update, but I think getting this in as a starting point is a good move.
This requires the notebooks are run using nbconvert and placed in the docs/tutorials/ directory. At the moment, it also requires a fork of mkdocs-jupyter that allows specifying the TOC depth, otherwise it's a bit too cluttered.
a876fc8 to
fd69570
Compare
5d647d1 to
3579a77
Compare
Contributor
Author
|
I think I'm going to push this as-is, but I'll need to work on the workflow for later so our webpage deployments don't take ages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!