Skip to content

Commit

Permalink
Poetry setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiewior committed Dec 16, 2024
1 parent 3531dda commit 4e90b63
Show file tree
Hide file tree
Showing 11 changed files with 598 additions and 350 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,24 @@ permissions:

# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"
RUSTFLAGS: "-Dwarnings -Ctarget-cpu=native"
POETRY_VERSION: 1.8.4

jobs:
linux_tests:
runs-on: ubuntu-latest
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
Expand All @@ -50,12 +51,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, x86]
target: [x86_64]
steps:
- uses: actions/checkout@v3
- 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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repos:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --show-fixes, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars_bio"
version = "0.1.0"
version = "0.2.0"
edition = "2021"

[lib]
Expand All @@ -11,7 +11,7 @@ crate-type= ["cdylib"]
datafusion-python = { git = "https://github.com/apache/datafusion-python.git", rev = "5c834934dec89bd96ff70df3b278e9d6fe78f7ec"}
pyo3 = { version = "0.22.4", features = ["extension-module", "abi3-py38", "experimental-async"] }
pyo3-log = "0.11.0"
sequila-core = { git = "https://github.com/biodatageeks/sequila-native.git", rev = "4a0b7383eed84cadaa1b524f401dd419b1c0ce8d" }
sequila-core = { git = "https://github.com/biodatageeks/sequila-native.git", rev = "1a2eeb42d26753cd68ce5d981f6471655037abab" }
datafusion = { version = "43.0.0"}
arrow = "53.3.0"
tokio = "1.42.0"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -17,7 +18,6 @@ pre-commit: venv
cargo fmt --all && cargo clippy --all-features
.venv/bin/python -m ruff check polars_bio tests --fix --exit-non-zero-on-fix
.venv/bin/python -m ruff format polars_bio tests
.venv/bin/python -m mypy polars_bio tests

test: venv
.venv/bin/python -m pytest tests
Expand Down
Loading

0 comments on commit 4e90b63

Please sign in to comment.