Skip to content

Commit

Permalink
SciDataLib-79 Code does not recognize ontological value
Browse files Browse the repository at this point in the history
reworked example 2 on ruff data
  • Loading branch information
stuchalk committed Dec 18, 2023
1 parent f2f09e3 commit 0453d7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/example2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions tests/io/test_rruff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 0453d7b

Please sign in to comment.