From 8b91d49b9797bd15248efe7ab648d91648a94b6d Mon Sep 17 00:00:00 2001 From: SimonStier <75166544+SimonStier@users.noreply.github.com> Date: Thu, 27 Aug 2026 08:53:29 +0200 Subject: [PATCH] fix(docs): label every mapped term and hold the table layout - dcat, dcterms, prov, csvw and EMMO's reference/data.ttl pinned: their terms were mapped but unlabelled, so the tables showed raw identifiers - fetch sends a user agent, since dublincore.org answers 403 without one - a term table is fixed-layout and identifiers may break, so one long IRI can no longer squeeze the term column --- docs/stylesheets/extra.css | 24 +++++ generated/datasets/Dataset.consensus.mmd | 4 +- generated/datasets/Dataset.emmo.mmd | 6 +- generated/datasets/Dataset.pmdco.mmd | 4 +- generated/datasets/Distribution.consensus.mmd | 10 +- generated/datasets/Distribution.schemaorg.mmd | 6 +- ...lectrochemicalCyclingDataset.consensus.mmd | 8 +- .../ElectrochemicalCyclingDataset.emmo.mmd | 10 +- .../ElectrochemicalCyclingDataset.pmdco.mmd | 8 +- ...lectrochemicalCyclingDataset.schemaorg.mmd | 2 +- .../datasets/TabularDataset.consensus.mmd | 2 +- generated/datasets/TabularDataset.emmo.mmd | 4 +- generated/datasets/TabularDataset.pmdco.mmd | 2 +- generated/labels.json | 64 +++++++++++-- ontologies.lock.json | 91 ++++++++++++++++--- scripts/fetch_ontologies.py | 6 +- 16 files changed, 194 insertions(+), 57 deletions(-) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 80ac204..de6fb4d 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -6,6 +6,30 @@ vertical-align: top; } +/* An identifier is one long unbreakable token, and a table cell holding several of them + pushes the table past the page and squeezes the term column to nothing. Breaking inside + an identifier costs a reader nothing here: the full IRI is the link target. */ + +.md-typeset table:not([class]) code { + overflow-wrap: anywhere; + word-break: break-word; +} + +.md-typeset table:not([class]) { + table-layout: fixed; + width: 100%; +} + +.md-typeset table:not([class]) th:first-child, +.md-typeset table:not([class]) td:first-child { + width: 30%; +} + +.md-typeset table:not([class]) th:nth-child(2), +.md-typeset table:not([class]) td:nth-child(2) { + width: 16%; +} + .md-typeset .mappings { margin: 0; padding-left: 1em; diff --git a/generated/datasets/Dataset.consensus.mmd b/generated/datasets/Dataset.consensus.mmd index 583a4ab..83ee8ff 100644 --- a/generated/datasets/Dataset.consensus.mmd +++ b/generated/datasets/Dataset.consensus.mmd @@ -2,5 +2,5 @@ flowchart LR n0["instance
dcat:Dataset"] n1["https://creativecommons.org/licenses/by/4.0/"] n2[/"Cycling of cell LFP-042"/] - n0 -->|dcterms:dcterms:license| n1 - n0 -->|dcterms:title| n2 + n0 -->|dcterms:License| n1 + n0 -->|dcterms:Title| n2 diff --git a/generated/datasets/Dataset.emmo.mmd b/generated/datasets/Dataset.emmo.mmd index ca8ce31..026df75 100644 --- a/generated/datasets/Dataset.emmo.mmd +++ b/generated/datasets/Dataset.emmo.mmd @@ -1,6 +1,6 @@ flowchart LR - n0["instance
emmo:EMMO_194e367c_9783_4bf5_96d0_9ad597d48d9a"] + n0["instance
emmo:Dataset"] n1["https://creativecommons.org/licenses/by/4.0/"] n2[/"Cycling of cell LFP-042"/] - n0 -->|dcterms:dcterms:license| n1 - n0 -->|dcterms:title| n2 + n0 -->|dcterms:License| n1 + n0 -->|dcterms:Title| n2 diff --git a/generated/datasets/Dataset.pmdco.mmd b/generated/datasets/Dataset.pmdco.mmd index 863afb9..c5f07bf 100644 --- a/generated/datasets/Dataset.pmdco.mmd +++ b/generated/datasets/Dataset.pmdco.mmd @@ -2,5 +2,5 @@ flowchart LR n0["instance
obo:homogenous data collection"] n1["https://creativecommons.org/licenses/by/4.0/"] n2[/"Cycling of cell LFP-042"/] - n0 -->|dcterms:dcterms:license| n1 - n0 -->|dcterms:title| n2 + n0 -->|dcterms:License| n1 + n0 -->|dcterms:Title| n2 diff --git a/generated/datasets/Distribution.consensus.mmd b/generated/datasets/Distribution.consensus.mmd index a5eac0a..31f868b 100644 --- a/generated/datasets/Distribution.consensus.mmd +++ b/generated/datasets/Distribution.consensus.mmd @@ -5,8 +5,8 @@ flowchart LR n3[/"48213004"/] n4["LFP-042-cycling.csv"] n5[/"text/csv"/] - n0 -->|dcterms:conformsTo| n1 - n0 -->|csvw:tableSchema| n2 - n0 -->|dcat:byteSize| n3 - n0 -->|dcat:downloadURL| n4 - n0 -->|dcat:mediaType| n5 + n0 -->|dcterms:Conforms To| n1 + n0 -->|csvw:table schema| n2 + n0 -->|dcat:byte size| n3 + n0 -->|dcat:download URL| n4 + n0 -->|dcat:media type| n5 diff --git a/generated/datasets/Distribution.schemaorg.mmd b/generated/datasets/Distribution.schemaorg.mmd index 5834403..c8bbdfc 100644 --- a/generated/datasets/Distribution.schemaorg.mmd +++ b/generated/datasets/Distribution.schemaorg.mmd @@ -5,8 +5,8 @@ flowchart LR n3[/"text/csv"/] n4["ElectrochemicalCyclingDataRow.schema.json"] n5[/"48213004"/] - n0 -->|dcterms:conformsTo| n1 + n0 -->|dcterms:Conforms To| n1 n0 -->|schema:contentUrl| n2 n0 -->|schema:encodingFormat| n3 - n0 -->|csvw:tableSchema| n4 - n0 -->|dcat:byteSize| n5 + n0 -->|csvw:table schema| n4 + n0 -->|dcat:byte size| n5 diff --git a/generated/datasets/ElectrochemicalCyclingDataset.consensus.mmd b/generated/datasets/ElectrochemicalCyclingDataset.consensus.mmd index 2455c17..52a1d23 100644 --- a/generated/datasets/ElectrochemicalCyclingDataset.consensus.mmd +++ b/generated/datasets/ElectrochemicalCyclingDataset.consensus.mmd @@ -29,10 +29,10 @@ flowchart LR n27["blank node
row:TestTime"] n28[/"60"/] n29["blank node
row:CellCurrent"] - n0 -->|dcterms:description| n1 - n0 -->|dcterms:issued| n2 - n0 -->|dcterms:dcterms:license| n3 - n0 -->|dcterms:title| n4 + n0 -->|dcterms:Description| n1 + n0 -->|dcterms:Date Issued| n2 + n0 -->|dcterms:License| n3 + n0 -->|dcterms:Title| n4 n0 -->|schema:about| n5 n0 -->|prov:wasGeneratedBy| n6 n0 -->|dataset:data| n7 diff --git a/generated/datasets/ElectrochemicalCyclingDataset.emmo.mmd b/generated/datasets/ElectrochemicalCyclingDataset.emmo.mmd index 5ead70c..5a5a118 100644 --- a/generated/datasets/ElectrochemicalCyclingDataset.emmo.mmd +++ b/generated/datasets/ElectrochemicalCyclingDataset.emmo.mmd @@ -1,5 +1,5 @@ flowchart LR - n0["LFP-042-2026-08-20
emmo:EMMO_194e367c_9783_4bf5_96d0_9ad597d48d9a"] + n0["LFP-042-2026-08-20
emmo:Dataset"] n1[/"Constant current cycling at 1C, first three samples"/] n2[/"2026-08-20"/] n3["https://creativecommons.org/licenses/by/4.0/"] @@ -29,10 +29,10 @@ flowchart LR n27[/"0.002"/] n28["blank node
echem:CellCurrent"] n29["blank node
echem:CellCurrent"] - n0 -->|dcterms:description| n1 - n0 -->|dcterms:issued| n2 - n0 -->|dcterms:dcterms:license| n3 - n0 -->|dcterms:title| n4 + n0 -->|dcterms:Description| n1 + n0 -->|dcterms:Date Issued| n2 + n0 -->|dcterms:License| n3 + n0 -->|dcterms:Title| n4 n0 -->|schema:about| n5 n0 -->|prov:wasGeneratedBy| n6 n0 -->|dataset:data| n7 diff --git a/generated/datasets/ElectrochemicalCyclingDataset.pmdco.mmd b/generated/datasets/ElectrochemicalCyclingDataset.pmdco.mmd index fc0eedd..20ce217 100644 --- a/generated/datasets/ElectrochemicalCyclingDataset.pmdco.mmd +++ b/generated/datasets/ElectrochemicalCyclingDataset.pmdco.mmd @@ -29,10 +29,10 @@ flowchart LR n27["blank node
row:CellVoltage"] n28[/"3.42"/] n29["blank node
row:CellCurrent"] - n0 -->|dcterms:description| n1 - n0 -->|dcterms:issued| n2 - n0 -->|dcterms:dcterms:license| n3 - n0 -->|dcterms:title| n4 + n0 -->|dcterms:Description| n1 + n0 -->|dcterms:Date Issued| n2 + n0 -->|dcterms:License| n3 + n0 -->|dcterms:Title| n4 n0 -->|schema:about| n5 n0 -->|prov:wasGeneratedBy| n6 n0 -->|dataset:data| n7 diff --git a/generated/datasets/ElectrochemicalCyclingDataset.schemaorg.mmd b/generated/datasets/ElectrochemicalCyclingDataset.schemaorg.mmd index 75350ab..2173bbe 100644 --- a/generated/datasets/ElectrochemicalCyclingDataset.schemaorg.mmd +++ b/generated/datasets/ElectrochemicalCyclingDataset.schemaorg.mmd @@ -29,7 +29,7 @@ flowchart LR n27["blank node
row:CellVoltage"] n28[/"3.42"/] n29["blank node
row:CellCurrent"] - n0 -->|dcterms:issued| n1 + n0 -->|dcterms:Date Issued| n1 n0 -->|schema:about| n2 n0 -->|schema:description| n3 n0 -->|schema:license| n4 diff --git a/generated/datasets/TabularDataset.consensus.mmd b/generated/datasets/TabularDataset.consensus.mmd index d1592c4..89b3bdc 100644 --- a/generated/datasets/TabularDataset.consensus.mmd +++ b/generated/datasets/TabularDataset.consensus.mmd @@ -1,4 +1,4 @@ flowchart LR n0["instance
TabularDataset"] n1[/"A table"/] - n0 -->|dcterms:title| n1 + n0 -->|dcterms:Title| n1 diff --git a/generated/datasets/TabularDataset.emmo.mmd b/generated/datasets/TabularDataset.emmo.mmd index 8f7c2d5..10e1699 100644 --- a/generated/datasets/TabularDataset.emmo.mmd +++ b/generated/datasets/TabularDataset.emmo.mmd @@ -1,4 +1,4 @@ flowchart LR - n0["instance
emmo:EMMO_194e367c_9783_4bf5_96d0_9ad597d48d9a"] + n0["instance
emmo:Dataset"] n1[/"A table"/] - n0 -->|dcterms:title| n1 + n0 -->|dcterms:Title| n1 diff --git a/generated/datasets/TabularDataset.pmdco.mmd b/generated/datasets/TabularDataset.pmdco.mmd index f5010bc..6f989e0 100644 --- a/generated/datasets/TabularDataset.pmdco.mmd +++ b/generated/datasets/TabularDataset.pmdco.mmd @@ -1,4 +1,4 @@ flowchart LR n0["instance
obo:homogenous data collection"] n1[/"A table"/] - n0 -->|dcterms:title| n1 + n0 -->|dcterms:Title| n1 diff --git a/generated/labels.json b/generated/labels.json index 8b6b0cb..28a5e18 100644 --- a/generated/labels.json +++ b/generated/labels.json @@ -79,17 +79,29 @@ "label": "kilometer", "source": "uo/2026-07-31/uo.owl" }, + "http://purl.org/dc/terms/conformsTo": { + "label": "Conforms To", + "source": "dcterms/2020-01-20/dublin_core_terms.ttl" + }, "http://purl.org/dc/terms/description": { - "label": "description", - "source": "qudt/3.4.0/SCHEMA_QUDT.ttl" + "label": "Description", + "source": "dcterms/2020-01-20/dublin_core_terms.ttl" + }, + "http://purl.org/dc/terms/hasPart": { + "label": "Has Part", + "source": "dcterms/2020-01-20/dublin_core_terms.ttl" + }, + "http://purl.org/dc/terms/issued": { + "label": "Date Issued", + "source": "dcterms/2020-01-20/dublin_core_terms.ttl" }, "http://purl.org/dc/terms/license": { - "label": "dcterms:license", - "source": "pmdco/3.1.0/pmdco.ttl" + "label": "License", + "source": "dcterms/2020-01-20/dublin_core_terms.ttl" }, "http://purl.org/dc/terms/title": { - "label": "title", - "source": "qudt/3.4.0/SCHEMA_QUDT.ttl" + "label": "Title", + "source": "dcterms/2020-01-20/dublin_core_terms.ttl" }, "http://qudt.org/schema/qudt/QuantityValue": { "label": "Quantity value", @@ -235,13 +247,45 @@ "label": "value", "source": "schemaorg/30.0/schemaorg-current-http.ttl" }, + "http://www.w3.org/ns/csvw#tableSchema": { + "label": "table schema", + "source": "csvw/2015-12-17/csvw.ttl" + }, "http://www.w3.org/ns/dcat#Dataset": { "label": "Dataset", - "source": "ols4" + "source": "dcat/3/dcat.ttl" }, "http://www.w3.org/ns/dcat#Distribution": { "label": "Distribution", - "source": "ols4" + "source": "dcat/3/dcat.ttl" + }, + "http://www.w3.org/ns/dcat#accessURL": { + "label": "access address", + "source": "dcat/3/dcat.ttl" + }, + "http://www.w3.org/ns/dcat#byteSize": { + "label": "byte size", + "source": "dcat/3/dcat.ttl" + }, + "http://www.w3.org/ns/dcat#distribution": { + "label": "distribution", + "source": "dcat/3/dcat.ttl" + }, + "http://www.w3.org/ns/dcat#downloadURL": { + "label": "download URL", + "source": "dcat/3/dcat.ttl" + }, + "http://www.w3.org/ns/dcat#mediaType": { + "label": "media type", + "source": "dcat/3/dcat.ttl" + }, + "http://www.w3.org/ns/dcat#packageFormat": { + "label": "packaging format", + "source": "dcat/3/dcat.ttl" + }, + "http://www.w3.org/ns/prov#wasGeneratedBy": { + "label": "wasGeneratedBy", + "source": "prov/2013-04-30/prov.ttl" }, "https://w3id.org/emmo#Ampere": { "label": "Ampere", @@ -259,6 +303,10 @@ "label": "hasSpeciesPart", "source": "emmo/1.0.4/disciplines/chemistry.ttl" }, + "https://w3id.org/emmo#EMMO_194e367c_9783_4bf5_96d0_9ad597d48d9a": { + "label": "Dataset", + "source": "emmo/1.0.4/reference/data.ttl" + }, "https://w3id.org/emmo#EMMO_4f9670f5-14ca-53da-a1ea-9b0550a61035": { "label": "SiliconSymbol", "source": "emmo/1.0.4/disciplines/periodictable.ttl" diff --git a/ontologies.lock.json b/ontologies.lock.json index f046cff..85d2fec 100644 --- a/ontologies.lock.json +++ b/ontologies.lock.json @@ -1,4 +1,61 @@ { + "csvw": { + "version": "2015-12-17", + "repository": "https://www.w3.org/ns", + "ref": "2015-12-17", + "base": "https://www.w3.org/ns/", + "files": { + "csvw.ttl": { + "path": "csvw.ttl", + "sha256": "ad9296569d3203c771a0ca51ac7c4180d8ad2bdd85adec5c7881555ddb409f3a", + "bytes": 26702 + } + }, + "note": "the CSV on the Web namespace document" + }, + "dcat": { + "version": "3", + "repository": "https://www.w3.org/ns", + "ref": "3", + "base": "https://www.w3.org/ns/", + "files": { + "dcat.ttl": { + "path": "dcat.ttl", + "sha256": "d1624d3bbf364f6fc1d43b9a188bbb9e67639b1a7d46a5cb7ea3f5d47d02b62f", + "bytes": 200345 + } + }, + "note": "the DCAT 3 namespace document" + }, + "dcterms": { + "version": "2020-01-20", + "repository": "https://www.dublincore.org/specifications/dublin-core/dcmi-terms", + "ref": "2020-01-20", + "base": "https://www.dublincore.org/specifications/dublin-core/dcmi-terms/", + "files": { + "dublin_core_terms.ttl": { + "path": "dublin_core_terms.ttl", + "sha256": "13df401072dd7015bf9d75162f3e41c8138075304b7b9cc1aa1e9c16db976797", + "bytes": 47834 + } + }, + "note": "DCMI Metadata Terms" + }, + "electrochemistry": { + "version": "0.37.2", + "repository": "https://github.com/emmo-repo/domain-electrochemistry", + "ref": "0.37.2", + "base": "https://raw.githubusercontent.com/emmo-repo/domain-electrochemistry/0.37.2/", + "files": { + "reference/electrochemistry-quantities.ttl": { + "path": "reference/electrochemistry-quantities.ttl", + "sha256": "87efdb1a890a28174be307d68132f442d89f33ab849c4801015acfa0bdd11961", + "bytes": 415668 + } + }, + "license": "https://creativecommons.org/licenses/by/4.0/", + "note": "quantity reference of the EMMO electrochemistry domain" + }, "emmo": { "version": "1.0.4", "repository": "https://github.com/emmo-repo/EMMO", @@ -75,6 +132,11 @@ "sha256": "0122ce3bb10fbc7d259174f9e4a8ed1a6abde84ef2d919ab09ae01757d6ed3bf", "bytes": 42321 }, + "reference/data.ttl": { + "path": "reference/data.ttl", + "sha256": "d5208e86ceb493f9981eca941e921435b4145e21f1e433054a5b9ed55d358f99", + "bytes": 10149 + }, "foundation/mereocausality.ttl": { "path": "foundation/mereocausality.ttl", "sha256": "35014bbaa407c57f4c24c9c8f07592aad6df29472fca7210047efcae2e39e3aa", @@ -84,21 +146,6 @@ "note": "the 1.0.4 development branch at that commit; the published w3id build lagged it", "license": "https://creativecommons.org/licenses/by/4.0/" }, - "electrochemistry": { - "version": "0.37.2", - "repository": "https://github.com/emmo-repo/domain-electrochemistry", - "ref": "0.37.2", - "base": "https://raw.githubusercontent.com/emmo-repo/domain-electrochemistry/0.37.2/", - "files": { - "reference/electrochemistry-quantities.ttl": { - "path": "reference/electrochemistry-quantities.ttl", - "sha256": "87efdb1a890a28174be307d68132f442d89f33ab849c4801015acfa0bdd11961", - "bytes": 415668 - } - }, - "license": "https://creativecommons.org/licenses/by/4.0/", - "note": "quantity reference of the EMMO electrochemistry domain" - }, "iao": { "version": "2026-03-30", "repository": "http://purl.obolibrary.org/obo/iao.owl", @@ -158,6 +205,20 @@ }, "license": "https://creativecommons.org/licenses/by/4.0/" }, + "prov": { + "version": "2013-04-30", + "repository": "https://www.w3.org/ns", + "ref": "2013-04-30", + "base": "https://www.w3.org/ns/", + "files": { + "prov.ttl": { + "path": "prov.ttl", + "sha256": "d7ea634dbcd31347eba38157197f69d314077ef7f88fd4f90e4f24a78bfe1097", + "bytes": 112777 + } + }, + "note": "the PROV-O namespace document" + }, "qudt": { "version": "3.4.0", "repository": "https://github.com/qudt/qudt-public-repo", diff --git a/scripts/fetch_ontologies.py b/scripts/fetch_ontologies.py index b6f7409..daf9350 100644 --- a/scripts/fetch_ontologies.py +++ b/scripts/fetch_ontologies.py @@ -44,9 +44,13 @@ def digest(data: bytes) -> str: def fetch(url: str, attempts: int = 4) -> bytes: """Fetch a file, retrying with backoff while a host rate-limits.""" + # some publishers refuse a request without a user agent, and an ontology that cannot be + # fetched cannot be pinned + request = urllib.request.Request( + url, headers={"User-Agent": "oold-reference-schemas", "Accept": "text/turtle, */*"}) for attempt in range(attempts): try: - with urllib.request.urlopen(url, timeout=300) as response: + with urllib.request.urlopen(request, timeout=300) as response: return response.read() except urllib.error.HTTPError as error: if error.code not in (429, 503) or attempt == attempts - 1: