Skip to content

Commit 6e63eff

Browse files
🍱 Link DOIs in Study
1 parent a2b4243 commit 6e63eff

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/include_access_model/datamodel/include_access_model.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auto generated from include_access_model.yaml by pythongen.py version: 0.0.1
2-
# Generation date: 2025-11-10T20:17:42
2+
# Generation date: 2025-11-11T07:37:46
33
# Schema: include-access-model
44
#
55
# id: https://includedcc.org/include-access-model
@@ -177,6 +177,7 @@ class Study(Record):
177177
publication: Optional[Union[Union[str, PublicationId], list[Union[str, PublicationId]]]] = empty_list()
178178
acknowledgments: Optional[str] = None
179179
citation_statement: Optional[str] = None
180+
doi: Optional[Union[str, DOIId]] = None
180181

181182
def __post_init__(self, *_: str, **kwargs: Any):
182183
if self._is_empty(self.id):
@@ -286,6 +287,9 @@ def __post_init__(self, *_: str, **kwargs: Any):
286287
if self.citation_statement is not None and not isinstance(self.citation_statement, str):
287288
self.citation_statement = str(self.citation_statement)
288289

290+
if self.doi is not None and not isinstance(self.doi, DOIId):
291+
self.doi = DOIId(self.doi)
292+
289293
super().__post_init__(**kwargs)
290294

291295

src/include_access_model/datamodel/include_access_model_pydantic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ class Study(Record):
265265
actual_number_of_participants: int = Field(default=..., title="Actual Number of Participants", description="""Total participants included at this time.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study']} })
266266
acknowledgments: Optional[str] = Field(default=None, title="Acknowledgments", description="""Funding statement and acknowledgments for this study""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study']} })
267267
citation_statement: Optional[str] = Field(default=None, title="Citation Statement", description="""Statement that secondary data users should use to acknowledge use of this study or dataset. E.g., \"The results analyzed and <published or shown> here are based in whole or in part upon data generated by the INCLUDE (INvestigation of Co-occurring conditions across the Lifespan to Understand Down syndromE) Project <insert accession number(s) and/or study DOI(s)>, and were accessed from the INCLUDE Data Hub and <insert other database(s)>.\"""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study']} })
268+
doi: Optional[str] = Field(default=None, title="DOI", description="""Digital Object Identifier (DOI) for this Record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study', 'DOI']} })
268269
uuid: str = Field(default=..., title="UUID", description="""Internally assigned UUID for data management and QC purposes""", json_schema_extra = { "linkml_meta": {'domain_of': ['Record']} })
269270
id: str = Field(default=..., title="ID", description="""INLCUDE Global ID for this record""", json_schema_extra = { "linkml_meta": {'domain_of': ['Record']} })
270271
external_id: Optional[list[str]] = Field(default=[], title="External Identifiers", description="""Other identifiers for this entity, eg, from the submitting study or in systems like dbGaP""", json_schema_extra = { "linkml_meta": {'domain_of': ['Record']} })
@@ -294,7 +295,7 @@ class DOI(Record):
294295
linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://includedcc.org/include-access-model',
295296
'title': 'Digital Object Identifier (DOI)'})
296297

297-
doi: Optional[str] = Field(default=None, title="DOI", description="""Digital Object Identifier (DOI) for this Record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DOI']} })
298+
doi: Optional[str] = Field(default=None, title="DOI", description="""Digital Object Identifier (DOI) for this Record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study', 'DOI']} })
298299
bibliographic_reference: Optional[str] = Field(default=None, title="Bibiliographic Reference", description="""Text use to reference this Record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DOI', 'Publication']} })
299300
uuid: str = Field(default=..., title="UUID", description="""Internally assigned UUID for data management and QC purposes""", json_schema_extra = { "linkml_meta": {'domain_of': ['Record']} })
300301
id: str = Field(default=..., title="ID", description="""INLCUDE Global ID for this record""", json_schema_extra = { "linkml_meta": {'domain_of': ['Record']} })

src/include_access_model/schema/include_access_model.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ classes:
7272
# - guidMapped
7373
- acknowledgments
7474
- citation_statement
75-
# - doi
76-
# - doi_citation
75+
- doi
7776
VirtualBiorepository:
7877
title: Virtual BioRepository (VBR)
7978
description: An organization that can provide access to specimen for further analysis.

0 commit comments

Comments
 (0)