xai4space / meteors

Package for Explanations of Remote Sensing Imaginery
https://xai4space.github.io/meteors/
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

precommits #4

Closed Fersoil closed 3 months ago

Fersoil commented 3 months ago

solve precommit issues

workflows to include:

it is to decide whether will I use mypy, it could be useful, but produces unfixable errors

Fersoil commented 3 months ago

@WolodjaZ ruff reports errors if created any fixes. imho should inform user about the changes, but fix the code without throwing errors

Fersoil commented 3 months ago

Reopening again, since the issue is still not fixed. It seems that the problem is also with the pre-commit hooks, which are run before the ruff formatter.

I guess that the best solution is to remove the code formatting hooks from https://github.com/pre-commit/pre-commit-hooks.

Fersoil commented 3 months ago

Additional remark on pre-commits: It is somehow irritating that by default precommit fail if it makes any changes. Linked thread with this topic: https://stackoverflow.com/questions/58398995/black-as-pre-commit-hook-always-fails-my-commits

WolodjaZ commented 3 months ago

The authors mention that this is desired way of using recommits as developer always needs to check the changes that for example formatters suggest. But I agree that this kinda sucks in CI and I will think about best solution for this case.

WolodjaZ commented 3 months ago

Interesting discussion @Fersoil