Skip to content

Modernize pyproject metadata, lint test files in pre-commit - #26

Merged
hutchins merged 1 commit into
mainfrom
chore/pyproject-and-hooks-cleanup
May 16, 2026
Merged

Modernize pyproject metadata, lint test files in pre-commit#26
hutchins merged 1 commit into
mainfrom
chore/pyproject-and-hooks-cleanup

Conversation

@hutchins

Copy link
Copy Markdown
Owner

Summary

Three small dev-tooling fixes that were either producing noise on every install or had silently introduced format drift:

  • PEP 639 license metadata — switch license = {text = "MIT"} + License :: OSI Approved :: MIT License classifier to license = "MIT" (SPDX expression) + license-files = ["LICENSE"]. Silences the deprecation warning uv printed on every install.
  • Relax uv_build build-system requirement>=0.10.9,<0.11>=0.10.9,<0.12 so it accepts the current uv 0.11.x. Silences the second warning that printed on every install.
  • DockerfileCOPY the LICENSE file into the build stage so PEP 639 license-files resolution succeeds inside the container. Without this the Docker integration tests fail with glob 'LICENSE' did not match any files.
  • Pre-commit hook + Makefile — lint and format-check both src/ and tests/, not just src/. Test files had drifted twice recently because the hook never looked at them.

Test plan

  • uv sync — no longer prints license-classifier or uv-build version warnings
  • uv run ruff check src/ tests/ — clean
  • uv run ruff format --check src/ tests/ — clean (86 files vs. previous 44)
  • uv run ty check — clean
  • uv run pytest — 779 passed (incl. 5 Docker tests now passing with LICENSE copied in)

Three small dev-tooling fixes that were producing noise on every
install or that had silently introduced format drift:

- pyproject.toml: switch license metadata to PEP 639 form
  (`license = "MIT"` SPDX expression + `license-files = ["LICENSE"]`,
  drop the deprecated `License ::` classifier). Silences the warning
  uv printed on every install.
- pyproject.toml: relax the `uv_build` build-system requirement from
  `<0.11` to `<0.12` so it accepts the current uv 0.11.x. Silences
  the second warning that was printed on every install.
- Dockerfile: COPY the LICENSE file into the build stage so PEP 639
  `license-files` resolution succeeds inside the container.
- .githooks/pre-commit and Makefile: lint and format-check both
  `src/` and `tests/`, not just `src/`. Test files had drifted twice
  recently because the hook never looked at them.
@hutchins
hutchins merged commit 6f33d31 into main May 16, 2026
1 check passed
@hutchins
hutchins deleted the chore/pyproject-and-hooks-cleanup branch May 16, 2026 03:35
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