Skip to content

Commit c76f17d

Browse files
Make morphology's brain_region/species optional
1 parent 5d84ea0 commit c76f17d

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/entitysdk/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
from entitysdk.models.morphology import ReconstructionMorphology
1111
from entitysdk.models.mtype import MTypeClass
1212
from entitysdk.models.taxonomy import Species, Strain, Taxonomy
13+
from entitysdk.models.emodel import EModel
1314

1415
__all__ = [
1516
"Asset",
1617
"BrainLocation",
1718
"BrainRegion",
1819
"Contribution",
20+
"EModel",
1921
"IonChannelModel",
2022
"License",
2123
"MTypeClass",

src/entitysdk/models/morphology.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class ReconstructionMorphology(HasAssets, Entity):
3131
),
3232
] = None
3333
brain_region: Annotated[
34-
BrainRegion,
34+
BrainRegion | None,
3535
Field(
3636
description="The region of the brain where the morphology is located.",
3737
),
38-
]
38+
] = None
3939
description: Annotated[
4040
str,
4141
Field(
@@ -44,11 +44,11 @@ class ReconstructionMorphology(HasAssets, Entity):
4444
),
4545
]
4646
species: Annotated[
47-
Species,
47+
Species | None,
4848
Field(
4949
description="The species of the morphology.",
5050
),
51-
]
51+
] = None
5252
strain: Annotated[
5353
Strain | None,
5454
Field(

tests/integration/test_searching.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
Role,
1212
Species,
1313
Strain,
14+
Role,
15+
Organization,
16+
Person,
17+
EModel,
1418
)
1519

1620

@@ -27,6 +31,7 @@
2731
Species,
2832
Strain,
2933
Organization,
34+
EModel,
3035
],
3136
)
3237
def test_is_searchable(entity_type, client):

0 commit comments

Comments
 (0)