From 986f6849d60613bd52102fda4b1bcc1e3f9a0d81 Mon Sep 17 00:00:00 2001 From: Victor Barua Date: Wed, 29 Jan 2025 12:22:23 -0800 Subject: [PATCH 1/4] build: add requirements.txt for Python dependencies --- requirements.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..779dc8252 --- /dev/null +++ b/requirements.txt @@ -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 \ No newline at end of file From 808db836e2804a2cf1e765331e5f4893431d0861 Mon Sep 17 00:00:00 2001 From: Victor Barua Date: Wed, 29 Jan 2025 12:48:14 -0800 Subject: [PATCH 2/4] build: set .python-version --- .python-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..3a4f41ef3 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13 \ No newline at end of file From 1396fa6c0a9a10ecd28c1528ee4c41359d0354b4 Mon Sep 17 00:00:00 2001 From: Victor Barua Date: Wed, 29 Jan 2025 12:49:05 -0800 Subject: [PATCH 3/4] build: update pre-commit config --- .pre-commit-config.yaml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 873b0e226..a96c56bf0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 From 0bbe21cf3fd6b0bfe0bcd7834cdb9c7fd73cda3a Mon Sep 17 00:00:00 2001 From: Victor Barua Date: Wed, 29 Jan 2025 13:18:04 -0800 Subject: [PATCH 4/4] ci: use requirements.txt when install Python dependencies --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5ed22abbc..da8751884 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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