chore: engineering workflow (pyproject, ruff, Sage CI smoke) — no math changes#41
Open
boyam01 wants to merge 3 commits into
Open
chore: engineering workflow (pyproject, ruff, Sage CI smoke) — no math changes#41boyam01 wants to merge 3 commits into
boyam01 wants to merge 3 commits into
Conversation
Declare the research package via setuptools, set requires-python >=3.10, and pin the pure-Python test/plot dependency closure in constraints.txt for reproducible non-Sage runs (the Sage layer stays pinned by the Docker image). Add ruff (autofix-only hygiene rule set) and pre-commit configuration. No scientific/mathematical logic, results, or functionality changed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mechanical-only changes from `ruff format` and ruff's import sorter (I001) plus one empty f-string simplification (F541). No unused-import removal (the re-export pattern in this codebase makes that unsafe), and no changes to any mathematical logic, numeric result, or public symbol. Full `pytest research` suite still passes with the same 440 tests as before. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a lint job (ruff check + ruff format --check) to enforce the new tooling, and a sage-smoke job that builds the existing reproducibility Docker image and runs the existing `verify.sh quick` tier so the SageMath layer is exercised in CI. The existing pure-Python pytest matrix job is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What this does (engineering shell only)
This PR professionalizes the engineering scaffolding around the study. No scientific/mathematical logic, numeric results, or functionality were changed, and
mainis untouched.Added
pyproject.toml— declares theresearchpackage (setuptools discovery ofresearch,research.four_distance,research.asg_bcd_formula, tests excluded), setsrequires-python = ">=3.10", records the pure-Python test/plot dependencies, and holds the ruff + pytest config.constraints.txt— an exact pin of the pure-Python dependency closure (pytest,sympy,matplotlib+ transitives) so a non-Sagepytest researchrun is reproducible. The scientific SageMath layer stays pinned by the existing Docker image (sagemath/sagemath:10.4)..pre-commit-config.yaml— ruff-check/ruff-format hooks plus basic hygiene hooks (.sagefiles excluded; they use the Sage preparser dialect).Formatting (isolated commit, mechanical only)
ruff formatand ruff's import sorter (I001) acrossresearch/+ one empty-f-string simplification (F541).F401): several modules (e.g.sage_fiber_bridge) re-export names via plain imports, so stripping them would break the surface the tests import.F401is disabled with a documented reason instead.CI
lintjob:ruff check .+ruff format --check ..sage-smokejob: builds the existing reproducibility Docker image and runs the existingverify.sh quicktier, so the SageMath exact-arithmetic layer is exercised in CI. The existing pure-Pythonpytestmatrix job is unchanged.Guarantees
chore/engineering-workflow.Local verification
pytest research: 440 passed. After all changes: 440 passed (same count).ruff check .andruff format --check .: both clean..github/workflows/tests.ymland.pre-commit-config.yaml: valid YAML; setuptools package discovery verified.