dandi / dandi-schema

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

datacite: shouldn't we use Funders not Sponsors? #168

Closed yarikoptic closed 1 year ago

yarikoptic commented 1 year ago

While digging around #166 I saw that we do "treat" Sponsor as information about funding, and actually entirely omit Funders https://github.com/dandi/dandi-schema/blob/master/dandischema/datacite.py#L113 although we have more of those

drogon:/mnt/backup/dandi/dandisets
*$> grep dcite:Funder */dandiset.yaml | nl | tail
    95  000409/dandiset.yaml:  - dcite:Funder
    96  000409/dandiset.yaml:  - dcite:Funder
    97  000409/dandiset.yaml:  - dcite:Funder
    98  000444/dandiset.yaml:  - dcite:Funder
    99  000447/dandiset.yaml:  - dcite:Funder
   100  000448/dandiset.yaml:  - dcite:Funder
   101  000454/dandiset.yaml:  - dcite:Funder
   102  000454/dandiset.yaml:  - dcite:Funder
   103  000454/dandiset.yaml:  - dcite:Funder
   104  000458/dandiset.yaml:  - dcite:Funder

*$> grep dcite:Sponsor */dandiset.yaml | nl | tail
     4  000004/dandiset.yaml:  - dcite:Sponsor
     5  000004/dandiset.yaml:  - dcite:Sponsor
     6  000004/dandiset.yaml:  - dcite:Sponsor
     7  000004/dandiset.yaml:  - dcite:Sponsor
     8  000018/dandiset.yaml:  - dcite:Sponsor
     9  000026/dandiset.yaml:  - dcite:Sponsor
    10  000029/dandiset.yaml:  - dcite:Sponsor
    11  000070/dandiset.yaml:  - dcite:Sponsor
    12  000121/dandiset.yaml:  - dcite:Sponsor
    13  000458/dandiset.yaml:  - dcite:Sponsor

and which might explain (partially) why we have not encountered #166 before.

@satra @djarecka ideas?

djarecka commented 1 year ago

I'm not completely sure right now, but I believe I was using this document (or similar) when working on it, and there is no Funder in contributorType (see p.20)

satra commented 1 year ago

i think we should use dcite:Funder/Sponsor both for it. the delineation is fuzzy in my mind, and i think it's fuzzy in people's mind too given the breakdown.

we should also check the dandi-archive web script to see what components make it to the funding section.

djarecka commented 1 year ago

ok, I can change it.

Just want to point, that datacite has also FundingReference, see p.32

satra commented 1 year ago

FundingReference is the object we are creating in the to_datacite function, no?

djarecka commented 1 year ago

yes you're right, we building this from dcite:Sponsor contributors here

djarecka commented 1 year ago

could you remind me how this list was created? Can we actually use dcite:Funder (and many others) if they are not on the official datacite list?

satra commented 1 year ago

anything that starts with dcite: exists in datacite. the remaining roles are from credit, but should be irrelevant to datacite metadata.

djarecka commented 1 year ago

but I don't see them in their document.. at least in v4.4...

satra commented 1 year ago

they deprecated contributor type funder in version 3.x because they added funding reference explicitly. i think this tells us that we should be paying closer attention to their schema.

https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf#page=40 (around here, search for deprecation)

i think it still makes sense to use our role based model for funding.

djarecka commented 1 year ago

@satra - it is actually not only about Funder, there are more items that are present in the model in the RoleType that are not in DataCite anymore, so they are also not in the DATACITE_CONTRTYPE list that I created based on it and that is used in datacite. Should I completely changed DATACITE_CONTRTYPE to match the list from the model?

satra commented 1 year ago

sorry, i just checked the context file, dcite is a dandi specific iri prefix. it merged datacite and credit roles. so your types are based on datacite in that file, while dandi's is broader. i think that is ok.

djarecka commented 1 year ago

oh, ok, I thought that it's DataCite...

but I'm still not completely convinced that this is ok, that I'm ignoring roles that are not from DataCite for contributors if they exist in the model.

Coming back to the example with Funder, I could add it to fundingReferences, i.e. here, but later it will not be added to contributorType (while Sponsor will be)

satra commented 1 year ago

but later it will not be added to contributorType (while Sponsor will be)

i think that's ok since Funder is not a contributorType role in datacite.

djarecka commented 1 year ago

I was actually wrong I think we decided that once the Sponsor is added to the fundingReferences it is removed from the roles

Similarly as it's done for Author

yarikoptic commented 1 year ago

FWIW here is the code which presumably controls the logic for "If funderIdentifier is used, funderIdentifierType is mandatory" described in docs (as fixed recently in docs https://github.com/datacite/schema-docs/commit/fbe12e97e4a6eb267cb6e27b49fc694b79088013#diff-2aeda6925c9fa93b827818f675b0736cc94ae31bd230c860f9e498c7db5c0821R49: https://github.com/datacite/schema/blob/HEAD/spec/kernel-4.4/funding_reference_spec.rb#L68