Lock the dependency tree and raise the Python floor to 3.9 - #17
Merged
Conversation
Rigs resolved dependencies fresh on every install, so a machine could pick up an untested release of numpy or pandas between sessions. Add a lock file holding one pinned version per package across the whole tree, chosen as the newest version actually running on a verified machine. The file is cross-platform: environment markers cover the packages that differ by operating system or Python version, so there is no per-OS variant to keep in sync. Hardware and analysis packages are excluded, since every such import in EthoPy is lazy and they are installed per machine. Also cap the majors of numpy, pandas and scipy in pyproject.toml, matching the existing caps on datajoint and setuptools. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNpe4dpiSvnLeS11Gkpfw4
Explain what pyproject.toml and requirements-lock.txt each do, when to add an upper bound, and the procedure for refreshing the pins, so the lock file does not become a file nobody knows how to regenerate. Add the reproducible install path to the installation guide, and drop the reference to the obj extra, which no longer exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNpe4dpiSvnLeS11Gkpfw4
The declared floor of 3.8 was never real. numpy, pandas, scipy, h5py, scikit-learn, pynwb and datajoint all require 3.9 or newer, so the locked environment cannot be installed on 3.8 at all. Update requires-python, the classifiers and the mypy target, along with the version stated in the README and in the installation, getting started, Raspberry Pi and contributing guides, which each carried their own copy. The lock file itself needs 3.9.2, because cryptography excludes 3.9.0 and 3.9.1; note that in its header rather than in requires-python, so that installing from the package index still works on any 3.9. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNpe4dpiSvnLeS11Gkpfw4
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.
Why
Rigs resolved dependencies fresh on every install, so a machine could pick up an untested release of numpy or pandas between sessions. This adds a locked environment for those machines, documents how the two layers of dependency control relate, and corrects the declared Python range.
What changed
requirements-lock.txtholds one pinned version per package across the whole dependency tree. Versions are the newest ones actually running on a verified machine, not whatever a resolver preferred. Environment markers keep it to a single cross-platform file. Hardware and analysis packages are excluded, since every such import in EthoPy is lazy and they are installed per machine.Dependency policy is documented in the contributing guides: what
pyproject.tomland the lock file each do, when an upper bound is justified, and the refresh procedure. The installation guide gains the reproducible install path and loses the reference to theobjextra, which no longer exists.The Python floor moves from 3.8 to 3.9. The old floor was never real. numpy, pandas, scipy, h5py, scikit-learn, pynwb and datajoint all require 3.9 or newer, so the locked environment cannot install on 3.8 at all.
requires-python, the classifiers, the mypy target and the version stated in five documentation files are now consistent.The lock file needs 3.9.2 specifically, because cryptography excludes 3.9.0 and 3.9.1. That is noted in the lock header rather than in
requires-python, so installing from the package index still works on any 3.9.Verification
The lock file was compiled and checked for version drift on four targets, all resolving with no drift:
The declared dependencies also resolve cleanly at the new 3.9 floor.
Known follow-ups, not in this PR
urllib3andpilloware pinned to versions predating several fixed security advisories. Bumping them within their tested majors needs a check on a rig first.--no-deps, which silently omits any dependency added after the last refresh. Using the file as a constraints file instead would keep the pins and fail loudly on a mismatch.🤖 Generated with Claude Code
https://claude.ai/code/session_01WNpe4dpiSvnLeS11Gkpfw4