From 6dde12248d84eb44b2674fdd9c10b724833b00f7 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Fri, 5 Jul 2024 20:43:56 +0200 Subject: [PATCH] Fix test redis (#877) * Fixed issues * Working on dataset representation... * Update figure * Avoid failing unnessesary * Minor fixes: - Changed some blank nodes to classes and named literals. - Updated dataset figure. * Updated dataset serialisation * Updating dataset * Handled units. * Updates * Added new figure: dataset-v2.svg * Updated dataset-v2.svg * Updated figure * Updated dataset figure with input from Emanuele * Updated figure * Improving dataset * Updated dataset serialisation * metadata_to_rdf() now works * Implemented loading datamodels from EMMO representation. * Cleanup * Skip testing dataset if Tripper is not installed. * Updated representation of array types in the dlite.dataset module. * Added support for instances * Updated requirements on tripper to current master * Update what tests to run * Added missing test * Removed Al datasets as suggested by Francesca * Started to add a dataset example * Updated readme for dataset example * Updated requirements * Also updated local requirements for TEM_data example * Fixed EMMO dataset representation * Fix the redis test --- bindings/python/tests/test_dataset1_save.py | 1 - examples/dataset/README.md | 4 +++- storages/python/tests-python/test_redis.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bindings/python/tests/test_dataset1_save.py b/bindings/python/tests/test_dataset1_save.py index 6862cd698..13174bcf8 100644 --- a/bindings/python/tests/test_dataset1_save.py +++ b/bindings/python/tests/test_dataset1_save.py @@ -45,7 +45,6 @@ #assert get_unit_iri("mm") == "https://w3id.org/emmo#MilliMetre" - # Test serialising Metadata as an EMMO dataset # ============================================ Fluid = dlite.get_instance("http://onto-ns.org/meta/dlite/0.1/FluidData") diff --git a/examples/dataset/README.md b/examples/dataset/README.md index 29611ee82..c0cb01a33 100644 --- a/examples/dataset/README.md +++ b/examples/dataset/README.md @@ -27,6 +27,9 @@ properties: description: Array of measured temperatures. ``` +A DLite datamodel is represented with an emmo:DataSet, and its properties are represented with emmo:Datum as illustrated in the figure above. +It shows how a simple [`FluidData`] datamodel is represented. + The datamodel is semantically enhanced using the following mappings ```python mappings = [ @@ -45,5 +48,4 @@ Some comments: - The `map:mapsTo` are translated to `rdfs:subClassOf` when serialised to the triplestore. - [`FluidData`]: https://github.com/SINTEF/dlite/blob/652-serialise-data-models-to-tbox/examples/dataset/datamodels/FluidData.json diff --git a/storages/python/tests-python/test_redis.py b/storages/python/tests-python/test_redis.py index 11d900499..6ff8d7713 100644 --- a/storages/python/tests-python/test_redis.py +++ b/storages/python/tests-python/test_redis.py @@ -22,8 +22,8 @@ meta = inst1.meta save0 = meta.asdict() -save1 = inst1.asdict() -save2 = inst2.asdict() +save1 = inst1.asdict(single=True, uuid=True) +save2 = inst2.asdict(single=True, uuid=True) # Test storing to Redis