Skip to content

Commit

Permalink
add guidance text
Browse files Browse the repository at this point in the history
  • Loading branch information
BSnelling committed Jun 10, 2024
1 parent 9f983a6 commit b25d557
Show file tree
Hide file tree
Showing 8 changed files with 503 additions and 508 deletions.
171 changes: 77 additions & 94 deletions docs/HDRUK/3.0.0.form.json

Large diffs are not rendered by default.

447 changes: 226 additions & 221 deletions docs/HDRUK/3.0.0.md

Large diffs are not rendered by default.

227 changes: 113 additions & 114 deletions docs/HDRUK/3.0.0.structure.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions hdr_schemata/models/HDRUK/v3_0_0/EnrichmentAndLinkage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ class Config:
extra = "forbid"

derivedFrom: Optional[List[DatasetDescriptor]] = Field(
None, **an.derivedFrom.__dict__, json_schema_extra={"guidance": an.derivedFrom.guidance}
None, **an.derivedFrom.__dict__
)

isPartOf: Optional[List[DatasetDescriptor]] = Field(
None, **an.isPartOf.__dict__, json_schema_extra={"guidance": an.isPartOf.guidance}
None, **an.isPartOf.__dict__
)

linkableDatasets: Optional[List[DatasetDescriptor]] = Field(
None, **an.linkableDatasets.__dict__, json_schema_extra={"guidance": an.linkableDatasets.guidance}
None, **an.linkableDatasets.__dict__
)

similarToDatasets: Optional[List[DatasetDescriptor]] = Field(
None, **an.similarToDatasets.__dict__, json_schema_extra={"guidance": an.similarToDatasets.guidance}
None, **an.similarToDatasets.__dict__
)

investigations: Optional[List[Url]] = Field(
Expand Down
4 changes: 2 additions & 2 deletions hdr_schemata/models/HDRUK/v3_0_0/Summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Config:
)

abstract: AbstractText = Field(
..., **an.abstract.__dict__, json_schema_extra={"guidance": an.title.guidance}
..., **an.abstract.__dict__, json_schema_extra={"guidance": an.abstract.guidance}
)

dataProvider: Organisation = Field(
Expand All @@ -43,4 +43,4 @@ class Config:

alternateIdentifiers: Optional[
Union[Optional[CommaSeparatedValues], List[Optional[ShortDescription]]]
] = Field(None, **an.alternateIdentifiers.__dict__, json_schema_extra={"guidance": an.alternateIdentifiers.guidance})
] = Field(None, **an.alternateIdentifiers.__dict__)
110 changes: 59 additions & 51 deletions hdr_schemata/models/HDRUK/v3_0_0/annotations/config.yaml

Large diffs are not rendered by default.

42 changes: 20 additions & 22 deletions hdr_schemata/utils/create_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ def get_fields(structure, model: type[BaseModel]):

is_list, is_optional, type_names, _types = extract_type_info(_type)

print(name)

if field.json_schema_extra is not None and "guidance" in field.json_schema_extra:
guidance = field.json_schema_extra["guidance"]
else:
Expand Down Expand Up @@ -225,29 +223,29 @@ def remove_types(data):
print(f"Done {path}/name")


# from hdr_schemata.models.HDRUK import Hdruk212
# from hdr_schemata.models.HDRUK import Hdruk213
# from hdr_schemata.models.HDRUK import Hdruk220
# from hdr_schemata.models.HDRUK import Hdruk221
from hdr_schemata.models.HDRUK import Hdruk212
from hdr_schemata.models.HDRUK import Hdruk213
from hdr_schemata.models.HDRUK import Hdruk220
from hdr_schemata.models.HDRUK import Hdruk221
from hdr_schemata.models.HDRUK import Hdruk300
# from hdr_schemata.models.GWDM.v1_1 import Gwdm10
# from hdr_schemata.models.GWDM.v1_1 import Gwdm11
# from hdr_schemata.models.GWDM.v1_2 import Gwdm12
# from hdr_schemata.models.GWDM.v2_0 import Gwdm20
from hdr_schemata.models.GWDM.v1_1 import Gwdm10
from hdr_schemata.models.GWDM.v1_1 import Gwdm11
from hdr_schemata.models.GWDM.v1_2 import Gwdm12
from hdr_schemata.models.GWDM.v2_0 import Gwdm20


# create_markdown(Hdruk220, "./docs/HDRUK/", "2.2.0")
# create_markdown(Hdruk221, "./docs/HDRUK/", "2.2.1")
# create_markdown(Hdruk212, "./docs/HDRUK/", "2.1.2")
# create_markdown(Hdruk213, "./docs/HDRUK/", "2.1.3")
create_markdown(Hdruk220, "./docs/HDRUK/", "2.2.0")
create_markdown(Hdruk221, "./docs/HDRUK/", "2.2.1")
create_markdown(Hdruk212, "./docs/HDRUK/", "2.1.2")
create_markdown(Hdruk213, "./docs/HDRUK/", "2.1.3")
create_markdown(Hdruk300, "./docs/HDRUK/", "3.0.0")

# from hdr_schemata.models.GWDM.v1_1 import Gwdm10
# from hdr_schemata.models.GWDM.v1_1 import Gwdm11
# from hdr_schemata.models.GWDM.v1_2 import Gwdm12
# from hdr_schemata.models.GWDM.v2_0 import Gwdm20
from hdr_schemata.models.GWDM.v1_1 import Gwdm10
from hdr_schemata.models.GWDM.v1_1 import Gwdm11
from hdr_schemata.models.GWDM.v1_2 import Gwdm12
from hdr_schemata.models.GWDM.v2_0 import Gwdm20

# create_markdown(Gwdm10, "./docs/GWDM/", "1.0")
# create_markdown(Gwdm11, "./docs/GWDM/", "1.1")
# create_markdown(Gwdm12, "./docs/GWDM/", "1.2")
# create_markdown(Gwdm20, "./docs/GWDM/", "2.0")
create_markdown(Gwdm10, "./docs/GWDM/", "1.0")
create_markdown(Gwdm11, "./docs/GWDM/", "1.1")
create_markdown(Gwdm12, "./docs/GWDM/", "1.2")
create_markdown(Gwdm20, "./docs/GWDM/", "2.0")
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ nav:
- Version 1.0: GWDM/1.0.md
- Version 1.1: GWDM/1.1.md
- Version 1.2: GWDM/1.2.md
- Version 2.0: GWDM/2.0.md
- HDRUK:
- Version 2.1.2: HDRUK/2.1.2.md
- Version 2.1.3: HDRUK/2.1.3.md
- Version 2.2.0: HDRUK/2.2.0.md
- Version 2.2.1: HDRUK/2.2.1.md
- Version 3.0.0: HDRUK/3.0.0.md
- Schema Change Log:
- GWDM:
- 1.1: GWDM/1.1.change.md
Expand Down

0 comments on commit b25d557

Please sign in to comment.