diff --git a/.github/workflows/autoupdate-pre-commit-config.yml b/.github/workflows/autoupdate-pre-commit-config.yml deleted file mode 100644 index 376aa8343c571..0000000000000 --- a/.github/workflows/autoupdate-pre-commit-config.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: "Update pre-commit config" - -on: - schedule: - - cron: "0 7 1 * *" # At 07:00 on 1st of every month. - workflow_dispatch: - -permissions: - contents: read - -jobs: - update-pre-commit: - permissions: - contents: write # for technote-space/create-pr-action to push code - pull-requests: write # for technote-space/create-pr-action to create a PR - if: github.repository_owner == 'pandas-dev' - name: Autoupdate pre-commit config - runs-on: ubuntu-22.04 - steps: - - name: Set up Python - uses: actions/setup-python@v4 - - name: Cache multiple paths - uses: actions/cache@v3 - with: - path: | - ~/.cache/pre-commit - ~/.cache/pip - key: pre-commit-autoupdate-${{ runner.os }}-build - - name: Update pre-commit config packages - uses: technote-space/create-pr-action@v2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - EXECUTE_COMMANDS: | - pip install pre-commit - pre-commit autoupdate || (exit 0); - pre-commit run -a || (exit 0); - COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config" - PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}" - PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config" diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index f6c35decfd30b..0954bf7d9231c 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -17,28 +17,8 @@ env: permissions: contents: read +# pre-commit run by https://pre-commit.ci/ jobs: - pre_commit: - name: pre-commit - runs-on: ubuntu-22.04 - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-pre-commit - cancel-in-progress: true - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Run pre-commit - uses: pre-commit/action@v3.0.0 - with: - extra_args: --verbose --all-files - docstring_typing_manual_hooks: name: Docstring validation, typing, and other manual pre-commit hooks runs-on: ubuntu-22.04 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 366db4337b0e1..e19a74e8a462e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,9 @@ default_stages: [ ] ci: autofix_prs: false + autoupdate_schedule: monthly + # manual stage hooks + skip: [pylint, pyright, mypy, autotyping] repos: - repo: https://github.com/hauntsaninja/black-pre-commit-mirror # black compiled with mypyc @@ -131,7 +134,7 @@ repos: stages: [manual] additional_dependencies: &pyright_dependencies - pyright@1.1.296 - - id: pyright_reportGeneralTypeIssues + - id: pyright # note: assumes python env is setup and activated name: pyright reportGeneralTypeIssues entry: pyright --skipunannotated -p pyright_reportGeneralTypeIssues.json --level warning @@ -148,7 +151,7 @@ repos: pass_filenames: false types: [python] stages: [manual] - - id: stubtest + - id: mypy # note: assumes python env is setup and activated # note: requires pandas dev to be installed name: mypy (stubtest)