Skip to content

chore: engineering workflow (pyproject, ruff, Sage CI smoke) — no math changes#41

Open
boyam01 wants to merge 3 commits into
mainfrom
chore/engineering-workflow
Open

chore: engineering workflow (pyproject, ruff, Sage CI smoke) — no math changes#41
boyam01 wants to merge 3 commits into
mainfrom
chore/engineering-workflow

Conversation

@boyam01

@boyam01 boyam01 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

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 main is untouched.

Added

  • pyproject.toml — declares the research package (setuptools discovery of research, research.four_distance, research.asg_bcd_formula, tests excluded), sets requires-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-Sage pytest research run 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 (.sage files excluded; they use the Sage preparser dialect).

Formatting (isolated commit, mechanical only)

  • Ran ruff format and ruff's import sorter (I001) across research/ + one empty-f-string simplification (F541).
  • Deliberately did not remove "unused" imports (F401): several modules (e.g. sage_fiber_bridge) re-export names via plain imports, so stripping them would break the surface the tests import. F401 is disabled with a documented reason instead.

CI

  • New lint job: ruff check . + ruff format --check ..
  • New sage-smoke job: builds the existing reproducibility Docker image and runs the existing verify.sh quick tier, so the SageMath exact-arithmetic layer is exercised in CI. The existing pure-Python pytest matrix job is unchanged.

Guarantees

  • No math/logic/result changes; nothing deleted from the research code.
  • No force-push; work is confined to chore/engineering-workflow.

Local verification

  • Baseline pytest research: 440 passed. After all changes: 440 passed (same count).
  • ruff check . and ruff format --check .: both clean.
  • .github/workflows/tests.yml and .pre-commit-config.yaml: valid YAML; setuptools package discovery verified.

boyam01 and others added 3 commits July 5, 2026 07:19
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>
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