Skip to content
Snippets Groups Projects

Fix issues in rocrate support

Merged Alexander Schlemmer requested to merge f-fix-rocrate into dev

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.

#191 (closed)

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading