NOAA-GSL / ExascaleWorkflowSandbox

Other
2 stars 2 forks source link

Need linter for enforcing proper PEP8 Python style compliance #60

Closed christopherwharrop-noaa closed 7 months ago

christopherwharrop-noaa commented 7 months ago

There is currently no linting of Chiltepin code to ensure that all contributions comply with the PEP 8 style guidelines. The CI does not check for style in any capacity.

The use of flake8 should be incorporated into the chiltepin environment, both for containers and for on-prem HPC systems so that users can use it to validate the coding style of their contributions. Additionally, flake8 should be invoked in the CI to ensure correct style is enforced.

For Spack environments, both in the container and in on-prem install scripts, flake8 can be installed by adding the py-flake8 package to the Spack environment.

It could, in principle, also be added via python -m pip install flake8. For the Ubuntu Github runner environment, it should be researched which method of installation is best.

The CI step for checking style should precede any building of containers or running of other tests, if possible. That will save time by ensuring style failures get fixed before running more time consuming steps.

NaureenBharwaniNOAA commented 7 months ago

Address all of the linting problems that come up after implementing the linter.

Do the linting first before time consuming operations.

Look into adding black/isort, an automatic tool for Python and will auto format them/tell you where the issues are.

NaureenBharwaniNOAA commented 7 months ago

Closing this one out, for some reason this wasn't closed when I merged my PR.