Skip to content

Adopt the scaffolded CI shape: pre-commit for lint, and run the 67 tests - #23

Merged
jonnyspicer merged 2 commits into
mainfrom
ci/adopt-scaffolded-workflow
Aug 12, 2026
Merged

jonnyspicer merged 2 commits into
mainfrom
ci/adopt-scaffolded-workflow

Conversation

@jonnyspicer

Copy link
Copy Markdown
Contributor

Part of 86cb43xya. Same change as the merged pilot, retina-custody#4.

The headline: this repo's tests have never run in CI

lint.yml ran ruff and the dead-code gate, with no pytest step. The suite exists and pyproject.toml declares pytest in its dev extra — the tests have simply never been executed by CI. They all pass. Across the fleet that is 344 tests in four repos that have been providing no signal at all.

What changed

Aligns with claude-shared's scaffolded ci-python.yml: uv, pre-commit as the single lint step, then pytest.

ruff and ruff-format move into pre-commit, so pre-commit run --all-files on a laptop now reproduces CI exactly, which nothing could do before.

Two deliberate deviations from the scaffold: dependencies come from -e '.[dev]' rather than requirements*.txt (the scaffold's line assumes files this repo does not have), and pre-commit stays pinned rather than using bare uvx, consistent with the pinning note this workflow already carried.

vulture==2.14 is on the install line because the dead-code hook is language: script — pre-commit builds no environment for it, so vulture must already be on PATH. The pilot found this the hard way when the gate correctly failed closed with exit 127.

The ruff comment is now true

pyproject.toml claimed "see offworldlabs/ops for the canonical copy". ops had never held a ruff config — the same false claim 86cb417ty fixed for the dead-code script.

ops now ships ruff-shared.toml and a ruff-config hook that checks this repo against it. Sharing by reference is impossible (ruff's extend takes only a local path), but pre-commit clones the hook repo locally, so the canonical file is a local path at run time.

No ruff values changed here — only the comment. The check compares semantically (sets, not text), is permissive about local additions, and ignores target-version, which legitimately tracks each package's requires-python.

Verification

  • Formatting sweep committed separately so this PR's CI change stays readable
  • All four hooks pass with nothing left to reformat
  • Test counts unchanged before and after the sweep

🤖 Generated with Claude Code

https://claude.ai/code/session_013ZcazeseXVpu8XrYA2tE1V

Mechanical, produced by ruff 0.16.2 — the version pinned in the ruff-pre-commit
hook adopted in the next commit. Separated so the CI change beside it stays
readable.
Aligns with claude-shared's ci-python.yml: uv, pre-commit as the only lint
step, and pytest — which this repo has never run in CI despite having a suite.

ruff and ruff-format move into pre-commit, so `pre-commit run --all-files`
reproduces CI exactly. The ruff-config hook makes the pyproject comment true:
the shared keys are now checked against ops, not merely claimed to live there.
@jonnyspicer
jonnyspicer merged commit 3407bcf into main Aug 12, 2026
2 checks passed
@jonnyspicer
jonnyspicer deleted the ci/adopt-scaffolded-workflow branch August 12, 2026 02:57
jehanazad pushed a commit that referenced this pull request Sep 6, 2026
main (#23) added the CI/pre-commit scaffolding and, in the same pass, ran
ruff format + ruff check --fix over every source and test file. That touched
the same solver files this branch rewrites, so the two lineages conflicted
almost everywhere they overlap.

The conflicts are only apparently deep. Reformatting 74faad1 with the pinned
ruff (0.16.2) reproduces main's tree byte-for-byte, so main carries no
behaviour of its own to preserve — the resolution rule is simply "branch
content, main's formatting":

- __init__.py, initial_guess_single.py, lm_solver_track.py,
  multinode_solver.py, tests/test_adsb_features.py,
  tests/test_enhanced_output.py — took the branch side, then reformatted.
- initial_guess_2d.py, lm_solver_track_2d.py — stay deleted (Stage 4
  hygiene). Dropped the two whitelist entries main added for names in
  lm_solver_track_2d.py.

Reformatting b87b470 and diffing against this tree gives no difference under
retina_geolocator/, tests/ or scripts/, which is the check that matters: the
solver the server consumes is untouched, down to the byte.

The dead-code gate then flagged C_M_S in the new constants.py. It is unused
in this repo but retina-server's test_wgs84_equivalence.py imports it to
assert the three speed-of-light constants agree, so it goes in the whitelist
as a contract rather than being deleted.

111 tests pass (main had 67; none were lost — main added no tests of its own,
and its 2D coverage was already repaired on the branch). pre-commit clean.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
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