Skip to content

build: configure nbdime and gitattributes#9

Merged
JacksonFergusonDev merged 1 commit into
mainfrom
nbdime
Jan 31, 2026
Merged

build: configure nbdime and gitattributes#9
JacksonFergusonDev merged 1 commit into
mainfrom
nbdime

Conversation

@JacksonFergusonDev

Copy link
Copy Markdown
Owner

Summary

Integrates nbdime into the development environment to improve diffing for Jupyter notebooks and establishes a .gitattributes file to handle binary artifacts and generated files properly.

Changes

  • Dependencies: Added nbdime to the dev dependency group in pyproject.toml via uv.
  • Git Configuration: Created .gitattributes to:
    • Register nbdime as the diff driver for *.ipynb files.
    • Mark data archives (.npz, .npy) and vector graphics (.svg, .pdf) as binary to suppress noisy text diffs.
    • Mark uv.lock as linguist-generated.
    • Set default text handling with * text=auto.

Rationale

As a solo repository containing analysis pipelines with heavy visual outputs (harmonic landscapes, joyplots), preserving notebook outputs is intentional. nbdime allows for readable diffs locally without forcing a strip-out policy on the remote. Explicit binary handling prevents git from attempting to diff large NumPy archives or XML-based SVG figures.

- Add `nbdime` to dev dependencies in pyproject.toml
- Create .gitattributes to configure repository file handling:
    - Set default text behavior (* text=auto)
    - Configure *.ipynb to use nbdime driver
    - Mark data artifacts (*.npz, *.npy, *.bin) as binary
    - Mark generated figures (*.svg, *.pdf) as binary
    - Mark uv.lock as linguist-generated
@JacksonFergusonDev JacksonFergusonDev merged commit ff3a146 into main Jan 31, 2026
2 checks passed
@JacksonFergusonDev JacksonFergusonDev deleted the nbdime branch January 31, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant