Skip to content

Extend pydantic models for CV8000 acquisitions - #14

Open
danihae wants to merge 3 commits into
fmi-faim:mainfrom
danihae:main
Open

Extend pydantic models for CV8000 acquisitions#14
danihae wants to merge 3 commits into
fmi-faim:mainfrom
danihae:main

Conversation

@danihae

@danihae danihae commented Jun 25, 2025

Copy link
Copy Markdown

I have extended the models to accomodate tiled and time-lapse recordings.

…and acquisitions-related classes.

- Enhance validation for nested fields and optional types.

@imagejan imagejan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot, @danihae, for submitting this pull request.

I added a few initial comments, and am trying to get the tests passing.

Comment thread src/cellvoyager_types/_metadata.py Outdated
Comment thread src/cellvoyager_types/_metadata.py Outdated

class ErrorMeasurementRecord(MeasurementRecordBase):
type: Literal["ERR"]
type: Literal["IMG","ERR"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have ImageMeasurementRecord for IMG, and ErrorMeasurementRecord for ERR, so this shouldn't be necessary.

Suggested change
type: Literal["IMG","ERR"]
type: Literal["ERR"]

class WellSequence(Base):
is_selected: bool
target_well: list[TargetWell]
is_selected: bool = Field(alias='IsSelected')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't need to define aliases everywhere, thanks to:

alias_generator=to_pascal,

@codecov-commenter

codecov-commenter commented Jun 25, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.73%. Comparing base (50efe7b) to head (d207841).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
src/cellvoyager_types/_metadata.py 92.85% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   95.43%   94.73%   -0.71%     
==========================================
  Files           3        3              
  Lines         307      361      +54     
==========================================
+ Hits          293      342      +49     
- Misses         14       19       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants