Skip to content

Add nbstripout + pre-commit hook to standardize Jupyter notebook commits #41

Description

@ty-fi

Problem
Notebook commits currently include execution outputs and transient metadata, which creates noisy diffs and frequent merge conflicts.

Proposal
Adopt nbstripout via pre-commit so .ipynb files are automatically stripped before commit.

Impact

  • Cleaner PR diffs focused on meaningful notebook source changes
  • Fewer notebook merge conflicts
  • Smaller/cleaner git history over time

Scope / tasks

  • Add/update .pre-commit-config.yaml with an nbstripout hook for *.ipynb
  • Add contributor setup docs (pre-commit install, optional pre-commit run --all-files)
  • (Optional) add CI enforcement so unstripped notebooks fail checks
  • (Optional) run a one-time normalization pass on existing notebooks

Acceptance criteria

  • Committed notebooks do not include cell outputs/transient metadata
  • Setup steps are documented and reproducible
  • (If CI added) PR checks fail when notebook outputs are present

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    written by AIThe original issue description was written by AI -- use caution!

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions