Replies: 1 comment 8 replies
-
In the past, our contributors have complained that they find the many different CI services confusing, so I'm not sure if we should add yet another service. The automatic formatting service offered by pre-commit.ci may not be the best choice for us because it will lead to merge conflicts between people's local branch and their branch on GitHub. Not everyone is comfortable fixing such conflicts.
This has been fixed some time ago, see google/yapf#744.
You're welcome to do that and make some pull requests.
The main advantage of using Codacy is that the linting results are presented on a nice-looking website instead of as terminal output, which may be intimidating for some.
Maybe you could bring that up at the upcoming workshop at SMHI ESMValGroup/Community#98 and try to find consensus there. |
Beta Was this translation helpful? Give feedback.
-
In #3170, I suggested updating the GitHub workflow to perform all / some of the pre-commit checks, either by adding
pre-commit run --all-files
as a CI step, see Usage in continuous integration, or by usingpre-commit.ci
, see pre-commit.ci example.I have been made aware of an issue in ESMValTool where the pre-commit hooks (in this case
yapf
) causes a conflict withcodacy
;codacy
(specificallypydocstyle
) requires1 blank line required after class docstring (found 0) (D204)
, whereasyapf
is the opposite.Would it be worth:
black
(see Automated formatting #2161)?I am keen to simplify / streamline this as much as possible before our scientists start converting AutoAssess metrics to ESMValTool in earnest, to minimise frustrations related to issues similar to the one described above.
Tagging @ESMValGroup/technical-lead-development-team and @valeriupredoi directly 😊
Beta Was this translation helpful? Give feedback.
All reactions