Repository navigation
chore: validate SPDX headers without rewriting files - #271
Merged
Merged
Conversation
mwyau
force-pushed
the
chore/consistent-spdx-headers-20261025
branch
from
October 25, 2026 17:34
236dbae to
569f5b2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #271 +/- ##
=======================================
Coverage 78.16% 78.16%
=======================================
Files 59 59
Lines 9664 9664
Branches 1884 1884
=======================================
Hits 7554 7554
Misses 1374 1374
Partials 736 736
Flags with carried forward coverage won't be shown. Click here to find out more. |
mwyau
force-pushed
the
chore/consistent-spdx-headers-20261025
branch
from
October 25, 2026 19:02
63dbe7a to
b0e6ed3
Compare
mwyau
force-pushed
the
chore/consistent-spdx-headers-20261025
branch
2 times, most recently
from
October 25, 2026 20:47
c8f2908 to
a0b2071
Compare
mwyau
force-pushed
the
chore/consistent-spdx-headers-20261025
branch
3 times, most recently
from
October 25, 2026 21:08
8b328ec to
a3e3181
Compare
Use the shared SPDX checker as a hook locally and a GitHub Action in CI. Run remaining pre-commit checks in CI with selective hooks, retain native Ruff, lockfile and type checks, and preserve empty test markers.
mwyau
force-pushed
the
chore/consistent-spdx-headers-20261025
branch
from
October 25, 2026 21:13
a3e3181 to
b4d75a7
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues were identified, and all review assessments indicate approval readiness.
No open issues 🎉
What changed in this PR
This pull request replaces mutating SPDX annotation with read-only header validation, aligns local and CI checks, updates ty, and adds or removes SPDX headers as appropriate without changing scientific code.
Changes:
- Replaces
reuse annotatewithspdx-header-checklocally and in CI. - Adds housekeeping, lockfile, Markdown, type-checking, schema, and SPDX validation steps.
- Updates
tyto 0.0.91 and refreshesuv.lock. - Adds headers to uncovered source files while keeping empty test package initializers empty.
| File | Description |
|---|---|
uv.lock |
Updates the lock revision and pins ty 0.0.91. |
tests/unit/simple/__init__.py |
Keeps the empty package initializer empty. |
tests/unit/preprocessing/__init__.py |
Keeps the empty package initializer empty. |
tests/unit/models/__init__.py |
Keeps the empty package initializer empty. |
tests/unit/io/__init__.py |
Keeps the empty package initializer empty. |
tests/unit/hodges/__init__.py |
Keeps the empty package initializer empty. |
tests/unit/healpix/__init__.py |
Keeps the empty package initializer empty. |
tests/unit/__init__.py |
Keeps the empty package initializer empty. |
tests/parity/ncl_spherepack/__init__.py |
Keeps the empty package initializer empty. |
tests/parity/legacy/__init__.py |
Keeps the empty package initializer empty. |
tests/parity/__init__.py |
Keeps the empty package initializer empty. |
tests/integration/__init__.py |
Keeps the empty package initializer empty. |
tests/__init__.py |
Keeps the empty package initializer empty. |
scripts/generate_trackjson_schema.py |
Adds the required SPDX header. |
pyproject.toml |
Updates the development ty dependency to 0.0.91. |
docs/conf.py |
Adds the required SPDX header. |
benchmarks/run_benchmark_detailed.py |
Adds the required SPDX header. |
.pre-commit-config.yaml |
Replaces the mutating SPDX hook with the read-only checker and updates ty. |
.github/workflows/ci.yml |
Adds housekeeping, lockfile, type-checking, and SPDX validation steps. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The existing SPDX pre-commit hook runs
reuse annotate, which may rewrite files when committing. Header validation should be read-only and behave the same locally and in CI.What changed
__init__.pyfiles to zero bytes rather than leaving header-only files.uv lock --checkand update ty to 0.0.91 consistently in the pre-commit hook, project dependencies, CI command, and regenerateduv.lock.The SPDX checker validates headers without adding metadata, changing license identifiers, or updating copyright years. There are no changes to scientific code or algorithms.
Local checks