Skip to content

🔧 Don't track generated tutorial_needs.json in git - #1755

Merged
chrisjsewell merged 1 commit into
masterfrom
chore/untrack-tutorial-needs-json
Aug 11, 2026
Merged

chrisjsewell merged 1 commit into
masterfrom
chore/untrack-tutorial-needs-json

Conversation

@ubmarco

@ubmarco ubmarco commented Aug 9, 2026

Copy link
Copy Markdown
Member

Stop the tutorial JSON from churning in every release

docs/_static/tutorial_needs.json is a generated artifact: docs/conf.py::create_tutorial_needs writes it on every docs build (hooked at env-before-read-docs, priority 600 — always before .. needimport:: in tutorial.rst parses).

Because it embeds the live package version (current_version, the versions key, and creator.version all come from __version__), every release regenerates it with new bytes → it shows up in every release PR's diff (e.g. #1753), purely as noise.

Changes

  • .gitignore: add docs/_static/tutorial_needs.json
  • Remove the file from git (it is regenerated on every docs build, including CI/RTD — verified no tests or workflows reference the committed file)
  • docs/conf.py: extend the existing docstring to note the file is untracked

Why this is safe

  • The generation hook is unchanged and runs before the tutorial is parsed, so the file always exists when needimport reads it — fresh clones, RTD, linkcheck builds all work.
  • Already deterministic apart from the version (needs_reproducible_json defaults to True), so no timestamps either.
  • Matches the existing pattern: uv.lock is likewise a gitignored, locally-generated artifact.

Impact

No future release PR will need to touch the tutorial JSON anymore. After this merges, rebasing #1753 drops the file from its diff automatically.

@codecov

codecov Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.42%. Comparing base (4e10030) to head (cd6e2be).
⚠️ Report is 310 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1755      +/-   ##
==========================================
+ Coverage   86.87%   89.42%   +2.54%     
==========================================
  Files          56       73      +17     
  Lines        6532    10614    +4082     
==========================================
+ Hits         5675     9492    +3817     
- Misses        857     1122     +265     
Flag Coverage Δ
pytests 89.42% <ø> (+2.54%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ubmarco
ubmarco marked this pull request as ready for review August 9, 2026 19:55
@ubmarco
ubmarco force-pushed the chore/untrack-tutorial-needs-json branch from ffc370d to cd6e2be Compare August 9, 2026 19:56
@ubmarco
ubmarco requested a review from chrisjsewell August 9, 2026 19:56
@chrisjsewell
chrisjsewell merged commit 89f152d into master Aug 11, 2026
25 checks passed
@chrisjsewell
chrisjsewell deleted the chore/untrack-tutorial-needs-json branch August 11, 2026 12:34
@ubmarco ubmarco mentioned this pull request Aug 11, 2026
ubmarco added a commit that referenced this pull request Aug 11, 2026
## Release v8.3.1

Patch release — no new features.

### Changes
- Bump version to `8.3.1` in `sphinx_needs/__init__.py`
- Move changelog entries from "Unreleased" into the `8.3.1` section
- 🐛 PlantUML: derive working directory from physical source path (#1750)
  - 📚 Docs: shared `syntax-example` directive (#1746)
- Bump `NEEDS_VERSION` to `8.3.1` in the Docker workflow
- Rebased onto current `master`, which includes:
  - 🧪 Fix needuml snapshot for minijinja 2.22 `None` rendering (#1754)
- 🔧 Stop tracking the generated `docs/_static/tutorial_needs.json`
(#1755)

### Release steps after merge
1. Merge this PR
2. Create and push tag `8.3.1` — the [release
pipeline](.github/workflows/release.yaml) publishes to PyPI on tag push
chrisjsewell added a commit that referenced this pull request Aug 27, 2026
## Release v8.4.0

Minor release. Headline changes: the `needflow` portable vocabulary
(`:direction:`, named legends, `:show_link_names:` values), the new
`needs_card_layouts` configuration, `list2need` rebuilt to create its
needs directly, and `max_items` on every view.

### Changes

- Bump version to `8.4.0` in `sphinx_needs/__init__.py`
- Bump `NEEDS_VERSION` to `8.4.0` in the Docker workflow
- Stamp the changelog's "Unreleased" section as `8.4.0` — release date
`27.08.2026`, the `v8.3.1...v8.4.0` compare link, and a release summary
- Move the `needtable :style_col:` deprecation out of "Improvements"
into a "Deprecations" heading, matching 8.2.0
- Add the one missing entry: 📚 `list2need` documentation corrections
(#1788)

`docs/_static/tutorial_needs.json` is **not** regenerated this time —
#1755 stopped tracking it, so unlike 8.2.0 and 8.3.0 there is nothing to
commit for it. There are no `.. versionadded:: unreleased` markers to
stamp either; every one in `docs/` was already written as `8.4.0`.

### Coverage

All 24 commits since 8.3.1 were reviewed against the changelog. 19
user-facing changes all have entries; 5 are internal or
convention-exempt (#1747, #1764 — `docs/ubproject.toml` only; #1763 —
README only; #1781 — tests only; #1769 — refactor, filed under "Internal
changes"). One gap was found and filled: #1788's `list2need`
documentation corrections.

### Release steps after merge

1. Merge this PR
2. Create and push tag `8.4.0` — the release pipeline
(`.github/workflows/release.yaml`) publishes to PyPI on tag push
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.

2 participants