Add BIH metadata to output model#14
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support in celerpy’s Pydantic output schema for newly emitted ORANGE BIH (Bounding Interval Hierarchy) metadata.
Changes:
- Introduced a new
BihMetadataoutput model to represent BIH characteristics. - Extended
OrangeParamsOutputto include a newbih_metadatafield.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| class BihMetadata(_Model): | ||
| """Bounding Interval Hierarchy characteristics.""" | ||
|
|
||
| num_finite_bboxes: list[NonNegativeInt] | ||
| num_infinite_bboxes: list[NonNegativeInt] | ||
| depth: list[NonNegativeInt] |
There was a problem hiding this comment.
New BihMetadata and the new OrangeParamsOutput.bih_metadata field aren’t covered by the existing model-parsing tests. Please add a unit test that validates JSON parsing for BihMetadata (and ideally OrangeParamsOutput including the bih_metadata key) to prevent schema regressions.
| _label: Literal["orange"] | ||
| scalars: OrangeScalars | ||
| sizes: OrangeSizes | ||
| bih_metadata: BihMetadata |
There was a problem hiding this comment.
OrangeParamsOutput docstring says it contains only “sizes and scalars”, but this PR adds bih_metadata. Update the docstring to reflect the additional output content so it stays accurate for API consumers.
No description provided.