Skip to content
Snippets Groups Projects

Enable validation in table_json_conversion.convert.to_dict for use in XLSX-converter

Merged I. Nüske requested to merge f-bug-138-validate-table_json_conversion into dev

Summary

Reenables failing validation test. Changes some test data and adds preprocessing to the jsonschema validation.
Addresses #138 (closed) / https://gitlab.indiscale.com/caosdb/customers/dimr/management/-/issues/268

Focus

  • Are the data_schemas an acceptable solution? Were the original schemas automatically generated? Does this necessitate any changes to other code?
  • Allowing nullable properties can also be done in a json schema. The current solution using filtering is more lenient, but in my opinion it might be desirable to at some point switch to using oneof(null, validType) everywhere applicable, to adhere more closely to the standard.
  • I did not find a way to validate the dates properly. A custom TypeChecker does not fit this use case, as we could accept datetimes as string everywhere, but not only when the format contains 'date'. Using a custom FormatChecker also does not work, as the datetime in type:string format:datetime fields already fails on the typecheck. This left filtering as the most convenient solution.

Test Environment

Manual Testing.

Check List for the Authoe

  • 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)
  • Annotations in code (Gitlab comments)

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?
Edited by Daniel Hornung

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
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading