-
Notifications
You must be signed in to change notification settings - Fork 182
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
target: store features and options #1504
base: master
Are you sure you want to change the base?
target: store features and options #1504
Conversation
Instead of always having to revert to the configuration for options and features, store both directly in the target object. Also deprecate the setters and getters for both in the configuration object. Reasoning is that setters are not required for this, the YAML configuration should be changed instead. The getters are not required if the options and features are bound to the target which is more intuitive anyway. Signed-off-by: Rouven Czerwinski <[email protected]>
c9e9555
to
c96639e
Compare
@@ -199,6 +199,12 @@ def get_target_option(self, target, name, default=None): | |||
configuration, or if the target can not be found in the | |||
configuration. | |||
""" | |||
warn( |
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.
warn( | |
warnings.warn( |
@@ -224,6 +230,11 @@ def set_target_option(self, target, name, value): | |||
KeyError: if the requested target can not be found in the | |||
configuration | |||
""" | |||
warn( |
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.
warn( | |
warnings.warn( |
@@ -55,6 +55,14 @@ def get_features(self): | |||
return self.config.get_features() | |||
|
|||
def get_target_features(self): | |||
warn( |
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.
warn( | |
warnings.warn( |
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return get_all_features() |
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.
return get_all_features() | |
return self.get_all_features() |
warn( | ||
"get_target_option is deprecated, access the options on the target directly.", | ||
DeprecationWarning, | ||
stacklevel=2, |
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.
Why? This isn't a wrapper method.
warn( | ||
"set_target_option is deprecated, use the YAML configuration instead.", | ||
DeprecationWarning, | ||
stacklevel=2, |
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.
Why? This isn't a wrapper method.
warn( | ||
"use get_all_features instead. For target features, use target.features instead.", | ||
DeprecationWarning, | ||
stacklevel=2, |
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.
Why? This isn't a wrapper method.
Description
Instead of always having to revert to the configuration for options and features, store both directly in the target object. Also deprecate the setters and getters for both in the configuration object.
Reasoning is that setters are not required for this, the YAML configuration should be changed instead. The getters are not required if the options and features are bound to the target which is more intuitive anyway.
Checklist
Closes #704