-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load schemas dynamically #1135
Load schemas dynamically #1135
Conversation
core unit tests are currently broken because of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Happy to have this also for indicators and entities in this PR too. The field validators should go in another one IMHO.
Also, wdyt about merging all observables into 1 file (like indicators and entities)? having one line per file is weird... (also in another PR to keep changes clean)
Indicators and entities will be part of this PR as well.
The problem with field validator is that's not possible to keep the current implementation as it's breaking
I do not have a strong opinion on this. However, I find it faster to know what is already defined just by browsing the folder rather than reading the code. |
Re: validation - Gotcha. Then let's bring the validation changes here Let's keep the one-file-per-obs type in that case. We should still (at some point) also do the same for entities / indicators, just to be consistent. |
This PR adds the concept of private schemas. Observables, entities and indicators are dynamically registered. Loading is implemented in
core.schemas.__init__.py
. It also automatically extends each type enums.Types definition are based on filename.