Add a test workflow, and move packaging into pyproject.toml - #35
Merged
Conversation
There was no CI running the tests. Adds one over Python 3.11, 3.12 and 3.13, driven by uv. No uv.lock is committed, so each run resolves afresh and a dependency release that breaks rfest surfaces here rather than in an install. It starts red on the five GLM tests, which fail on a single stale jax call and are fixed in a separate PR. That is the point of adding CI: it reports the state of the suite rather than a state chosen for it. Packaging moves from setup.cfg to PEP 621 metadata in pyproject.toml, and requirements.txt goes with it. setup.cfg declared no install_requires, so `pip install rfest` installed none of jax, numpy, scipy, scikit-learn or matplotlib; they are now real dependencies. cv2, which rfest.check already treats as optional, becomes the `contours` extra. The version stays single sourced from rfest/version.py. requires-python becomes >=3.11, which is where the dependencies already sit: on 3.10 the resolver lands on jax 0.6.2, three years behind what the code is written against.
huangziwei
force-pushed
the
add-test-ci
branch
from
August 18, 2026 09:43
f307826 to
68c16a1
Compare
This was referenced Aug 18, 2026
Merged
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.
The CI
There was no workflow running the tests —
python-publish.ymlonly fires on arelease.
tests.ymlruns the suite on push tomasterand on every PR, overPython 3.11, 3.12 and 3.13, driven by
uv.No
uv.lockis committed, so each run resolves dependencies afresh. That is thedeliberate choice for this repo: the reason the suite quietly rotted is that
nothing was watching upstream. A locked CI would have stayed green through
exactly the jax change that broke
test_glm.py. Easy to reverse if you wouldrather have reproducible runs — commit the lock and the workflow picks it up
with no edit.
The packaging
setup.cfgandrequirements.txtare gone, replaced by PEP 621 metadata inpyproject.toml.The substantive part is that
setup.cfgdeclared noinstall_requires, sopip install rfestfrom PyPI installed jax, numpy, scipy, scikit-learn andmatplotlib not at all.
requirements.txtwas never consulted by an install.Those are now real dependencies, and a wheel built from this branch pulls them:
cv2is the one dependency the code already treats as optional —rfest.checkcatches the
ImportErrorand warns that contour areas are unavailable — so itbecomes the
contoursextra rather than a hard requirement.requires-pythonbecomes>=3.11, from>=3.6. That is where thedependencies already are: on 3.10 the resolver lands on jax 0.6.2, and the
suite behaves differently there —
jnp.hstackstill accepted lists that farback, so the GLM tests pass on 3.10 and fail on everything newer.
Version stays single sourced from
rfest/version.pyvia[tool.setuptools.dynamic], the build backend stays setuptools, and[dependency-groups] devcarries pytest and ruff.This lands red, on purpose
The five
tests/test_glm.pytests fail, and this PR does not touch them. Allfive die on one line,
jnp.hstack([0, [...]])inGLM.compute_mle, whichcurrent jax rejects. They are fixed in the next PR, which turns CI green.
Marking them
xfailwould have made this workflow report green on its firstrun, and a CI that reports a state chosen for it is not worth having. The first
run should say what the suite actually does.
Verified
uv run --python X --group dev pytest tests/ -v, on3.11, 3.12 and 3.13:
60 passed, 5 failedon each, the 5 being the GLMtests above and nothing else.
uv buildandpython -m build— the latter being what the release workflowruns — both produce a 2.1.2 wheel with the metadata above.
import rfest, which is what the missinginstall_requiresprevented.