Skip to content

Conversation

@GianlucaFicarelli
Copy link
Collaborator

This PR is a proposal to allow the user to init CellMorphologyProtocol directly, so that the create and retrieve code is symmetric, because in this way the same class class can be used.

Instead of

morphology_protocol = DigitalReconstructionCellMorphologyProtocol(...)
protocols = client.search_entity(entity_type=CellMorphologyProtocol).all()

now it would be possible to use CellMorphologyProtocol and specify generation_type:

morphology_protocol = CellMorphologyProtocol(
  generation_type=CellMorphologyGenerationType.digital_reconstruction, ...
)
protocols = client.search_entity(entity_type=CellMorphologyProtocol).all()

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

codecov bot commented Sep 23, 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/models/__init__.py 100.00% <100.00%> (ø)
src/entitysdk/models/cell_morphology_protocol.py 100.00% <100.00%> (ø)
src/entitysdk/route.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eleftherioszisis
Copy link
Collaborator

My only concern is if someone would want to use the CellMorphologyProtocol without automatically adapting it. Maybe this is not something desired with the protocols. LGTM otherwise

Copy link
Contributor

@mgeplf mgeplf left a comment

Choose a reason for hiding this comment

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

ok by me

@GianlucaFicarelli GianlucaFicarelli merged commit 641d738 into cell_morphology Sep 23, 2025
9 checks passed
@GianlucaFicarelli GianlucaFicarelli deleted the cell_morphology_v2 branch September 23, 2025 13:20
GianlucaFicarelli added a commit that referenced this pull request Sep 25, 2025
* Update Cell Morphology model

* Update notebooks and other fixes

* Update server schema

* Cleanup notebook output

* Update CellMorphologyProtocol docstring

* Allow to init CellMorphologyProtocol directly (#127)

* Update server schema with entitycore 2025.9.7
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.

4 participants