Skip to content

Jupyter Notebook build is causing unwanted git changes #71

@thesteve0

Description

@thesteve0

The mkdocs plugin we are using doesn't not handle relative paths correctly for images added to Jupyter notebooks.
danielfrg/mkdocs-jupyter#234 (comment)

The current build process encodes file systems images into Jupyter notebooks. This makes it easy for the mkdocs build to pick them up and do the "right thing". Unfortunately, git rightly sees this as changes. If a user runs a build on their own machine and then does a git commit -am "" this will commit the changed notebooks which we don't want.

Right now I see two solutions

  1. Teach users to only commit and push the files they changed. While "actually" the correct response is a barrier to new contributors and will probably mean a lot of extra work for us trying to clean up PRs when they don't follow instructions.

  2. We could actually commit the notebooks with the embedded images and remove the images from the file system. This solution would make it harder for authors to edit the images after the images are encoded. It also has a bad smell but I can't quite put my finger on it.

  3. Fix the build script so that after the build is complete, jupyter notebooks are reset to their pre-build contents. Since this will be automated, this seems like the best option at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is neededquestionFurther information is requested

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions