Conversation
Also add `PullRequest` to `ignore_words.txt`
Codecov Report
@@ Coverage Diff @@
## main #182 +/- ##
=======================================
Coverage 97.22% 97.22%
=======================================
Files 8 8
Lines 648 648
Branches 90 90
=======================================
Hits 630 630
Partials 18 18 |
Currently, this is only use for configuring linters and formatters (no build file specifications are set). Configuration options for `black` and `pydocstyle` are added here in this commit.
This supports conda test/build environments.
Make this match settings specififed in `Makefile`.
All checks are placed in appropriate config files. Test runner scripts point to these so that there exists a single source of truth for all configurations and that the tests performed across systems is the same. This may be adjusted, of course, if different settings must be used on a per-system basis.
This package supports reading `pyproject.toml`, which is required for some of our tests.
fd280e3 to
a914a24
Compare
`pre-commit` is known to override behavior from config files in certain instances. This commit fixes known issues for: - `isort` - `black` - `mypy` - `pydocstyle` For relevant details, see: isort: + https://jugmac00.github.io/blog/isort-and-pre-commit-a-friendship-with-obstacles/ + PyCQA/isort#885 black: + psf/black#1584 mypy/pydocstyle: + python/mypy#4008 (comment) + https://pre-commit.com/#hooks-pass_filenames
d040a4d to
a07f259
Compare
|
@pyvista/developers This is ready for review. Can you please review? (I will perform style fixes in another PR after this is approved). |
|
@adeak @akaszynski @tkoyama010 Actually, the existing formatting errors will cause tests to fail. Please let me know if you would like me to (a) fix them here, or (b) ignore the offending files here and fix them in another PR. |
I vote ignore BTW: Good work implementing the pre-commit. Remove |
Thanks @akaszynski . I'm glad I took your and @adeak 's suggestion. Not only is this cleaner, but I actually learned a lot! |
Ignore linting errors in source code in this PR. The purpose of this PR is to update linting tools. A future PR will correct the errors. This is done to separate concerns.
7220551 to
7162d28
Compare
|
@akaszynski All checks have passed. |
akaszynski
left a comment
There was a problem hiding this comment.
LGTM. Thanks, as a followup we'll need to work on mypy.
You got it. I've been practicing 😉 . I'll be sure to link this PR to the next one that cleans up the linting errors we just ignored. |
|
Sorry, I got here too late. Nice work @adam-grant-hendry! |
The purpose of this PR is a series of formatting changes to bring
pyvistaqtformatting tools up to date:Configuration Changes
.flake8and.codespellrcconfiguration files, updatingignore_words.txttoo (bd8914a)pyproject.toml(ec25ae7)blackandpydocstyleconfiguration options topyproject.toml(matching options inMakefileand those inpyvistarepo and adding corresponding support in.isort.cfg)pre-commit(including.pre-commit-config.yamlfile) (e041a8b)mypy,isort,black, andpydocstylewithpre-commit(a07f259)environment.ymlto includemypydependency (matchingpiprequirements) (ae09730).pylintrcto match files ignored inMakefile(c68e16d)Makefileandpre-commit, placing all options in config files and pointing to those. This ensures the same checks happen across different systems and all config changes happen in one place as a single source of truth. (31af1e5)tomlto requirements,environment.yml, andci/azure-pipelines.yml(supports reading configurations frompyproject.toml) (a914a24)