Change to pydantic model based validation of the system config file
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 insrc/swatch/exceptions.py
which handles theValidationError
generated by pydantic for simplified user readable error message. - Minimal updates to
tests/config/test_parse_parameter_file__.py
andtests/config/test_parse_system_file__.py
such that the new tests are compatible with incoming changes. - Functions
expand_link_id()
andparse_index_list_string()
changed to corresponding internal functions_expand_link_id()
and_parse_index_list_string()
. The test function for these were subsequently changed totest__<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
Activity
Filter activity
requested review from @tsw
added 1 commit
- 32dd2509 - Pydantic based config validation. New exception handler for ValidationError....
added 3 commits
-
32dd2509...8f492f69 - 2 commits from branch
master
- 2e4ba57a - Pydantic based config validation. New exception handler for ValidationError....
-
32dd2509...8f492f69 - 2 commits from branch
added 7 commits
-
774983c8...a183bf55 - 3 commits from branch
master
- 0c3988b3 - Pydantic based config validation. New exception handler for ValidationError....
- 01a43b0f - Recommiting stash
- dbf6d171 - Refine descriptions and error messages
- d025357e - Fix formatting
Toggle commit list-
774983c8...a183bf55 - 3 commits from branch
enabled an automatic merge when all merge checks for d025357e pass
mentioned in commit 645ff6ca
Please register or sign in to reply