From 0453d7b7edb3f3152c133f70236d8995b9c9a187 Mon Sep 17 00:00:00 2001 From: Stuart Chalk Date: Mon, 18 Dec 2023 15:08:13 -0500 Subject: [PATCH] SciDataLib-79 Code does not recognize ontological value reworked example 2 on ruff data --- examples/example2.py | 4 ++-- tests/io/test_rruff.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/example2.py b/examples/example2.py index e13655d..e63be49 100644 --- a/examples/example2.py +++ b/examples/example2.py @@ -6,7 +6,7 @@ def convert_rruff(): """ load and process rruff file """ - f = open("tests/data/rruff/raman_soddyite.rruff", "r") + f = open("../tests/data/rruff/raman_soddyite.rruff", "r") lines = f.read().splitlines() rruff, seriesx, seriesy = {}, [], [] for line in lines: @@ -179,7 +179,7 @@ def convert_rruff(): 'relating to the database and software, ', 'nor in any copy of any part of the database and software.' ) - example2.rights(holder, lic) + example2.rights([{'holder': holder, 'license': lic}]) print(json.dumps(example2.output, indent=4)) exit() diff --git a/tests/io/test_rruff.py b/tests/io/test_rruff.py index 5ab7aaf..cb6927b 100644 --- a/tests/io/test_rruff.py +++ b/tests/io/test_rruff.py @@ -37,8 +37,8 @@ def test_read_rruff(raman_soddyite_file): assert "RRUFF" in graph["sources"][1]["citation"] assert graph["sources"][1]["url"] == "https://rruff.info/R060361" - assert graph["scidata"]["discipline"] == "w3i:Chemistry" - assert graph["scidata"]["subdiscipline"] == "w3i:AnalyticalChemistry" + assert graph["scidata"]["discipline#"] == "w3i:Chemistry" + assert graph["scidata"]["subdiscipline#"] == "w3i:AnalyticalChemistry" # Check description has all the keywords from RRUFF file description = graph.get("description")