Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The majority of .eln-example files does not comply with the requirement of a flattened JSON-LD #89

Open
salexan2001 opened this issue Nov 7, 2024 · 0 comments

Comments

@salexan2001
Copy link
Contributor

When using the ro-crate-py package to load the example .eln files I encounter errors like the following in almost all cases:

(...)
  File "(...)/ro-crate-py/rocrate/model/entity.py", line 107, in __setitem__
    raise ValueError(f"no @id in {v}")
ValueError: no @id in {'value': 'Test if everything is working as intended.', 'propertyID': '.objective', 'name': ' → Objective', '@type': 'PropertyValue', 'description': 'What is the objective?'}

I originally thought this was an issue of the ro-crate-py-package and posted an issue there:
ResearchObject/ro-crate-py#202

It turns out that the structure of the .eln-example files does not comply the following RO-Crate-Requirement:

The RO-Crate Metadata File MUST contain RO-Crate JSON-LD; a valid JSON-LD 1.0 document in flattened and compacted form

See: https://www.researchobject.org/ro-crate/specification/1.1/structure.html#ro-crate-metadata-file-ro-crate-metadatajson
and: ResearchObject/ro-crate-py#202

Test report for the .eln-example files:

RSpace-2023-12-08-14-44-xml-SELECTION-c0bEtpHcnNe-HA.eln - ok
export.eln
        no @id in {'@type': 'AggregateRating', 'ratingValue': 4, 'reviewCount': 1}
sampledb_export.eln
        no @id in {'value': 'Measurement', '@type': 'PropertyValue', 'propertyID': 'name', 'name': 'Object Name'}
records-example.eln
        no @id in {'@type': 'PropertyValue', 'additionalType': 'str', 'propertyID': 'type', 'value': 'Measurement'}
Export workbook-2024-08-27-export.eln
        no @id in {'@type': 'Organization', 'name': 'AI4Green', 'slogan': 'AI for Green Chemistry. Electronic Lab Notebook with Machine Learning Support.', 'url': 'https://www.ai4green.app', 'parentOrganization': '#university-of-nottingham'}
PASTA.eln
        no @id in {'value': 'Test if everything is working as intended.', 'propertyID': '.objective', 'name': ' → Objective', '@type': 'PropertyValue', 'description': 'What is the objective?'}
test.eln
        no @id in {'@type': 'TextObject', 'encodingFormat': 'text/plain', 'text': 'JSON export of 00-use-this-record-to-test-chatbot.'}

(So only the RSpace example seems to contain a flattened JSON-LD.)

The validator currently does not check this requirement, but a feature request is already submitted: crs4/rocrate-validator#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant