Skip to content

CI make some more hooks manual #50188

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
with:
extra_args: --verbose --all-files

docstring_typing_pylint:
name: Docstring validation, typing, and pylint
docstring_typing_manual_hooks:
name: Docstring validation, typing, and other manual pre-commit hooks
runs-on: ubuntu-22.04
defaults:
run:
Expand Down
31 changes: 25 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
minimum_pre_commit_version: 2.15.0
exclude: ^LICENSES/|\.(html|csv|svg)$
# reserve "manual" for mypy and pyright
default_stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
# reserve "manual" for relatively slow hooks which we still want to run in CI
default_stages: [
commit,
merge-commit,
push,
prepare-commit-msg,
commit-msg,
post-checkout,
post-commit,
post-merge,
post-rewrite
]
ci:
autofix_prs: false
repos:
Expand Down Expand Up @@ -34,9 +44,11 @@ repos:
- id: debug-statements
- id: end-of-file-fixer
exclude: \.txt$
stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg,
post-checkout, post-commit, post-merge, post-rewrite]
- id: trailing-whitespace
stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg,
post-checkout, post-commit, post-merge, post-rewrite]
- repo: https://github.com/cpplint/cpplint
rev: 1.6.1
hooks:
Expand All @@ -46,7 +58,13 @@ repos:
# this particular codebase (e.g. src/headers, src/klib). However,
# we can lint all header files since they aren't "generated" like C files are.
exclude: ^pandas/_libs/src/(klib|headers)/
args: [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
args: [
--quiet,
'--extensions=c,h',
'--headers=h',
--recursive,
'--filter=-readability/casting,-runtime/int,-build/include_subdir'
]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
Expand Down Expand Up @@ -107,6 +125,7 @@ repos:
hooks:
- id: yesqa
additional_dependencies: *flake8_dependencies
stages: [manual]
- repo: local
hooks:
# NOTE: we make `black` a local hook because if it's installed from
Expand Down Expand Up @@ -214,7 +233,6 @@ repos:
exclude: ^pandas/tests/extension/base/base\.py
- id: pip-to-conda
name: Generate pip dependency from conda
description: This hook checks if the conda environment.yml and requirements-dev.txt are equal
language: python
entry: python scripts/generate_pip_deps_from_conda.py
files: ^(environment.yml|requirements-dev.txt)$
Expand Down Expand Up @@ -311,6 +329,7 @@ repos:
files: ^pandas
exclude: ^(pandas/tests|pandas/_version.py|pandas/io/clipboard)
language: python
stages: [manual]
additional_dependencies:
- autotyping==22.9.0
- libcst==0.4.7