Add CI: ruff, typos, build, Python 3.12+ compatibility - #46
Merged
neuromechanist merged 3 commits intoJul 6, 2026
Merged
Conversation
The staged-only pre-commit hook had left legacy modules with 2 ruff-check errors (unused scipy.linalg import, unused batch_size) and 5 unformatted files. Fix them so a repo-wide ruff gate is green.
GitHub Actions (.github/workflows/ci.yml): - lint: ruff check + ruff format --check (repo-wide) - typos: crate-ci/typos with _typos.toml (allowlists domain terms nd/numer/ thr; excludes the read-only *.f90 reference and generated data/output) - test: pytest -m 'not slow' on 3.12 (slow tests need the macOS-only Fortran binary, which can't run on the Linux runner) - build: uv build sdist+wheel, install into a clean env and import, matrix Python 3.12 + 3.13 (per requires-python >=3.12) Closes #45.
The lint job's 'uv run ruff' failed in CI ('Failed to spawn: ruff')
because ruff was never a declared dependency; a clean 'uv sync' didn't
install it (it was only on PATH locally). Pin it in the dev group + lock.
neuromechanist
deleted the
45-add-ci-ruff-typos-build-python-312+-compatibility
branch
July 6, 2026 17:39
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.
Closes #45.
Adds the first CI for the repo (none existed), covering the checks the project rules (
.rules/ci_cd.md) call for.Jobs (
.github/workflows/ci.yml)ruff check .+ruff format --check .(repo-wide).crate-ci/typoswith_typos.toml. Allowlists the AMICA/Fortran domain abbreviationsnd(data-sample count),numer(numerator),thr(threshold); excludes the read-only*.f90reference and generated data/output (pyAMICA/sample_data/,pytorch_debug_test/).pytest -m "not slow"on Python 3.12. Theslowtests invoke the macOS-only Fortran reference binary (pyAMICA/sample_data/amica15mac), which cannot execute on the Linux runner; MPS-specific tests self-skip without MPS hardware.uv buildsdist+wheel, install the wheel into a clean env, andimport pyAMICA, on Python 3.12 and 3.13 (perrequires-python >=3.12).Prerequisite fix
First commit makes the repo ruff-clean: the staged-only pre-commit hook had left legacy modules with 2
ruff checkerrors (unusedscipy.linalgimport, unusedbatch_size) and 5 unformatted files.Local validation
ruff check ./ruff format --check .: clean.typos: 0 errors with the config.uv build+ clean-envimport pyAMICA: OK.pytest -m "not slow": 37 passed, 1 xfailed (5 slow deselected).