gammasim / simtools

Tools and applications for the Simulation System of the CTA Observatory.
https://gammasim.github.io/simtools
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Step 3 of ruff integration: add ruff to CI (plus cleanup of different linter stages) #943

Closed GernotMaier closed 1 month ago

GernotMaier commented 1 month ago

Integrate ruff as linter and add it to pre-commit.

Cleanup of linters, see #942.

Pre-commit changes:

Github action changes:

Others

Closes #942.

GernotMaier commented 1 month ago

@VictorBarbosaMartins - please review only after #941 is merged to main (otherwise you review the same changes again)

VictorBarbosaMartins commented 1 month ago

I think we should talk to other groups in DPPS to check what is their approach in this regard. Perhaps repeating checks in the pre-commit hooks and ci linters is not a bad idea.

GernotMaier commented 1 month ago

I think we should talk to other groups in DPPS to check what is their approach in this regard. Perhaps repeating checks in the pre-commit hooks and ci linters is not a bad idea.

Wait - pre-commit is running as linter in CI-linter over all files (this is also how DPPS is doing it). So we are still using all the tools and do a full linting.

GernotMaier commented 1 month ago

Just to make the last point clearer: precommit is running over all files in Ci-linter.yml, see this line: https://github.com/gammasim/simtools/blob/6d10f5bf47956f9722d7a41062a223799944a9f7/.github/workflows/CI-linter.yml#L78

GernotMaier commented 1 month ago

Thanks @VictorBarbosaMartins