Closed jwallwork23 closed 2 months ago
I've never done this before so I googled today. It seems like the best practice is to use ruff (https://github.com/astral-sh/ruff), and enable black, flake8 and isort through it, as it is 10-100x faster according to their github. This would all be set in pyproject
, so it fits in well with your recent pull requests that expand pyproject
. Then we could incorporate the settings that we have in .flake8
too.
What do you think @jwallwork23? If you agree with this I will wait for #155 to get merged and do this. Otherwise I can just add isort to the pre-commit config file and leave the rest as it is.
@ddundo Thanks for looking into this. I've heard people talk about ruff but haven't used it myself. I guess if it allows us to put all the config into the pyproject.toml
file then that sounds like a good way to go!
Note that rather than waiting you could alternatively open a PR whose target branch is 148_pyproject
(the one associated with #155) rather than main
. Up to you, I don't mind which order they happen.
Note that rather than waiting you could alternatively open a PR whose target branch is
148_pyproject
(the one associated with #155) rather thanmain
. Up to you, I don't mind which order they happen.
Makes sense! I just did that :)
Completed in #155.
Perhaps we should (in a separate issue) organise imports manually or e.g. add isort to pre-commit?
_Originally posted by @ddundo in https://github.com/mesh-adaptation/goalie/pull/161#discussion_r1564863797_