-
-
Notifications
You must be signed in to change notification settings - Fork 28
fix/mutable_config #13
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
Conversation
makes self.config_core a property, ensures we always get the latest mycroft.conf Configuration is a singleton, keeps an internal cache and reacts to bus events. This does not repeatedly read from disk
makes self.config_core a property, ensures we always get the latest mycroft.conf Configuration is a singleton, keeps an internal cache and reacts to bus events. This does not repeatedly read from disk
|
this one stays on hold, testing in alpha release revealed that some downstreams are assigning to some variables that become properties with this PR. this is a breaking change that warrants further discussion. I still think this is a good change, but if its breaking then maybe its also a chance to further improve some things so it is only a breaking change once.... |
NeonDaniel
left a comment
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.
These changes will require some manual testing on my part (probably after 0.0.2 release). This breaks code that imports and overrides any of these variables that are now properties; following semver, these changes would constitute ovos-core 1.0.0
| return config.get("url") | ||
|
|
||
| @property | ||
| def version(self): |
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.
What is this the version of, the local instance or the remote server? (basically asking if remote settings will override this setting)
| self._loaded = MonotonicEvent() | ||
| self.load_services() | ||
|
|
||
| @property |
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 has the potential of being a breaking change like the same change in MycroftSkill was, though I don't think this one affects Neon
| # Create Message Bus Client | ||
| self.bus = MessageBusClient() | ||
|
|
||
| @property |
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.
Same as above; these were exposed variables, so custom enclosures may have overridden them
|
I will also want to toy with them, but for the other reason! I am very excited about these functions 🤓 |
|
replaced by #105 |
makes
self.config_corea property, ensures we always get the latest mycroft.confConfigurationis a singleton, keeps an internal cache and reacts to bus events. This does not repeatedly read from diskthis is particularly relevant in the
self.locationproperty, once PHAL is implemented it will also solve the associated TODOit is also relevant for
self.lang, the hypothetical future algorithm to switch mycroft language on the fly will need thisrelevant snippet from
MycroftSkillclassrelated issues: