From cecef4240ee437f9dccd21bd29604a14bf5e65cd Mon Sep 17 00:00:00 2001 From: Matthias Koenig Date: Wed, 9 Sep 2026 22:33:30 +0200 Subject: [PATCH 1/2] Make streamlit optional, update sbmlutils and libsbml Move streamlit and pandas out of the core dependencies into a new `app` extra so that CLI and Python API users get a lightweight install. Bump python-libsbml to >=5.21.1 and sbmlutils to >=0.10.2 (sbmlutils 0.10 moved its heavy dependencies to extras). Remove the unused `packaging` dependency. Document the extras in the README. Closes #7 Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Ar3vD2HU6SWKcZoavQL6pz --- README.md | 22 ++++++++++++++++++---- pyproject.toml | 12 +++++++----- requirements.txt | 5 ++--- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 43d2774..2646e28 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,20 @@ python -m pip install --upgrade pip python -m pip install -e . ``` -Python 3.11 or newer is required. For the optional FastAPI server, install -`.[api]`; for release development, install `.[test,release,api]`. +Python 3.11 or newer is required. The core package (CLI and Python API) has no +Streamlit dependency. Optional extras: + +| Extra | Installs | Needed for | +|-------|----------|------------| +| `app` | streamlit, pandas | local Streamlit web app (`streamlit run app.py`) | +| `api` | fastapi, uvicorn, python-multipart | FastAPI server | +| `test` | pytest, mypy, flake8, httpx | running tests | + +```bash +python -m pip install -e ".[app]" # web app +python -m pip install -e ".[app,api]" # web app + REST API +python -m pip install -e ".[test,release,api,app]" # release development +``` --- @@ -40,8 +52,10 @@ No installation required — open in your browser: **[Launch Web App](https://tabularqual.streamlit.app/)** -> For large networks the Streamlit cloud may hit resource limits. Run locally instead: +> For large networks the Streamlit cloud may hit resource limits. Run locally instead +> (requires the `app` extra, see [Install](#install)): > ```bash +> python -m pip install -e ".[app]" > streamlit run app.py > ``` @@ -237,7 +251,7 @@ Common ChEBI variants such as `chebi:35305` are normalized to the canonical `CHEBI:35305` form before validation. ```bash -pip install sbmlutils>=0.9.6 +pip install sbmlutils>=0.10.2 # then run without --no-validate (the default) ``` diff --git a/pyproject.toml b/pyproject.toml index 78ed5ea..ac6e8e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,14 +12,11 @@ license = "MIT" license-files = ["LICENSE"] keywords = ["SBML", "SBML-qual", "logical models", "systems biology", "spreadsheet"] dependencies = [ - "python-libsbml>=5.21.0", + "python-libsbml>=5.21.1", "openpyxl>=3.1.5", - "packaging>=24.0", "click>=8.1.8", "python-dateutil>=2.9.0", - "streamlit>=1.28.0", - "pandas>=2.0.0", - "sbmlutils>=0.9.6", + "sbmlutils>=0.10.2", ] authors = [ {name = "Luna Li", email = "lixy@uw.edu"}, @@ -33,10 +30,15 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: Bio-Informatics", ] [project.optional-dependencies] +app = [ + "streamlit>=1.28.0", + "pandas>=2.2.0", +] api = [ "fastapi>=0.115.0", "python-multipart>=0.0.20", diff --git a/requirements.txt b/requirements.txt index d857aa7..fb13b25 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,10 @@ -python-libsbml>=5.21.0 +python-libsbml>=5.21.1 openpyxl>=3.1.5 -packaging>=24.0 click>=8.1.8 python-dateutil>=2.9.0 streamlit>=1.28.0 pandas>=2.0.0 -sbmlutils>=0.9.6 +sbmlutils>=0.10.2 fastapi>=0.115.0 uvicorn>=0.34.0 python-multipart>=0.0.20 From fe3f3de223a21386cdd7010f1435597452c3c614 Mon Sep 17 00:00:00 2001 From: Matthias Koenig Date: Wed, 9 Sep 2026 22:34:02 +0200 Subject: [PATCH 2/2] Ignore uv.lock Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Ar3vD2HU6SWKcZoavQL6pz --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0608512..7a4d7c8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ notes.txt .mypy_cache/ .pytest_cache/ .coverage +uv.lock