janzika / MATH3261-5285

Fluids, Oceans and Climate course at UNSW
0 stars 2 forks source link

Strip notebook output when pushing to origin + fix text rendering in math blocks #3

Closed jbisits closed 1 month ago

jbisits commented 1 month ago

To strip notebook output the .gitattributes file has been added. After running this command

git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  

in the MATH3261-5285 repo notebook output will be stripped before publishing to the repo (I found this solution here). You can view an example of a notebook with no output in my fork. This has lead to a very large amount of code being removed the notebooks (i.e. the output cells) and reduces the file size which is a good thing. I think this should also mean that there is no notebook output in google colab versions of these notebooks (which is good for giving to students) but will have to check after this PR is merged.

A markdown rendering issue has also been fixed by replacing \mbox with \text.