feat: Metadata.from_metadata - #1852
Conversation
tmchartrand
left a comment
There was a problem hiding this comment.
I'll look through in a bit more detail later, but one high-level thought:
I think we should clarify that we still want to inherit subject metadata if there are additional input assets without subject metadata (ie aggregated reference data, templates or the like) in addition to the single-subject assets (and same for sessions).
For example, if someone uses the CCF to do registration that doesn't mean their derived asset is "multi-subject"? I agree we can add that clarification. |
|
Cool I'm pretty sure the code handles this correctly as-is, but we should update docstrings and docs pages and maybe have explicit tests. |
tmchartrand
left a comment
There was a problem hiding this comment.
Looks mostly good but I think we at least need to resolve some open questions about the inheritance of names and other fields of data_description.
saskiad
left a comment
There was a problem hiding this comment.
I'm confused on the process_name when there is no processing.
|
Note to self: we need to handle multi-subject/session asset naming in this PR (might require a change to aind-data-schema-models for the name regex |
|
Also another note from Josh: we need to clarify that you call |
This PR adds a new function
Metadata.from_metadatathat simplifies the process of generating derived asset metadata. It implements four rules (see the docs page) that control how metadata is inherited.Added some new functionality: