-
Notifications
You must be signed in to change notification settings - Fork 23
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
Name things once #50
Name things once #50
Conversation
db55243
to
6c69374
Compare
Codecov Report
@@ Coverage Diff @@
## master #50 +/- ##
==========================================
- Coverage 87.01% 86.91% -0.10%
==========================================
Files 131 131
Lines 7192 7214 +22
Branches 844 844
==========================================
+ Hits 6258 6270 +12
- Misses 671 681 +10
Partials 263 263
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0bdb9ed
to
bf5f855
Compare
a7731f2
to
ce4f865
Compare
df7c526
to
a2cc433
Compare
a2cc433
to
15089b3
Compare
3d7c888
to
2a5e917
Compare
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.
Take everything I say here with a grain of salt (pun intended). Nice to see these changes overall! :)
src/saltfactories/cli/cloud.py
Outdated
from saltfactories.utils import running_username | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
@attr.s(kw_only=True, slots=True) | ||
class SaltCloudFactory(SaltCliFactory): | ||
class SaltCloud(SaltCli): | ||
@staticmethod | ||
def default_config(root_dir, master_id, config_defaults=None, config_overrides=None): |
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.
By being the only config method it implies that it is the default. Since the name of of the method has config in it, defaults and overrides can be inferred to be config. I think this could be simplified to.
def config(root_dir, master_id, defaults, overrides):
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.
Agreed.
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.
Actually, we can't just rename that function, it will shaddow the self.config
dictionary which is the end result of all configure steps.
So, either keep the function name as default_config
or generate_config
?! defaults()
?
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.
Keep it as default_config
:)
from saltfactories.utils import running_username | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
@attr.s(kw_only=True, slots=True) | ||
class SaltCloudFactory(SaltCliFactory): | ||
class SaltCloud(SaltCli): |
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.
Docstrings for the methods on this class would be helpful.
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.
Agreed
15c058e
to
19667c5
Compare
19667c5
to
fe26a62
Compare
fe26a62
to
cb2646a
Compare
This pull request fixes 1 alert when merging cb2646a into 57c903e - view on LGTM.com fixed alerts:
|
🎉 |
No description provided.