Skip to content

Regenerate requirements.txt from the declared dependencies - #299

Merged
mattjala merged 1 commit into
HDFGroup:masterfrom
mattjala:deps/regen-lockfile
Sep 2, 2026
Merged

mattjala merged 1 commit into
HDFGroup:masterfrom
mattjala:deps/regen-lockfile

Conversation

@mattjala

@mattjala mattjala commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

The file did not describe h5pyd's dependencies: it omitted h5json (declared in pyproject.toml, imported at module scope by __init__.py) while pinning requests, pyproject_hooks and tomli, none of which are dependencies.

So the obvious dev flow produced a broken environment — pip install -r requirements.txt then importing h5pyd raised ModuleNotFoundError: No module named 'h5json'.

Regenerated by installing .[hdf5] into a clean venv and freezing.

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.
@mattjala
mattjala merged commit 824f498 into HDFGroup:master Sep 2, 2026
6 checks passed
@mattjala
mattjala deleted the deps/regen-lockfile branch September 2, 2026 21:15
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