Skip to content
Snippets Groups Projects

Change to pydantic model based validation of the system config file

Merged Abanti Ranadhir Sahasransu requested to merge ar_pydanticConfigCheck into master

AIM

System config validation changed to pydantic based model validation. A new exception class created to simplify the error messages displayed.

AUXILLARY CHANGES

Associated update to unit tests.

DETAILS

  • All pydantic based models for system configuration included to file src/swatch/stubs.py .
  • Corresponding changes made to src/swatch/config.py to allow pydantic based validation of the system config yaml input file.
  • Requirements for pydantic model enabled in requirements.txt .
  • New exception ConfigValidationError defined in src/swatch/exceptions.py which handles the ValidationError generated by pydantic for simplified user readable error message.
  • Minimal updates to tests/config/test_parse_parameter_file__.py and tests/config/test_parse_system_file__.py such that the new tests are compatible with incoming changes.
  • Functions expand_link_id() and parse_index_list_string() changed to corresponding internal functions _expand_link_id() and _parse_index_list_string() . The test function for these were subsequently changed to test__<FUNCTION_NAME>__() to create a new nomenclature for test functions for internal functions.

CORRESPONDING CODE CHANGES

Requires !116 (merged) . Fixes #40 (closed) .

Edited by Abanti Ranadhir Sahasransu

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