Skip to content

Commit

Permalink
Move pre-commit GitHub action to pre-commit.ci (pyvista#4263)
Browse files Browse the repository at this point in the history
* Using pre-commit official GitHub action

* add pre-commit integration

* Delete pre-commit-update.yml

* Apply suggestions from code review

* Update test_actor.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update CONTRIBUTING.rst

* Update CONTRIBUTING.rst

---------

Co-authored-by: Alex Kaszynski <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 15, 2023
1 parent acfb637 commit 0c03106
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 57 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/pre-commit-update.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/style_docstr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,6 @@ concurrency:
cancel-in-progress: true

jobs:
stylecheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit
run: pre-commit run --all-files

docstringcheck:
runs-on: ubuntu-20.04
steps:
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Integration with GitHub Actions
# See https://pre-commit.ci/
ci:
autofix_prs: false
autoupdate_schedule: weekly

repos:
- repo: https://github.com/psf/black
rev: 23.3.0
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,10 @@ The actual installation of the environment happens before the first commit
following ``pre-commit install``. This will take a bit longer, but subsequent
commits will only trigger the actual style checks.

Even if you are not in a situation where you are not performing or able to
perform the above tasks, you can comment `pre-commit.ci autofix` on a pull
request to manually trigger auto-fixing.

Notes Regarding Image Regression Testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 0c03106

Please sign in to comment.