Regenerate requirements.txt from the declared dependencies - #299
Merged
Merged
Conversation
The file did not describe h5pyd's dependencies. It omitted h5json, which pyproject.toml declares and h5pyd/__init__.py imports at module scope, while pinning requests and pyproject_hooks, which are not dependencies at all, and tomli, which nothing imports. The practical effect was that the obvious developer flow produced a broken environment: $ pip install -r requirements.txt $ pip install --no-deps -e . $ python -c 'import h5pyd' ModuleNotFoundError: No module named 'h5json' Resolve it from the project instead - install .[hdf5] (h5py being what the tests import) into a clean environment and freeze - so the file is the transitive closure of what h5pyd actually declares. h5json points at master rather than the commit pip freeze resolved, matching what pyproject declares. Verified by installing the file into a clean venv and importing h5pyd.
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 file did not describe h5pyd's dependencies: it omitted
h5json(declared inpyproject.toml, imported at module scope by__init__.py) while pinningrequests,pyproject_hooksandtomli, none of which are dependencies.So the obvious dev flow produced a broken environment —
pip install -r requirements.txtthen importing h5pyd raisedModuleNotFoundError: No module named 'h5json'.Regenerated by installing
.[hdf5]into a clean venv and freezing.