forked from CogStack/MedCAT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CU-2tuwdjf Move to an identifier based config (CogStack#257)
* Initial commit with new identifier based config * Fixed issue with saving into json for idconfig * Added support for MetaCat and NER configs with the new identifier based config system as well as a very short test case for new config * New identity based config now allows for creation of new attributes * Now allowing extra attributes for each of the sub-types of the config * Moved the comments within configs to docstrings so IDEs would pick them up and show them as/when needed * Moved identifier based config to regular config package along with tests from a separate file to the main config test file. Removed all remnants of the old config system * Removed necessity of config merging needing dicts * Removed most getitem config operations * Removed unnecessary basemodel checks from new config * Moved some further comments into docsstrings on the config level * Added two new simple tests for legacy (getitem) support as well as the new identifier based methodd * Moved away from Field assignments for config defaults since BaseModel handles new instance initialisation * Added extra tests to make sure all the config keys are available through both the legacy getitem method as well as through the attribute based method * Removed unused code from test * Moved around some things to avoid duplication * Removed (now) irrelevant comments from config * Removed unused enums from config * Added some further docstrings to config class(es) * Being more accurate regarding setitem return type * Removed debug from logged output * Making sure that type validation happens during construction time for configs * Added alternative parser so that {} could be used as an empty set as well as an ampety dictionary when reading from config * Now validating config values when assigning as well * Added new tests for merge and assignment validation * Removed legacy comments * Fixed a few type hinting issues that caused mypy to result in errors * Fixed indentation and blank lines issues within meta cant and transformers ner configs * Added tests that make sure the config hashes change upon change to values as well as that they are consistent for identical configs * Added test that ensures version-specific config stuff doesn't affect the hash * Added pydantic dependency to setup.py * Moved config logger to class attribute * Fixed typo in docsting * Fixed typo in config test * Removed inheritance from object * Added tests for config's parse_config_file method
- Loading branch information
Showing
14 changed files
with
794 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.