Skip to content

Housekeeping: optional Beam, CI retry, version cleanup#91

Merged
CalNightingale merged 4 commits intomainfrom
make-beam-optional
Feb 17, 2026
Merged

Housekeeping: optional Beam, CI retry, version cleanup#91
CalNightingale merged 4 commits intomainfrom
make-beam-optional

Conversation

@CalNightingale
Copy link
Collaborator

@CalNightingale CalNightingale commented Feb 17, 2026

Summary

  • Make apache-beam optional: Move apache-beam[gcp] from core dependencies to a [beam] optional extra, reducing install footprint by 18+ transitive packages for users who don't need Beam pipelines. Add _NoOpCounter fallback in metrics.py so metric counters silently no-op when Beam is not installed.
  • CI retry for GCS rate limits: Add 429-scoped retry logic to the test workflow — retries up to 3 times with 30s backoff, but only when the failure is a GCS rate-limit error.
  • Single source of truth for version: Replace hardcoded __version__ in __init__.py with importlib.metadata.version() so only pyproject.toml needs updating on version bumps.
  • Bump version to 0.2.2
  • Update docs: README and CLAUDE.md updated to reflect Beam as optional (pip install cloud-optimized-dicom[beam])

Motivation (internal to gradient)

As we transition away from dataflow towards cloud batch, this will make our docker images lighter once we remove beam imports

Test plan

  • All 131 existing tests pass with Beam installed (pip install -e ".[dev]")
  • Verified from cloud_optimized_dicom.metrics import ... works without Beam (simulated via mocked import block)
  • Verified __version__ reads correctly from pyproject.toml via importlib.metadata
  • Pre-commit hooks (autoflake, isort, black) pass
  • CI runs full test suite on PR

🤖 Generated with Claude Code

apache-beam[gcp] pulls in 18+ transitive dependencies that are irrelevant
for users who only need to read/write cloud-optimized DICOM outside of
Beam pipelines. Move it to an optional extra so `pip install cloud-optimized-dicom`
stays lightweight, while `pip install cloud-optimized-dicom[beam]` enables
Beam metrics as before.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CalNightingale CalNightingale self-assigned this Feb 17, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CalNightingale CalNightingale force-pushed the make-beam-optional branch 2 times, most recently from 1dd70f6 to abeee62 Compare February 17, 2026 17:21
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Version is now read from pyproject.toml at runtime instead of being
duplicated as a hardcoded string in __init__.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CalNightingale CalNightingale changed the title Make apache-beam an optional dependency Housekeeping: optional Beam, CI retry, version cleanup Feb 17, 2026
@CalNightingale CalNightingale merged commit 8672aed into main Feb 17, 2026
2 checks passed
@CalNightingale CalNightingale deleted the make-beam-optional branch February 17, 2026 20:28
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.

1 participant