This is a parent issue for finishing the changes related to PR #279 for the rest of the codebase.
Until that PR has been merged in it is best to branch from schema-registry-rf for making PRs for the subissues. Examples of the required changes can be found in that branch by looking at RFTransmitter and RFPlant.
The goal is for all modules:
- Remove the ConfigModel + inherit from DynamicValidation instead.
- Add @register_schema decorator to the class to register it in the schema registry.
Things to consider:
- For classes that inherit from
Element the __repr__ is dynamically generated from public attributes and properties. If the class has properties that you don't want to include you can exclude them by adding a specific __repr__ in the class and use exclude. See how it is done in the other branches.
- If the pytests are stuck they might be in an recursive loop because of this. You need to check so no properties have an error message which calls
str(self). If so, change it to str(self.name) to avoid the recursion.
The Accelerator needs to be done last and at that point it should be possible to change the default value of validate to True without getting warnings of missing classes in the registry that are skipped during the validation.
This is a parent issue for finishing the changes related to PR #279 for the rest of the codebase.
Until that PR has been merged in it is best to branch from
schema-registry-rffor making PRs for the subissues. Examples of the required changes can be found in that branch by looking atRFTransmitterandRFPlant.The goal is for all modules:
Things to consider:
Elementthe__repr__is dynamically generated from public attributes and properties. If the class has properties that you don't want to include you can exclude them by adding a specific__repr__in the class and use exclude. See how it is done in the other branches.str(self). If so, change it tostr(self.name)to avoid the recursion.The
Acceleratorneeds to be done last and at that point it should be possible to change the default value ofvalidatetoTruewithout getting warnings of missing classes in the registry that are skipped during the validation.