Skip to content

Maint/deprecate requirements txt#467

Merged
rugeli merged 10 commits into
mainfrom
maint/deprecate-requirements-txt
May 6, 2026
Merged

Maint/deprecate requirements txt#467
rugeli merged 10 commits into
mainfrom
maint/deprecate-requirements-txt

Conversation

@rugeli

@rugeli rugeli commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Problem

closes #459

Solution

  • removed the per-platform requirements.txt files and the workflow that generates them
  • updated Dockerfile.ecs to use uv sync against uv.lock, so dependency versions stay pinned
  • added a new [dependency-groups].server = ["aiohttp"] group to declare the web-server dependency
  • updated documentation

Type of change

  • Maintenance (non-breaking change which preserves existing functionality)

Steps to Verify:

  1. pull the branch and run uv sync --group server, it should resolve and install aiohttp along with the rest of the deps from uv.lock
  2. (optional) rundocker build -f docker/Dockerfile.ecs -t cellpack-ecs, the image should build
  3. (optional) rundocker run -p 80:80 cellpack-ecs then go to http://0.0.0.0:80/hello, should return Hello from the cellPACK server

@github-actions

Copy link
Copy Markdown
Contributor

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

Comment thread docker/Dockerfile.ecs
Comment on lines +7 to +9
RUN python -m pip install uv --root-user-action=ignore
RUN uv sync --no-default-groups --extra server --frozen
ENV PATH="/cellpack/.venv/bin:$PATH"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initially I used pip install ".[server]", but that resolves fresh from PyPI on each build which means rebuilds could pick up different versions. Switching to uv sync keeps the install pinned to uv.lock, giving us more consistent builds.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just tried running this locally and it worked perfectly!

@rugeli rugeli requested a review from Copilot April 27, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes legacy, autogenerated per-platform requirements.txt artifacts in favor of using uv.lock/uv sync for pinned dependency installation (notably for the ECS Docker image), and formalizes the web server dependency as an optional extra.

Changes:

  • Deleted per-platform requirements.txt files and removed the GitHub workflow that generated them.
  • Added a server optional dependency (aiohttp) and updated uv.lock accordingly.
  • Updated docker/Dockerfile.ecs to install dependencies via uv sync (frozen + pinned) and adjusted docs to no longer reference the removed requirements files.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
uv.lock Adds aiohttp (and transitive deps) plus server extra metadata to keep installs pinned via uv sync.
pyproject.toml Introduces [project.optional-dependencies].server and removes requirements from build source include.
docker/Dockerfile.ecs Switches ECS image dependency installation from requirements+pip to uv sync --frozen --extra server.
docs/CONTRIBUTING.md Removes the requirements install step from contributor setup instructions.
README.md Updates install steps to rely on pyproject.toml/pip install -e . rather than per-OS requirements files.
.github/workflows/make-requirements.yml Removes the workflow that exported and opened PRs for requirements files.
requirements/linux/requirements.txt Deleted (previously autogenerated export).
requirements/macos/requirements.txt Deleted (previously autogenerated export).
requirements/windows/requirements.txt Deleted (previously autogenerated export).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/CONTRIBUTING.md Outdated
Comment thread docs/CONTRIBUTING.md
cd cellpack/
pip install -r requirements/linux/requirements.txt
pip install -e .[dev]
uv sync

@rugeli rugeli Apr 27, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to address copilot's review comment(slightly out of scope): pip install -e .[dev] has been silently failing on main since the dev lives in [dependency-groups] and pip's [extra] syntax can't read. Switched the contributor setup to use uv sync instead.

@rugeli rugeli requested review from ascibisz and mogres April 27, 2026 23:38

@mogres mogres left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great -- thanks!!

@rugeli rugeli merged commit 02bbd72 into main May 6, 2026
10 checks passed
@rugeli rugeli deleted the maint/deprecate-requirements-txt branch May 6, 2026 20:14
mogres added a commit that referenced this pull request Jun 16, 2026
* user workflow improvements and config updates  (#411)

* default upload_results to false

* update config file options

* update schema docs

* propose to remove config files from the packing commands but add a section to explain how configs work

* set open_results_in_browser to false since it's dependent on upload_results

* improve loggings

* add a config file for upload results

* correct option default and log level

* update schema

* add aws db to path

* add a layer to detect non-interactive envs for db selection

* fix readme

* add cellpack website url

* remove unnecessary restriction

* update readme

* add screenshots to readme (#413)

* add screenshots to readme

* Quick fix: update bbox value in recipes (#420)

* add randomness_seed to upload and download (#416)

* update bbox value in recipes

* add config option for plot display

* replace result screenshots and update readme

* update docs/index to display images correctly

* Add description field to recipe schema and backend utilities (#430)

* add `description` and `randomness_seed` to top level recipe settings

* add description in example recipes

* add description to download and upload script

* add description field to unit tests

* pr commenting: use native github CLI (#432)

* test github cli

* remove test branch

* Minimal fix: set camera position (#431)

* set camera

* use max dimension

* add checks for pull requests (#434)

* Feature/client upload script (#417)

* add upload script

* add example data and more documentation

* point to correct collection

* return firebase IDs from upload_recipe adn upload_config

* add documentation

* add installation step

* lint fixes

* lint fix

* fix typos

* keep all upload functionality in upload.py, and rename client to studio

* remove accidential line

* update example editable fields to match updates we've done

* add output param

* lint fixes

* small wording fixes

* make config_path optional

* ci(dependabot): bump astral-sh/setup-uv from 4 to 7 (#436)

Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 7.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@v4...v7)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix Comment Update job: use gh api instead of gh pr review (#438)

* use gh api instead of gh pr review

* remove backslashes

* trigger workflow to test comment update

* use patch instead of delete

* take2-trigger workflow to test comment update

* use an actual new line to avoid \n being treated as literal chars

* Studio: add recipe and config json to outputs for downloading  (#435)

* add recipe and config to output

* refactor

* path guard

* Potential fix for code scanning alert no. 21: Uncontrolled data used in path expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* format

* fix 404 comment

* handle firebase recipe, serialize it before passing to s3

* save recipe data directly to outputs

* remove unused import

* one more unused import

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* ci(dependabot): bump actions/upload-artifact from 4 to 6 (#439)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Miscellaneous gradient updates (#428)

* Add gradient weights to Environment.py and Gradient.py

* Remove unused import

* Refactor Environment.py and utils.py

This commit refactors the `Environment.py` file by separating the loading of grid, compartment grids, and mesh store into separate loops. It also clears the triangles_tree cache and resets the grid. Additionally, the `load_object_from_pickle` function has been removed from `utils.py` as it is no longer used.

* Ignore venv folders

* Update logging level

* Update `aicsimageio` to `bioio`

- Also update the logging of recipe validation to `debug`

* Suppress logging outputs for lower level functions

* Update logs in `ImageWriter.py`

* Update path preference loading to catch empty json

* Update logging for recipe validation

* sort imports

* Update uv lock

* Allow gradient weights to be specified as a dict while combining

* Add uniform weight map option

* Fix gradient weight scaling for equal weights

* Update scaling to just divide by max value

* Add recipe to test gradients

* Rename scaling method to normalize_by_max_value and update references

* Use uniform weight if `decay_length` is 0

* Linting updates

* Update validation for decay length

* Update validation for multiple gradients

* Add zero decay gradient in test recipe

* ci(dependabot): bump aws-actions/configure-aws-credentials from 4 to 5 (#447)

* ci(dependabot): bump aws-actions/configure-aws-credentials from 4 to 5

Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 4 to 5.
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](aws-actions/configure-aws-credentials@v4...v5)

---
updated-dependencies:
- dependency-name: aws-actions/configure-aws-credentials
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* matching the regular pr format

* trigger codeQL

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ruge Li <rugeli0605@gmail.com>

* ci(dependabot): bump peter-evans/create-pull-request from 7 to 8 (#450)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v7...v8)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use native gh CLI for requirements actions (#453)

* update UV setup to version 7
* update Dependabot configuration

* remove unnecessary permissions for open-PR job in make-requirements.yml

* Make timestamp unique using the run ID

* Avoid expanding the WORKFLOW_PAT

* ci(dependabot): bump the actions group with 4 updates (#456)

Bumps the actions group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [actions/upload-artifact](https://github.com/actions/upload-artifact), [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/checkout` from 4 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v6)

Updates `actions/upload-artifact` from 6 to 7
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v6...v7)

Updates `aws-actions/configure-aws-credentials` from 5 to 6
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](aws-actions/configure-aws-credentials@v5...v6)

Updates `actions/download-artifact` from 6 to 8
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v6...v8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: aws-actions/configure-aws-credentials
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Upgrading dependencies (#457)

* Upgrading dependencies

* Update black target version

* Formatting via `uv run black cellpack`

* Updating requirements.txt after change to `uv.lock` was pushed to `main` (#458)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Server should Accept Recipe JSON  (#419)

* add upload script

* add example data and more documentation

* point to correct collection

* have server accept recipe as json object in body of request

* update documentation

* remove accidential dockerfile changes

* rename param json_recipe

* remove file that shouldn't be in this PR

* remove accidential file

* lint fixes

* refactor to try to improve clarity of json recipe vs file path

* lint fixes

* lint fix

* minimize changeset

* minimize changeset

* simplify changeset

* code cleanup

* minimize changeset

* remove trailing comma

* Feature/firebase lookup (#445)

* remove os fetch for job_id

* use dedup_hash instead of job id

* proposal: get hash from recipe loader

* renaming and add TODOs

* format

* rename param to hash

* remove unused validate param and doc strings in pack

* simplify get_ dedup_hash

* refactor job_status update

* cleanup

* fix upload_job_status to handle awshandler

* pass dedup_pash to env for fetching across files

* add tests

* format1

* format test

* Only upload simularium file once (#446)

* proposal: get hash from recipe loader

* simplify get_ dedup_hash

* only post simularium results file once for server job runs

* update code for rebase

* code cleanup

---------

Co-authored-by: Ruge Li <rugeli0605@gmail.com>

* Maint/firebase collection cleanup (#448)

* remove local metadata writes for auto-pop feature

* remove cleanup firebase workflow

* remove cleanup firebase code

* 1. make doc url a constant 2.remove unused param

* handle both recipe_path and json body requests (#449)

* change error message body

* lint fixes

* add more checks when attempting to read json body

* add upload script

* add example data and more documentation

* point to correct collection

* have server accept recipe as json object in body of request

* update documentation

* remove accidential dockerfile changes

* rename param json_recipe

* remove file that shouldn't be in this PR

* remove accidential file

* lint fixes

* refactor to try to improve clarity of json recipe vs file path

* lint fixes

* lint fix

* minimize changeset

* minimize changeset

* simplify changeset

* code cleanup

* minimize changeset

* remove trailing comma

* Feature/firebase lookup (#445)

* remove os fetch for job_id

* use dedup_hash instead of job id

* proposal: get hash from recipe loader

* renaming and add TODOs

* format

* rename param to hash

* remove unused validate param and doc strings in pack

* simplify get_ dedup_hash

* refactor job_status update

* cleanup

* fix upload_job_status to handle awshandler

* pass dedup_pash to env for fetching across files

* add tests

* format1

* format test

* Only upload simularium file once (#446)

* proposal: get hash from recipe loader

* simplify get_ dedup_hash

* only post simularium results file once for server job runs

* update code for rebase

* code cleanup

---------

Co-authored-by: Ruge Li <rugeli0605@gmail.com>

* Maint/firebase collection cleanup (#448)

* remove local metadata writes for auto-pop feature

* remove cleanup firebase workflow

* remove cleanup firebase code

* 1. make doc url a constant 2.remove unused param

* handle both recipe_path and json body requests (#449)

* change error message body

* lint fixes

* add more checks when attempting to read json body

* let recipe loader check the input and key stripping

* Update cellpack/autopack/writers/__init__.py

Co-authored-by: Saurabh Mogre <saurabh.mogre@alleninstitute.org>

* use `isinstance` for AWSHandler, and misc

* update aws tests

* initialize dedup_hash

* add in-line comment

* temp solution: use requirement.txt

---------

Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>
Co-authored-by: Ruge Li <rugeli0605@gmail.com>
Co-authored-by: Saurabh Mogre <saurabh.mogre@alleninstitute.org>

* ci(dependabot): bump the actions group across 1 directory with 4 updates (#466)

Bumps the actions group with 4 updates in the / directory: [actions/configure-pages](https://github.com/actions/configure-pages), [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact), [actions/deploy-pages](https://github.com/actions/deploy-pages) and [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `actions/configure-pages` from 5 to 6
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](actions/configure-pages@v5...v6)

Updates `actions/upload-pages-artifact` from 4 to 5
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](actions/upload-pages-artifact@v4...v5)

Updates `actions/deploy-pages` from 4 to 5
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](actions/deploy-pages@v4...v5)

Updates `codecov/codecov-action` from 5 to 6
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v5...v6)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/upload-pages-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/deploy-pages
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: codecov/codecov-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Test updates: stabler debup hash and cli integration coverage (#462)

* normalize data order before hashing and tests

* test pack cli

* refactor test file: use tmp_path instead of writing to a working dir

* cleanup

* formatting

* add recipe fixture

* Remove Support for Recipe URL Param (#464)

* we only support recipe as JSON body now, remove support for reading recipe file path from URL

* update documentation to use new communication protocol and strip out references to AWS batch

* remove unused import

* Maint/deprecate requirements txt (#467)

* remove requirements.txt related code

* update pyproject.toml

* generate new uv file

* update pip install for dockerfile

* use uv sync

* move server dep list under dependency-groups

* update docker

* fix path and use uv sync

* add pydantic to pyproject toml

* update lock file

* Feature/v2 bloodplasma (#471)

* update migration script and validation

* add v2 blood plasma recipe

* ci(dependabot): bump actions/add-to-project in the actions group (#469)

Bumps the actions group with 1 update: [actions/add-to-project](https://github.com/actions/add-to-project).


Updates `actions/add-to-project` from 1.0.2 to 2.0.0
- [Release notes](https://github.com/actions/add-to-project/releases)
- [Commits](actions/add-to-project@v1.0.2...v2.0.0)

---
updated-dependencies:
- dependency-name: actions/add-to-project
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix KeyError: 'weight_mode' when packing v2.1 recipes with under-specified gradients (#470)

* Add recipe and config to test gradient mixing in peroxisome data

* normalize grad in early process

* add tests

---------

Co-authored-by: mogres <saurabh.mogre@alleninstitute.org>

* pack: log resolved cellpack package path at DEBUG level

Adds a DEBUG-level log of which cellpack package pack.py imported
(autopack path), so it is easy to confirm whether a run used an
installed/pinned cellpack vs a checked-out branch when debugging.
Kept at DEBUG so normal packing output is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>
Co-authored-by: Alli <111383930+ascibisz@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Ruge Li <rugeli0605@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Deprecate requirements.txt files

4 participants