Skip to content
Snippets Groups Projects

F json schema datamodel

Merged Florian Spreckelsen requested to merge f-json-schema-datamodel into dev

Summary

For https://gitlab.indiscale.com/caosdb/customers/leibniz-zmt/management/-/issues/17 and https://gitlab.indiscale.com/caosdb/customers/leibniz-zmt/management/-/issues/24. A rudimentary parser of datamodels defined in json-schemas is introduced. It is sufficient to create flat datamodels, but it still lacks a lot.

  • inheritance: This will probably require an extension of datamodel itself, so we won't implement it
  • suggested properties: ditto
  • $defs and $ref in json schema
  • Re-use of already defined RTs or Poroperties as List properties
  • Reference properties that are different from the referenced RT. (Although this is possible for list of references)
  • Values
  • The extern keyword from the yaml parser
  • Documentation

Focus

Mainly, a new parser has been introduced. Most changes are actually tests for the new parser.

Test Environment

In principle, the new unit tests and the new integration test are sufficient. You can also use Joscha's ZMT model to verify that the parser actually fulfills the minimal requirement of creating a datamodel for exactly this schema.

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
  • 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
  • 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 spezifications? Are they satisfied?

For further good practices have a look at our review guidelines.

Edited by Timm Fitschen

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
  • Florian Spreckelsen requested review from @daniel

    requested review from @daniel

  • Florian Spreckelsen marked this merge request as draft

    marked this merge request as draft

  • added 1 commit

    • a252ccbf - FIX: Return correct entity in case of already

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Daniel Hornung resolved all threads

    resolved all threads

  • Daniel Hornung added 3 commits

    added 3 commits

    • d757f2b7 - STY: Some style changes.
    • f8574222 - ENH: Validates if the input is a Json Schema.
    • f9165024 - ENH WIP: Makefile with more checks.

    Compare with previous version

  • Daniel Hornung added 1 commit

    added 1 commit

    Compare with previous version

  • added 1 commit

    • 5093428e - DEP: Add jsonschema to requirements

    Compare with previous version

  • Daniel Hornung removed review request for @daniel

    removed review request for @daniel

  • added 39 commits

    • 5093428e...0b26273c - 29 commits from branch dev
    • 87dd3224 - Revert "Revert "Merge branch 'f-extend-yaml-model' into 'dev'""
    • 619c25e6 - Merge branch 'dev' into f-extend-yaml-model
    • ff960e9c - TST: Add unit test for broken value parsing
    • 483cc774 - STY: autopep'd
    • fee161e5 - FIX: Correct parsing of dicts in properties
    • a66f88ba - TST: Add test record to unittest for #72 (closed)
    • 36e27fb0 - MAINT: Disable `role: File` for now in parser
    • e41160a5 - MAINT: Refactor and simplify adding of properties
    • 3b483d65 - DOC: Update integration test setup to new profile name
    • dda6764d - Merge branch 'f-extend-yaml-model' into f-json-schema-datamodel

    Compare with previous version

  • added 2 commits

    • 34da56d4 - TST: Add unit test and testfile for enums
    • 87483f68 - ENH: Implement parsing of enums

    Compare with previous version

  • added 1 commit

    • 8129f953 - ENH: Stringify names of enum elements

    Compare with previous version

  • added 1 commit

    • 41ec62d6 - TST: Extend enum test and add unittest for reference properties

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading