Skip to content

feat: make capture_ids optional with 96-well-plate auto-generation - #1

Merged
thomas-enzlein merged 8 commits into
masterfrom
feat/optional-capids-wellplate
Jun 10, 2026
Merged

thomas-enzlein merged 8 commits into
masterfrom
feat/optional-capids-wellplate

Conversation

@thomas-enzlein

Copy link
Copy Markdown
Member

Summary

Makes --cap_ids optional for both csv and xml formats. When omitted, capture IDs are auto-generated using 96-well-plate naming (A1, B1, ..., H12, A13, ...).

Changes

utils.py (new)

  • Shared generate_wellplate_ids(n) — generates well-plate-style IDs, used by both CSV and XML modules

shape2xml_v2.py

  • capture_ids parameter now defaults to None
  • When None: auto-generates well-plate IDs via generate_wellplate_ids()
  • Old local _generate_wellplate_ids removed in favor of shared utility

shape2csv_v2.py

  • Added optional capture_ids parameter (default None)
  • Segment-group comment changed from bare # to # Group: <cap_id>
  • Auto-generates well-plate IDs when capture_ids is None
  • Same treatment for addshape2csv()

main.py

  • Cap-ID-to-label mapping extracted before format dispatch, shared by CSV and XML
  • CSV branch now passes capture_ids=mapped_cap_ids
  • --cap_ids help text updated to reflect optional nature

.github/workflows/docker-build-pr.yml (new)

  • CI workflow that builds the Docker image on every PR to master
  • Build only (no push) — verifies the image compiles successfully

Testing

  • PR CI automatically builds the Docker container
  • Run locally: docker build -t shape2instrument:test . && docker run --rm shape2instrument:test --help

Closes: # (issue if applicable)

- Add utils.py with shared generate_wellplate_ids() helper
- shape2xml_v2.py: capture_ids defaults to None, auto-generates well-plate IDs
- shape2csv_v2.py: add capture_ids parameter, output '# Group: <cap_id>' instead of bare '#'
- main.py: --cap_ids optional for both csv and xml formats
- Add CI workflow: docker-build-pr.yml builds image on PR (no push)
@thomas-enzlein
thomas-enzlein force-pushed the feat/optional-capids-wellplate branch from b471584 to 4a92009 Compare June 10, 2026 10:57
@thomas-enzlein
thomas-enzlein merged commit f14dd5c into master Jun 10, 2026
1 check passed
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