deps: pin dependencies and declare them in one place #59

Open
opened 2026-10-06 13:54:39 +00:00 by ffrauenberger · 0 comments
Owner

Severity: improvement (low to medium)

Where

  • requirements.txt
  • tests/requirements_test.txt
  • pyproject.toml:13-20
  • package.nix:49-56

Problem

  • numpy, pandas, graphviz and uvicorn are unpinned, and streamlit>=1.58.0 has no upper bound. The code uses non-public or fast-moving Streamlit APIs (streamlit.runtime.uploaded_file_manager.UploadedFile, from streamlit import App with uvicorn, st.context.theme, width="stretch"), so a Streamlit release can break the app without any change in this repository.
  • The same dependency list is maintained in four places (requirements.txt, tests/requirements_test.txt, pyproject.toml, package.nix) and can drift apart.
  • There is no lock file for the pip path; the Nix path is only pinned through flake.lock (nixos-unstable).

Fix

  • Make pyproject.toml the single source, with [project.optional-dependencies] test = [...]
  • Use -r / -e .[test] in the requirements files
  • Add a lock file (uv.lock / pip-tools) and an upper bound for Streamlit

from issues/TEST-004-unpinned-and-duplicated-dependencies.md (code analysis of commit 6bcc646, 2026-10-03)

**Severity:** improvement (low to medium) ## Where - `requirements.txt` - `tests/requirements_test.txt` - `pyproject.toml:13-20` - `package.nix:49-56` ## Problem - `numpy`, `pandas`, `graphviz` and `uvicorn` are unpinned, and `streamlit>=1.58.0` has no upper bound. The code uses non-public or fast-moving Streamlit APIs (`streamlit.runtime.uploaded_file_manager.UploadedFile`, `from streamlit import App` with uvicorn, `st.context.theme`, `width="stretch"`), so a Streamlit release can break the app without any change in this repository. - The same dependency list is maintained in four places (`requirements.txt`, `tests/requirements_test.txt`, `pyproject.toml`, `package.nix`) and can drift apart. - There is no lock file for the pip path; the Nix path is only pinned through `flake.lock` (nixos-unstable). ## Fix - Make `pyproject.toml` the single source, with `[project.optional-dependencies] test = [...]` - Use `-r` / `-e .[test]` in the requirements files - Add a lock file (`uv.lock` / `pip-tools`) and an upper bound for Streamlit --- from `issues/TEST-004-unpinned-and-duplicated-dependencies.md` (code analysis of commit 6bcc646, 2026-10-03)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ffrauenberger/ProcessIntel#59
No description provided.