Skip to content

Modularize biahub#202

Open
mattersoflight wants to merge 7 commits intomainfrom
biahub-uv
Open

Modularize biahub#202
mattersoflight wants to merge 7 commits intomainfrom
biahub-uv

Conversation

@mattersoflight
Copy link
Collaborator

@mattersoflight mattersoflight commented Feb 23, 2026

This refactor should be tightly focused on:

  • no change in the data layout (0-raw, 1- reconstruct, ...)
  • move from parameters in bash scripts to pythonic CLI with YAML configs that are organized in a clean heirarcy.
  • Tested with two FOVs from hummingbird and two FOVs from Mantis acquisition.

See plans/biahub-uv.md for details and provide edits to improve the plan.

This PR:

  • Switch to uv

mattersoflight and others added 2 commits February 22, 2026 21:53
Add project instructions for Claude Code and a detailed plan for
converting biahub to a uv workspace monorepo with analysis-templates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mattersoflight mattersoflight marked this pull request as draft February 23, 2026 16:36
@mattersoflight
Copy link
Collaborator Author

@tayllatheodoro can you please point me to zarr v2 dataset along with bash scripts you used to process them that I can use to prototype/test refactor. A recent dataset that you have familiarity with is ideal.

@tayllatheodoro
Copy link
Collaborator

Hi @mattersoflight, for the bash files, you can use https://github.com/czbiohub-sf/mantis-analysis-template. For a dataset test, /hpc/projects/intracellular_dashboard/organelle_dynamics/2024_11_07_A549_SEC61_DENV is a good one. Also, each CLI contains their required inputs, which can be used for prompting the hydra config structure.

mattersoflight and others added 5 commits February 27, 2026 16:25
- Slim down CLAUDE.md to essentials
- Split biahub-uv.md into packaging-only (biahub-uv.md) and
  Hydra CLI plan (biahub-cli-refactor.md)
- Drop workspace/subpackage approach in favor of single package
- Use microscope_objective_NA naming for config templates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace setuptools build system with hatchling
- Move git deps (stitch, waveorder) to [tool.uv.sources]
- Use napari[all] instead of napari + PyQt6 for platform-compatible Qt backend
- Add uv.lock for reproducible installs
- All 24 CLI subcommands verified working

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mattersoflight mattersoflight marked this pull request as ready for review February 28, 2026 03:01
@mattersoflight
Copy link
Collaborator Author

@tayllatheodoro @srivarra can you review on Monday? I ran tests and checked that all CLI run without error (biahub subcommand --help).

Sri, can you also check if this will play well with biautils shared env?

Copy link
Collaborator

@srivarra srivarra left a comment

Choose a reason for hiding this comment

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

Just some minor requests and questions.


## Goal

Add a Hydra-based pipeline CLI (`biahub-pipeline`) that orchestrates multi-step processing workflows. Config templates define microscope-specific parameters and step sequences. Everything lives inside the existing `biahub` package.
Copy link
Collaborator

Choose a reason for hiding this comment

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

thought(non-blocking)
Managed to find this article here about having both Pydantic and Hydra work together for config management. Whether or not it's a good idea... that I don't know.

There's also hydra-zen which automatically and dynamically generates structured configs. There are some options in this area, and it might be a good food for thought.

description = "Bioimage analysis hub."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11, <4.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

todo(blocking)
You may want to pin the upper bound to 3.14 (exclusive) as triangle doesn't support python 3.14.


# list package dependencies here
dependencies = [
"iohub[tensorstore]>=0.3.0a5,<0.4",
Copy link
Collaborator

Choose a reason for hiding this comment

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

todo(blocking)
Let's bump this up to 0.3.0a6 as that version fixes a data loss issue with awkward Dask chunk sizes.

version = { attr = "biahub.__version__" }
[tool.uv.sources]
stitch = { git = "https://github.com/ahillsley/stitching", branch = "jen" }
waveorder = { git = "https://github.com/mehta-lab/waveorder.git" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

question(blocking)
should we pin WaveOrder to a commit or tag? We could also just use the version from PyPI.

"matplotlib",
"napari",
"PyQt6",
"napari[all]",
Copy link
Collaborator

Choose a reason for hiding this comment

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

question(if-minor)
Wondering about this vs having PyQt6.

napari[all] is currently on PyQt5. biautils and ndutils currently do use PyQt5, but WaveOrder's visual optional dependency (which we are not using) is set to "PyQt6>=6.5,<6.8".

The latest release of PyQt5 was over a year and a half ago. PyQt6 is currently actively maintained though, and napari does explicitly support it.

Comment on lines +37 to 41
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- uses: actions/setup-python@v5
with:
python-version: "3.11"
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggestion(if-minor)
astral-sh/setup-uv is on version 7 and we should set the option enable-cache to true. It can help with the heavier dependencies like napari and pytorch.

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.

4 participants