-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MAINTENANCE] use invoke for common contrib/dev tasks #5506
[MAINTENANCE] use invoke for common contrib/dev tasks #5506
Conversation
👷 Deploy request for niobium-lead-7998 pending review.Visit the deploys page to approve it
|
@cla-bot check |
ec7a864
to
b132afe
Compare
59bb2e2
to
feea7e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice! I have some questions inline. Also, since you are a core developer you can clone and branch in the main repo instead of forking it.
d95ee1a
to
a848470
Compare
a848470
to
619ec6d
Compare
2de8b30
to
2a60106
Compare
Linting with `isort` MUST occur from a virtual environment that has all required packages installed, and pre-commit uses the virtual environment from which it was installed, whether or not that environment is active when making the commit. | ||
|
||
This means you must ensure you have activated a virtual environment that has all development requirements installed **before running `pre-commit install`**. | ||
|
||
```console | ||
pre-commit uninstall | ||
# ACTIVATE ENV, e.g.: conda activate pre_commit_env OR source pre_commit_env/bin/activate | ||
pip install -r requirements-dev.txt | ||
pre-commit install --install-hooks | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These steps are no longer necessary as of isort
5 and is the reason tools like seed-isort
were deprecated.
https://github.com/asottile-archive/seed-isort-config#deprecated
https://pycqa.github.io/isort/docs/configuration/pre-commit.html#seed-isort-config
2a60106
to
3ddd388
Compare
44f9544
to
c52dff3
Compare
c52dff3
to
00ea47e
Compare
As discussed, the intended use-cases for click and Although invoke can be used in the same way and click CAN be used to run common dev tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it... thank you very much for introducing these changes @Kilo59
will add back in dedicated typing PR
634664b
to
d1969bc
Compare
Changes proposed in this pull request:
Combing a few developer/contributor quality of life improvements in this PR, but we may want to break these up into separate PRs before merging.I've moved anything not related to the
invoke
task file to other PR will be opening those shortly.Creating amoved -> [MAINTENANCE] move tool config to pyproject.toml - fork #5525pyproject.toml
file to define the build system ge uses and start centralizing tool config to it (black, isort, pytest, etc.)]Begin to use the
invoke
python command line task runner for running common developer tasks. Define a set of starter tasks like linting, formatting, type checking, etc. These can serve as a guide for future tasks. By providing easy to use and understand generic command line tasks likelint
,fmt
etc. we make it easy for new contributors to get up and running quickly without having to know anything about the details of our particular tooling. This also makes it easier to change the underlying tools and/or configuration without breaking anyones workflow.But contributors are still free to use each of these tools directly.
Alternatives to
invoke
: Make, duty, Pipfile scripts.Building on the excellent work of @cdkini begin to fully type-check select ge modules.moved -> [MAINTENANCE] begin static type-checking #5540Enforce our pre-commit hooks in the CI (WIP) - use pre-commit ci instead of azure?
moved -> [MAINTENANCE] enforce pre-commit in ci #5526TLDR Summary
add pyproject.toml file and move tool config to itmove isort configmove pytest configinvoke
task runner and define common developer tasksadd check-json pre-commit hookupdate CI to enforce pre-commit hooksbegin "real" mypy static type checking of select modulesfix all typing errors on select modulesDefinition of Done
Please delete options that are not relevant.
I have added unit tests where applicable and made sure that new and existing tests are passing.I have run any local integration tests and made sure that nothing is broken.