Conversation
| ) # note: exact field name is used by a validator | ||
| ) | ||
|
|
||
| sections: List[Union[Section, PlanarSection]] = Field( |
There was a problem hiding this comment.
can't PlanarSectioning only be a list of PlanarSections? Or is this for backwards compatibility?
There was a problem hiding this comment.
Required for backward compatibility unfortunately. If you try to pass a Section with any of the old fields set the validator raises deprecation warnings though so it's pretty obvious. Of course since these are procedures it's moot, most users won't see it. But I'll coordinate with Mekhla to update that code.
|
|
||
| class Section(DataModel): | ||
| """Description of a slice of brain tissue""" | ||
| """Description of a single section of brain tissue""" |
There was a problem hiding this comment.
Let's specify that this should not be used for slices and point to the PlanarSectioning for that.
|
|
||
| output_specimen_id: str = Field(..., title="Specimen ID") | ||
| targeted_structure: Optional[BrainStructureModel] = Field(default=None, title="Targeted structure") | ||
| includes_surrounding_tissue: Optional[bool] = Field( |
There was a problem hiding this comment.
is it possible to indicate which of these fields will become required in v3.0 (similar to how we mark the deprecated fields)? It might just help to get that information so future upgrades will be easier. (and so we remember to make them required)
saskiad
left a comment
There was a problem hiding this comment.
just some questions - still remembering how this works
This PR introduces
SectionandSectioninginto Procedures in a backward compatible way (the old Section is now PlanarSection).