-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from pydiverse/pre-commit
Improve pre-commit setup
- Loading branch information
Showing
23 changed files
with
1,258 additions
and
5,971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @pydiverse/code-owners | ||
* @pydiverse/code-owners |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,18 @@ on: | |
jobs: | ||
lint: | ||
name: Pre-commit Checks | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Pixi | ||
uses: prefix-dev/[email protected] | ||
with: | ||
environments: py310 | ||
|
||
- name: Linting - Run pre-commit checks | ||
run: pixi run postinstall && pixi run pre-commit run -a --color=always --show-diff-on-failure | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1 | ||
- name: Install repository | ||
# needed for generate-col-ops hook | ||
run: pixi run postinstall | ||
- name: pre-commit | ||
run: pixi run pre-commit run -a --color=always --show-diff-on-failure | ||
|
||
test: | ||
name: pytest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,68 @@ | ||
exclude: ^.pixi$ | ||
repos: | ||
- repo: local | ||
hooks: | ||
# ensure pixi environments are up to date | ||
# workaround for https://github.com/prefix-dev/pixi/issues/1482 | ||
- id: pixi-install | ||
name: pixi-install | ||
entry: pixi install -e default | ||
language: system | ||
always_run: true | ||
require_serial: true | ||
pass_filenames: false | ||
- id: generate-col-ops | ||
name: generate-col-ops | ||
language: system | ||
entry: python generate_col_ops.py | ||
entry: pixi run python generate_col_ops.py | ||
types: [python] | ||
pass_filenames: false | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.5.7 | ||
hooks: | ||
# ruff | ||
- id: ruff | ||
name: ruff | ||
entry: pixi run ruff check --fix --exit-non-zero-on-fix --force-exclude | ||
language: system | ||
types_or: [python, pyi] | ||
require_serial: true | ||
- id: ruff-format | ||
name: ruff-format | ||
entry: pixi run ruff format --force-exclude | ||
language: system | ||
types_or: [python, pyi] | ||
require_serial: true | ||
# mypy | ||
# - id: mypy | ||
# name: mypy | ||
# entry: pixi run mypy | ||
# language: system | ||
# types: [python] | ||
# require_serial: true | ||
# taplo | ||
- id: taplo | ||
name: taplo | ||
entry: pixi run taplo format | ||
language: system | ||
types: [toml] | ||
# pre-commit-hooks | ||
- id: trailing-whitespace-fixer | ||
name: trailing-whitespace-fixer | ||
entry: pixi run trailing-whitespace-fixer | ||
language: system | ||
types: [text] | ||
- id: end-of-file-fixer | ||
name: end-of-file-fixer | ||
entry: pixi run end-of-file-fixer | ||
language: system | ||
types: [text] | ||
- id: check-merge-conflict | ||
name: check-merge-conflict | ||
entry: pixi run check-merge-conflict --assume-in-merge | ||
language: system | ||
types: [text] | ||
# typos | ||
- id: typos | ||
name: typos | ||
entry: pixi run typos --force-exclude | ||
language: system | ||
types: [text] | ||
require_serial: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ build: | |
sphinx: | ||
configuration: docs/source/conf.py | ||
formats: | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ reference/api | |
:hidden: | ||
changelog | ||
license | ||
license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
```{literalinclude} ../../LICENSE | ||
:language: none | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# ruff: noqa: A004 | ||
|
||
from __future__ import annotations | ||
|
||
from ._internal.pipe.functions import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters