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.
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
- Resolved by Alexander Schlemmer
- Resolved by Alexander Schlemmer
added 8 commits
-
0186c0ee...d23e9e81 - 6 commits from branch
dev
- 9103d699 - Merge branch 'dev' into f-fix-rocrate
- fcddbe7e - TST: made test_zipfile_minimal more general
-
0186c0ee...d23e9e81 - 6 commits from branch
added 1 commit
- 2c2d7119 - DOC: added a comment to child generation behavior in rocrate converter
enabled an automatic merge when all merge checks for 2c2d7119 pass
aborted the automatic merge because the source branch was updated. Learn more.
added 2 commits
mentioned in commit d029a263
mentioned in merge request !214 (merged)