Skip to content

Volume-variable shape support + libvcell bump (and poetry cleanup) - #47

Merged
jcschaff merged 3 commits into
mainfrom
vol-var-shape
Jun 18, 2026
Merged

Volume-variable shape support + libvcell bump (and poetry cleanup)#47
jcschaff merged 3 commits into
mainfrom
vol-var-shape

Conversation

@jcschaff

Copy link
Copy Markdown
Member

Cherry-picked from @LDre398 (Logan Drescher), then verified, lock-fixed, and tidied.

What's in here

Volume-variable shapes (pyvcell/_internal/simdata/zarr_writer.py) — the zarr writer assumed every volume function evaluates to a (z, y, x) array named domain::function. It now handles:

  • scalar results (shape == ()) → fill a (z, y, x) array with the value;
  • already-sized results → use as-is instead of reshaping;
  • function names with 0 or 1 :: separators (domain optional) rather than exactly two — and only applies a domain mask when a domain is present (raises on > 2 parts).

libvcell — bumped to ensure the version that produces the new volume-variable shapes/types:

  • the cherry-picked uv.lock had a malformed libvcell entry (a 0.0.15.3 record pointing at a 0.0.15.2 wheel), so it wouldn't even parse — regenerated cleanly, now resolves to libvcell 0.0.15.4;
  • bumped the native extra floor to libvcell>=0.0.15.3 so the constraint matches the intent (previously only the lock was touched, so a fresh install could still get an older libvcell).

CI (setup-uv-env action) — the cherry-picked change pins the uv venv to the exact matrix Python. The matrix still listed 3.11 while requires-python = ">=3.12", so that job would now fail uv sync. Aligned the matrix to 3.12–3.14 and retargeted the Codecov upload (3.11 → 3.12).

Poetry cleanup (per request) — the project already moved to uv; removed the leftover poetry.lock and switched the poetry references in CLAUDE.md, CONTRIBUTING.md, and docs/getting-started/installation.md to uv (and documented the new pyvcell[extra] install).

Verification

  • make check green — ruff, ruff-format, mypy (310 files), deptry, uv lock --check.
  • pytest tests/_internal/simdata tests/vcml tests/sim_results → 60 passed, 5 skipped (includes the zarr_writer tests).

Note

The new scalar / already-sized / no-domain branches in zarr_writer.py aren't covered by a dedicated unit test (they depend on libvcell producing those shapes). The existing zarr_writer suite exercises the normal path; happy to add targeted fixtures for the new branches as a follow-up if wanted.

🤖 Generated with Claude Code

CodeByDrescher and others added 3 commits June 17, 2026 20:13
Fix addresses scalar, pre-sized, and domain-less volume variables
Follow-up to the cherry-picked volume-variable-shape fix and libvcell bump:

- Regenerate uv.lock (the cherry-picked lock had a malformed libvcell entry —
  a 0.0.15.3 record pointing at a 0.0.15.2 wheel); it now resolves cleanly to
  libvcell 0.0.15.4.
- Bump the `native` extra floor to libvcell>=0.0.15.3 so the constraint matches
  the "ensuring correct libvcell version" intent (was only reflected in the lock).
- The cherry-picked setup-uv-env action now pins the venv to the exact matrix
  Python; the matrix still listed 3.11 while requires-python is >=3.12, so that
  job would fail `uv sync`. Drop 3.11 from the matrix (3.12-3.14) and retarget the
  Codecov upload to 3.12.
- Remove poetry: delete poetry.lock and switch the poetry references in CLAUDE.md,
  CONTRIBUTING.md, and docs to uv (the project moved to uv).

make check green; tests pass (simdata/vcml/sim_results: 60 passed, 5 skipped).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jcschaff
jcschaff merged commit 98ed536 into main Jun 18, 2026
5 checks passed
@jcschaff
jcschaff deleted the vol-var-shape branch June 18, 2026 02:43
jcschaff added a commit that referenced this pull request Jun 18, 2026
The setup-uv-env action's python-version became required (no default) in #47,
but on-release-main.yml didn't pass it — which would break the publish/docs jobs.
Pin it to 3.12.

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.

2 participants