Skip to content

Conversation

@GianlucaFicarelli
Copy link
Collaborator

@GianlucaFicarelli GianlucaFicarelli commented Sep 19, 2025

Fix #121

Registration of protocols

For the registration it's possible to use any of the specific classes:

  • DigitalReconstructionCellMorphologyProtocol
  • ModifiedReconstructionCellMorphologyProtocol
  • ComputationallySynthesizedCellMorphologyProtocol
  • PlaceholderCellMorphologyProtocol

or the polymorphic class CellMorphologyProtocol, but in that case the instance should be created with CellMorphologyProtocol.model_validate() to instantiate the correct object.

EDIT: see #127 to be able to use CellMorphologyProtocol also for registration.

Retrieval of protocols

For the search and retrieval, it's possible to use the polymorphic class CellMorphologyProtocol, and the correct specific classes are automatically instantiated.

Alternatively, it would be possible to allow specifying any of the specific classes, and automatically filter the search by generation_type, but that would require some changes to the configured routes in routes.py, and it can be discussed further.

See tests and notebooks for examples.

Unrelated changes:

@GianlucaFicarelli GianlucaFicarelli self-assigned this Sep 19, 2025
@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
pytest 99.94% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/entitysdk/_server_schemas.py 100.00% <100.00%> (ø)
src/entitysdk/downloaders/cell_morphology.py 100.00% <100.00%> (ø)
src/entitysdk/downloaders/memodel.py 90.90% <100.00%> (ø)
src/entitysdk/models/__init__.py 100.00% <100.00%> (ø)
src/entitysdk/models/cell_morphology.py 100.00% <100.00%> (ø)
src/entitysdk/models/cell_morphology_protocol.py 100.00% <100.00%> (ø)
...ntitysdk/models/em_dense_reconstruction_dataset.py 100.00% <100.00%> (ø)
src/entitysdk/models/emodel.py 100.00% <100.00%> (ø)
src/entitysdk/models/memodel.py 100.00% <100.00%> (ø)
src/entitysdk/models/subject.py 100.00% <100.00%> (ø)
... and 3 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GianlucaFicarelli
Copy link
Collaborator Author

Related: #127

@GianlucaFicarelli GianlucaFicarelli merged commit c36893a into main Sep 25, 2025
12 checks passed
@GianlucaFicarelli GianlucaFicarelli deleted the cell_morphology branch September 25, 2025 12:45
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.

Make morphology inherit from ScientificArtifact

4 participants