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

Start enforcing pre-commit? #45

Open
soxofaan opened this issue Oct 17, 2024 · 1 comment · May be fixed by #46
Open

Start enforcing pre-commit? #45

soxofaan opened this issue Oct 17, 2024 · 1 comment · May be fixed by #46

Comments

@soxofaan
Copy link
Contributor

I added a pre-commit config pretty early in June to get some basic static code quality management in place. At the moment using pre-commit is optional (opt-in) for developers and I noticed that quite some code style issues are slipping in the repo

e.g. after running pre-commit run --all-files to fix various issue, I get these diff stats currently:

$ git diff --stat 
 algorithm_catalog/max_ndvi_composite.json          |  11 +-
 .../max_ndvi_composite_description.md              |  10 +-
 benchmark_scenarios/max_ndvi_composite.json        |   4 +-
 benchmark_scenarios/worldcereal.json               |  15 +-
 openeo_udp/examples/max_ndvi_composite/generate.py |  84 +++++---
 .../max_ndvi_composite/max_ndvi_composite.json     |   2 +-
 openeo_udp/worldcereal_inference.json              |   6 +-
 openeo_udp_cost_profiling/utils.py                 | 220 ++++++++++++---------
 qa/unittests/tests/test_algorithm_catalog.py       |   5 +-
 9 files changed, 212 insertions(+), 145 deletions(-)

While I understand that playing pedantic code style police is not the point of this project, I still think this project plays an exemplary role in the ecosystem and we should set some bar related to code quality and give nice and consistent examples.

I think we can start with running a pre-commit check as github action to flag new issues

@soxofaan soxofaan linked a pull request Oct 17, 2024 that will close this issue
soxofaan added a commit that referenced this issue Oct 17, 2024
@soxofaan soxofaan linked a pull request Oct 17, 2024 that will close this issue
@soxofaan
Copy link
Contributor Author

I already addressed the reported issues on main branch and created PR #46 to add it as github action on PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant