Skip to content
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

build: codify Python requirements #781

Merged
merged 4 commits into from
Jan 30, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install --upgrade pip black==22.3.0 flake8==7.0.0 pytest antlr4-python3-runtime==4.13.2
run: python3 -m pip install -r requirements.txt
- name: Black
run: python3 -m black --diff --check .
- name: Flake8
Expand Down
24 changes: 11 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,27 @@ repos:
hooks:
- id: buf-lint
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
rev: v1.35.1
hooks:
- id: yamllint
args: [-c=.yamllint.yaml]
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.5.0
rev: v9.20.0
hooks:
- id: commitlint
stages: [commit-msg]
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
# Do not enable this check until it can be run locally easily
# See: https://github.com/substrait-io/substrait/issues/771
# - repo: local
# hooks:
# - id: check-substrait-extensions_coverage
# name: Check Substrait extensions and test coverage
# entry: pytest tests/test_extensions.py::test_substrait_extension_coverage
# language: python
# pass_filenames: false
- repo: local
hooks:
- id: check-substrait-extensions_coverage
name: Check Substrait extensions and test coverage
entry: pytest tests/test_extensions.py::test_substrait_extension_coverage
language: python
pass_filenames: false
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
antlr4-python3-runtime==4.13.2
black==24.8.0
flake8==7.0.0
pytest==8.3.4
pyyaml==6.0.2
Loading