From 163261f0d08e7fb0b850f4518e7386feeee7cffa Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Tue, 16 Jul 2024 21:32:57 +0200 Subject: [PATCH 1/3] install venv for linting --- .github/workflows/python_build.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python_build.yml b/.github/workflows/python_build.yml index bc2f20cc9a..d3f8902ada 100644 --- a/.github/workflows/python_build.yml +++ b/.github/workflows/python_build.yml @@ -15,22 +15,30 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.8 - - - name: Check Python - run: | - pip install ruff black mypy types-dataclasses typing-extensions - make check-python + python-version: 3.10 - - name: Install minimal stable with clippy and rustfmt + - name: Install latest nightly uses: actions-rs/toolchain@v1 with: - profile: default toolchain: stable override: true + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v2 + + - name: Build and install deltalake + run: | + pip install virtualenv + virtualenv venv + source venv/bin/activate + make develop + + - name: Check Python + run: make check-python - name: Check Rust run: make check-rust From d77b448c6f5f261dd8afa31b81112ffc9676692d Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Tue, 16 Jul 2024 21:34:33 +0200 Subject: [PATCH 2/3] install venv for linting --- .github/workflows/python_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_build.yml b/.github/workflows/python_build.yml index d3f8902ada..e59ddbed2f 100644 --- a/.github/workflows/python_build.yml +++ b/.github/workflows/python_build.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: 3.11 - name: Install latest nightly uses: actions-rs/toolchain@v1 From 11041968a7c0ae1ae8dae3f45f64b855e3a28cf6 Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Tue, 16 Jul 2024 21:46:06 +0200 Subject: [PATCH 3/3] simplify --- .github/workflows/python_build.yml | 26 +++++++++----------------- python/pyproject.toml | 7 ++++--- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/python_build.yml b/.github/workflows/python_build.yml index e59ddbed2f..ce4a58c844 100644 --- a/.github/workflows/python_build.yml +++ b/.github/workflows/python_build.yml @@ -15,30 +15,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v2 with: - python-version: 3.11 + python-version: "3.10" - - name: Install latest nightly + - name: Check Python + run: | + pip install ruff==0.5.2 mypy==1.10.1 types-dataclasses typing-extensions + make check-python + + - name: Install minimal stable with clippy and rustfmt uses: actions-rs/toolchain@v1 with: + profile: default toolchain: stable override: true - components: rustfmt, clippy - - - uses: Swatinem/rust-cache@v2 - - - name: Build and install deltalake - run: | - pip install virtualenv - virtualenv venv - source venv/bin/activate - make develop - - - name: Check Python - run: make check-python - name: Check Rust run: make check-rust diff --git a/python/pyproject.toml b/python/pyproject.toml index dd69669335..53ee6ea067 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -28,8 +28,6 @@ pandas = [ ] devel = [ "azure-storage-blob==12.20.0", - "mypy~=1.8.0", - "ruff~=0.5.2", "packaging>=20", "pytest", "pytest-mock", @@ -39,7 +37,10 @@ devel = [ "sphinx-rtd-theme", "toml", "wheel", - "pytest-benchmark" + "pytest-benchmark", + # keep ruff and mypy versions in sync with .github/workflows/python_build.yml + "mypy==1.10.1", + "ruff==0.5.2" ] pyspark = [ "pyspark",