From b1b5febcfb80302083725f8c41a2f8ca7b73c2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Wieiw=C3=B3rka?= Date: Mon, 16 Dec 2024 21:22:17 +0100 Subject: [PATCH] Poetry setup --- .github/workflows/publish_to_pypi.yml | 25 +++++++++++++++++-------- Makefile | 3 ++- pyproject.toml | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index ba280c2..6b832d4 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -22,6 +22,7 @@ permissions: # Make sure CI fails on all warnings, including Clippy lints env: RUSTFLAGS: "-Dwarnings" + POETRY_VERSION: 1.8.4 jobs: linux_tests: @@ -29,15 +30,15 @@ jobs: strategy: matrix: target: [x86_64] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: [ "3.9", "3.10", "3.11", "3.12" ] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} - - + - uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ env.POETRY_VERSION }} - name: Set up Rust run: rustup show - uses: mozilla-actions/sccache-action@v0.0.3 @@ -56,6 +57,9 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.10' + - uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ env.POETRY_VERSION }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -80,9 +84,10 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.10' - architecture: ${{ matrix.target }} - + - uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ env.POETRY_VERSION }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -108,12 +113,13 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.10' + - uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ env.POETRY_VERSION }} - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter sccache: 'true' - name: Upload wheels @@ -128,6 +134,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ env.POETRY_VERSION }} - name: Build sdist uses: PyO3/maturin-action@v1 with: diff --git a/Makefile b/Makefile index aee7bda..2be8d9e 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ SHELL=/bin/bash venv: ## Set up virtual environment python3 -m venv .venv - .venv/bin/pip install -r requirements.txt + poetry lock --no-update + poetry install install: venv unset CONDA_PREFIX && \ diff --git a/pyproject.toml b/pyproject.toml index 2ae0d86..e407af3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ authors = ["Marek WiewiĆ³rka "] readme = "README.md" [tool.poetry.dependencies] -python = ">=3.9,<3.13" +python = ">=3.8,<3.13" polars = "^1.16.0" pandas = "^2.2.3"