Skip to content
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

Python style and best practices #70

Open
5 tasks
mjd3 opened this issue May 12, 2022 · 1 comment
Open
5 tasks

Python style and best practices #70

mjd3 opened this issue May 12, 2022 · 1 comment
Labels
enhancement New feature or request low-priority

Comments

@mjd3
Copy link
Collaborator

mjd3 commented May 12, 2022

  • Use python properties instead of get_x functions
    • We have a lot of functions in aws.py that use get_x (and corresponding calls to y.get_x()) for attributes that should be properties of the class. These should be changed to use the @property decorator and @x.setter (if not readonly).
  • All internal variables should be prefixed with _ (as in, self._x).
  • Abstract base classes should have separate files from their derived classes (e.g., AWS implementation of CloudInstance)
  • Replace string concatenations using + with f-strings
  • Replace print with logging where possible
@mjd3 mjd3 changed the title Use python properties instead of get_x functions Python style and best practices May 12, 2022
@mjd3 mjd3 added enhancement New feature or request low-priority labels May 12, 2022
@SimeonOA
Copy link
Collaborator

Check for Python Style guide/ checker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low-priority
Projects
None yet
Development

No branches or pull requests

2 participants