Fix issues in rocrate support
Summary
This MR introduces the following changes/enhancements:
- Support the special property "variablesMeasured" in addition to "hasPart". For these two properties a special treatment is applied when generating the subtree:
- These two properties are a list of dicts having a single key-value pair with an ID to a different dataset.
- Each element of the list will be dereferenced and directly be added as an ROCrateEntity.
- Because of the flat structure of the JSON-LD there are properties which only consist of a single "@id" in a property. During generation of the
subtree, make sure that:
- This case is the only one allowed, i.e. if there is a nested dict as value it must have only a single attribute with key "@id".
- It is dereferenced and its dereferenced value is used to create a sub ROCrateEntity.
Focus
Focus on the create_children function. In contains some inline comments explaining the details.
Test Environment
Use the automated tests. In addition, have a look at the contents of records-example.eln
in unittests/eln_files
.
Check List for the Author
Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines
-
All automated tests pass -
Reference related issues -
Up-to-date CHANGELOG.md (or not necessary) -
Up-to-date JSON schema (or not necessary) -
Appropriate user and developer documentation (or not necessary) - How do I use the software? Assume "stupid" users.
- How do I develop or debug the software? Assume novice developers.
-
Annotations in code (Gitlab comments) - Intent of new code
- Problems with old code
- Why this implementation?
Check List for the Reviewer
-
I understand the intent of this MR -
All automated tests pass -
Up-to-date CHANGELOG.md (or not necessary) -
Appropriate user and developer documentation (or not necessary) -
The test environment setup works and the intended behavior is reproducible in the test environment -
In-code documentation and comments are up-to-date. -
Check: Are there specifications? Are they satisfied?
For further good practices have a look at our review guidelines.
Edited by Alexander Schlemmer
Merge request reports
Activity
assigned to @salexan
!214 (merged) must be merged first!
added 1 commit
- f17c6102 - TST: fixed tests due to changes to rocrate feature
requested review from @florian
added 6 commits
-
dd3f75bf...3c836b10 - 5 commits from branch
dev
- 0186c0ee - Merge branch 'dev' into f-fix-rocrate
-
dd3f75bf...3c836b10 - 5 commits from branch
Please register or sign in to reply