rsmtool icon indicating copy to clipboard operation
rsmtool copied to clipboard

Pre commit

Open mulhod opened this issue 5 years ago • 8 comments

Introducing pre-commit into the workflow. I have tried to segregate my commits into those that add/change config files and those that apply changes to source files that had flake8 issues, isort issues, etc.

One other big change here is moving the development dependencies into a separate file. This will allow the Conda/pip packages to be leaner with respect to dependencies and it would also enable things like:

pip install -e .[dev]

This would install rsmtool along with all of its dependencies and extra development dependencies.

At this point, this is just a draft PR. ~~I hope the build works, but I'm not confident it will.~~

mulhod avatar Dec 30 '20 17:12 mulhod

If you want to review this, I highly recommend stepping through the commits. The number of changed files is very high.

mulhod avatar Dec 30 '20 17:12 mulhod

Coverage Status

Coverage remained the same at 93.047% when pulling c1a1be86ce07f25940c68ad43ebd9d7b1a0521cb on pre-commit into ce963bb70a41f72e38d15a2401658f752a42e1a3 on main.

coveralls avatar Dec 30 '20 17:12 coveralls

I will add an exclusion for the svg files for things like adding EOF space, etc.

mulhod avatar Dec 30 '20 17:12 mulhod

I'm checking on the documentation now. I had built it to at least see my changes and things looked fine. But I will check more pages that had changes.

Excluding svg files from the reformatting checks reduced the number of changed files quite a bit, so hopefully it's easier to review.

mulhod avatar Dec 30 '20 18:12 mulhod

Hmm, one other thing, is this isort configuration also picked up by the isort sublime plugin? And by the flake8 plugin as well?

desilinguist avatar Dec 30 '20 18:12 desilinguist

Hmm, one other thing, is this isort configuration also picked up by the isort sublime plugin? And by the flake8 plugin as well?

Yes, according to the documentation I read about the plugin, it picks up the pyproject.toml file.

mulhod avatar Dec 30 '20 18:12 mulhod

I went through a lot of changes in the documentation and could not find any cases that affected the result.

mulhod avatar Dec 30 '20 19:12 mulhod

Consider not recommending the isort plugin OR getting rid of the isort hook (and potentially others).

mulhod avatar Dec 30 '20 19:12 mulhod