dandi / dandi-schema

Schemata for DANDI archive project
Apache License 2.0
5 stars 8 forks source link

Resource type #231

Closed bendichter closed 3 months ago

bendichter commented 3 months ago

https://github.com/dandi/dandi-schema/blob/e6cc5a06dd7f7e03e86316071ac9e541ff27d223/dandischema/models.py#L869-L900

Our current resource schema has no way of indicating what type of resource it is. This is currently a problem for me as I am trying to determine how many unique publications are associated with the data on DANDI. I need to infer the type based on the designated relation and the URL. It would be much easier for me if this infrormation were explicitly encoded. The Data Cite schema provides a resourceType model that covers a lot of major resource categories. I propose we add this as an optional field to the Resource model.

satra commented 3 months ago

sounds good. any interest in sending a PR to add an attribute and a set of elements (see the other type enums on how that's done)?

bendichter commented 3 months ago

It works!

image