From 828e8ef41158c7cd615759bc511cbeaf42719852 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Tue, 15 Oct 2024 16:55:12 +0200 Subject: [PATCH] Added semdata.yaml --- tests/dataset/test_dataset.py | 7 ++-- tests/input/semdata.yaml | 72 +++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 tests/input/semdata.yaml diff --git a/tests/dataset/test_dataset.py b/tests/dataset/test_dataset.py index e5aba0c..4bc2e89 100644 --- a/tests/dataset/test_dataset.py +++ b/tests/dataset/test_dataset.py @@ -12,8 +12,8 @@ inputdir = testdir / "input" -# if True: -def test_save_and_load_dataset(): +if True: + # def test_save_and_load_dataset(): """Test save_dataset() and load_dataset().""" # pylint: disable=too-many-locals,invalid-name @@ -23,7 +23,8 @@ def test_save_and_load_dataset(): ts = Triplestore("rdflib") # Load data documentation - datadoc = load_datadoc(inputdir / "datasets.yaml") + # datadoc = load_datadoc(inputdir / "datasets.yaml") + datadoc = load_datadoc(inputdir / "semdata.yaml") assert isinstance(datadoc, dict) assert "@context" in datadoc diff --git a/tests/input/semdata.yaml b/tests/input/semdata.yaml new file mode 100644 index 0000000..9456ce0 --- /dev/null +++ b/tests/input/semdata.yaml @@ -0,0 +1,72 @@ +--- +# This extends the list of prefixes that are already defined in the context +prefixes: + sem: "https://w3id.com/emmo/domain/sem/0.1#" + semdata: "https://he-matchmaker.eu/data/sem/" + sample: "https://he-matchmaker.eu/sample/" + mat: "https://he-matchmaker.eu/material/" + dm: "http://onto-ns.com/meta/characterisation/0.1/SEMImage#" + parser: "http://sintef.no/dlite/parser#" + +# List of documented datasets +datasets: + - "@id": "semdata:SEM_cement_batch2/77600-23-001/77600-23-001_5kV_400x_m001" + "@type": "https://w3id.com/emmo/domain/sem/0.1#SEMImage" + title: SEM image of cement + description: | + Back-scattered SEM image of cement sample 77600 from Heidelberg, + polished with 1 µm diamond compound. + creator: Sigurd Wenner + contactPoint: "Sigurd Wenner " + inSeries: "semdata:SEM_cement_batch2/77600-23-001" + + datamodel: http://onto-ns.com/meta/characterisation/0.1/SEMImage + mappingURL: https://raw.githubusercontent.com/HEU-MatCHMaker/DataDocumentation/refs/heads/master/SEM/datamodels/SEMImage.ttl + + # Contextual documentation of the dataset + statements: + - ["@id", "sem:fromSample", "sample:SEM_cement_batch2/77600-23-001"] + - ["@id", "emmo:isDescriptionOf", "mat:concrete1"] + + distribution: + downloadURL: "file://SEM_cement_batch2/77600-23-001/77600-23-001_5kV_400x_m001.tif" + mediaType: image/tiff + parser: "parser:sem_hitachi" + + + - "@id": "semdata:SEM_cement_batch2/77600-23-001" + "@type": "https://w3id.com/emmo/domain/sem/0.1#SEMImageSeries" + title: Series of SEM image of cement sample 77600 + description: Back-scattered SEM image of cement sample 77600, polished with 1 µm diamond compound. + creator: Sigurd Wenner + contactPoint: "Sigurd Wenner " + inSeries: "semdata:SEM_cement_batch2" + + distribution: + downloadURL: "file://SEM_cement_batch2/77600-23-001" + mediaType: inode/directory + + + - "@id": "semdata:SEM_cement_batch2" + "@type": "https://w3id.com/emmo/domain/sem/0.1#SEMImageSeries" + title: Series of SEM images of cement batch2 + description: ... + creator: Sigurd Wenner + contactPoint: "Sigurd Wenner " + + distribution: + downloadURL: "file://SEM_cement_batch2" + mediaType: inode/directory + + + - "@id": "sample:SEM_cement_batch2/77600-23-001" + "@type": "chameo:Sample" + title: + + +parsers: + - "@id": "parser:sem_hitachi" + "@type": "oteio:Parser" + parserType: application/vnd.dlite-parse + configuration: + driver: hitachi