Skip to content
Snippets Groups Projects

F json schema datamodel

Merged Florian Spreckelsen requested to merge f-json-schema-datamodel into dev
All threads resolved!

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

Pipeline #21056 passed

Pipeline passed for ff19e295 on f-json-schema-datamodel

Approval is optional

Merged by Florian SpreckelsenFlorian Spreckelsen 3 years ago (Mar 30, 2022 2:06pm UTC)

Merge details

  • Changes merged into dev with 69596c39.
  • Deleted the source branch.

Pipeline #21263 passed

Pipeline passed for 69596c39 on dev

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

  • added 1 commit

    • ddc5284e - ENH: Implement and unit tst list properties

    Compare with previous version

  • added 1 commit

    • 90b046a1 - MAINT: Simplify parsing of atomic datatypes

    Compare with previous version

  • Florian Spreckelsen changed target branch from dev to f-extend-yaml-model

    changed target branch from dev to f-extend-yaml-model

  • added 3 commits

    • 8f1a1506 - FIX: Add missing return
    • ea6cd246 - FIX: Don't use name "1" for test property
    • fd42767a - TST: Add unittest for multiple use of same property

    Compare with previous version

  • added 1 commit

    • de034a6e - ENH: Add "format": "date" for DATETIME properties

    Compare with previous version

  • added 1 commit

    • 9f8c69e3 - ENH: Discard integer enums for now

    Compare with previous version

  • added 1 commit

    • 042ae3c6 - WIP: Begin integration tests for json-schema datamodel parser

    Compare with previous version

  • added 1 commit

    • a94319fe - WIP: Add integration tests for references and enums

    Compare with previous version

  • added 2 commits

    • cdbebd84 - FIX: Set description of referenced RTs in lists
    • 1f0301ed - TST: Finalize integration tests for json-schema datamodel parser

    Compare with previous version

  • Florian Spreckelsen changed the description

    changed the description

  • Florian Spreckelsen marked this merge request as ready

    marked this merge request as ready

  • Florian Spreckelsen marked the checklist item All automated tests pass as completed

    marked the checklist item All automated tests pass as completed

  • Florian Spreckelsen
  • Florian Spreckelsen
  • Florian Spreckelsen
  • Florian Spreckelsen
  • Florian Spreckelsen
  • Florian Spreckelsen
  • Florian Spreckelsen marked the checklist item Up-to-date CHANGELOG.md as completed

    marked the checklist item Up-to-date CHANGELOG.md as completed

  • Florian Spreckelsen marked the checklist item Annotations in code (Gitlab comments) as completed

    marked the checklist item Annotations in code (Gitlab comments) as completed

  • Florian Spreckelsen requested review from @timm

    requested review from @timm

  • Florian Spreckelsen changed the description

    changed the description

  • Florian Spreckelsen deleted the f-extend-yaml-model branch. This merge request now targets the dev branch

    deleted the f-extend-yaml-model branch. This merge request now targets the dev branch

  • added 4 commits

    Compare with previous version

  • Timm Fitschen marked the checklist item I understand the intent of this MR as completed

    marked the checklist item I understand the intent of this MR as completed

  • Timm Fitschen marked the checklist item All automated tests pass as completed

    marked the checklist item All automated tests pass as completed

  • Timm Fitschen
  • Timm Fitschen added 1 commit

    added 1 commit

    • a323f4c0 - TST: add another test for json-schema parser

    Compare with previous version

  • Timm Fitschen marked the checklist item Up-to-date CHANGELOG.md as completed

    marked the checklist item Up-to-date CHANGELOG.md as completed

  • Timm Fitschen marked the checklist item Check: Are there spezifications? Are they satisfied? as completed

    marked the checklist item Check: Are there spezifications? Are they satisfied? as completed

  • Timm Fitschen marked the checklist item In-code documentation and comments are up-to-date. as completed

    marked the checklist item In-code documentation and comments are up-to-date. as completed

  • Timm Fitschen marked the checklist item The test environment setup works and the intended behavior is as completed

    marked the checklist item The test environment setup works and the intended behavior is as completed

  • Timm Fitschen approved this merge request

    approved this merge request

  • added 8 commits

    Compare with previous version

  • added 1 commit

    • 66749a65 - ENH: Raise error when `type` is missing

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Florian Spreckelsen resolved all threads

    resolved all threads

  • added 1 commit

    Compare with previous version

  • mentioned in commit 69596c39

  • Please register or sign in to reply
    Loading