diff --git a/src/bioregistry/data/bioregistry.json b/src/bioregistry/data/bioregistry.json index 040ce3ac8..b1c27f055 100644 --- a/src/bioregistry/data/bioregistry.json +++ b/src/bioregistry/data/bioregistry.json @@ -116926,9 +116926,10 @@ "prefix": "UNIPARC" }, "contact": { - "email": "apweiler@ebi.ac.uk", - "name": "Rolf Apweiler", - "orcid": "0000-0001-7078-200X" + "email": "agb@ebi.ac.uk", + "github": "bateman-research", + "name": "Alex Bateman", + "orcid": "0000-0002-6982-4660" }, "edam": { "description": "Accession number of a UniParc (protein sequence) database entry.", @@ -117094,10 +117095,23 @@ "uri_format": "https://www.uniprot.org/uniprotkb/$1/entry" }, "contact": { - "email": "apweiler@ebi.ac.uk", - "name": "Rolf Apweiler", - "orcid": "0000-0001-7078-200X" + "email": "agb@ebi.ac.uk", + "github": "bateman-research", + "name": "Alex Bateman", + "orcid": "0000-0002-6982-4660" }, + "contact_extras": [ + { + "email": "alan.bridge@sib.swiss", + "name": "Alan Bridge", + "orcid": "0000-0003-2148-9135" + }, + { + "email": "wuc@udel.edu", + "name": "Cathy Wu", + "orcid": "0000-0001-6379-8601" + } + ], "contributor_extras": [ { "email": "m.naguthana@hotmail.com", diff --git a/src/bioregistry/schema/schema.json b/src/bioregistry/schema/schema.json index 6713b3041..0af52d2fc 100644 --- a/src/bioregistry/schema/schema.json +++ b/src/bioregistry/schema/schema.json @@ -1123,6 +1123,22 @@ "default": null, "description": "The contact email address for the resource. This must correspond to a specific person and not be a listserve nor a shared email account." }, + "contact_extras": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/Attributable" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Secondary contacts. It's required to have a primary contact to have this field.", + "title": "Contact Extras" + }, "owners": { "anyOf": [ { diff --git a/src/bioregistry/schema/struct.py b/src/bioregistry/schema/struct.py index 3dcecfc0a..4073d7fde 100644 --- a/src/bioregistry/schema/struct.py +++ b/src/bioregistry/schema/struct.py @@ -342,6 +342,10 @@ class Resource(BaseModel): "person and not be a listserve nor a shared email account." ), ) + contact_extras: list[Attributable] | None = Field( + default=None, + description="Secondary contacts. It's required to have a primary contact to have this field.", + ) owners: list[Organization] | None = Field( default=None, description="The owner of the corresponding identifier space. See also https://github.com/biopragmatics/" diff --git a/src/bioregistry/schema_utils.py b/src/bioregistry/schema_utils.py index bc911b3e5..04207871c 100644 --- a/src/bioregistry/schema_utils.py +++ b/src/bioregistry/schema_utils.py @@ -201,6 +201,12 @@ def read_prefix_contacts(registry: Mapping[str, Resource]) -> Mapping[str, set[s contact_orcid = resource.get_contact_orcid() if contact_orcid: rv[contact_orcid].add(prefix) + + # Add all secondary contacts' ORCIDs + for secondary_contact in resource.contact_extras: + if secondary_contact.orcid: + rv[secondary_contact.orcid].add(prefix) + return dict(rv) diff --git a/tests/test_data.py b/tests/test_data.py index 15b286543..eeb039026 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -828,6 +828,9 @@ def test_reviewers(self): def test_contacts(self): """Check contacts have minimal metadata.""" for prefix, resource in self.registry.items(): + with self.subTest(prefix=prefix): + if resource.contact_extras: + self.assertIsNotNone(resource.contact) if not resource.contact: continue with self.subTest(prefix=prefix): @@ -839,6 +842,15 @@ def test_contacts(self): ) self.assert_contact_metadata(resource.contact) + def test_secondary_contacts(self): + """Check secondary contacts.""" + for prefix, resource in self.registry.items(): + if not resource.contact_extras: + continue + self.assertIsNotNone(resource.contact) + for contact in resource.contact_extras: + self.assert_contact_metadata(contact) + def test_wikidata_wrong_place(self): """Test that wikidata annotations aren't accidentally placed in the wrong place.""" registry_raw = json.loads(BIOREGISTRY_PATH.read_text(encoding="utf8"))