Skip to content

Finish changes related to schema registry for all modules #315

Description

@TeresiaOlsson

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions