john-bodley opened a new pull request #10499: URL: https://github.com/apache/incubator-superset/pull/10499
### SUMMARY Somewhat of a proof-of-concept this PR leverages `pip-compile-multi` to define the various Python dependencies in an exhaustive and pinned manner (not unlike `pip-tools`; `pip-compile-multi` runs `pip-tools` under the covers) for various environments. Per the updated documentation upgrading Python packages should be fairly trivial as one merely needs to run the following: ``` pip-compile-multi pre-commit autoupdate --freeze ``` Additionally since there is some overlap between `tox` and `pre-commit` this PR moves `mypy` et al. to `pre-commit` and adds a `pre-commit` environment to `tox` which replaces `isort`, `mypy`, etc. adhering to the DRY principle. Unlike the Git hook the `tox` environment checks all files in the repo (and not just those that have changed) and thus additional configuration was added to exclude certain modules (Alembic migrations) or duplicate names (`superset/bin/superset`). This PR picks up a number of changes as it seems like some of the `pre-commit` hooks haven't been run in some time nor some of the `mypy` checks. Note it seems prudent that we try to leverage `tox` from within the GitHub workflows to ensure consistency between local and remote CI. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TEST PLAN CI. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Changes UI - [ ] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
