Skip to content
Open
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
164 changes: 164 additions & 0 deletions .github/workflows/release-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# This file is based on one autogenerated by maturin v1.12.6
name: CI

on:
push:
# Run on x.y.z tags.
tags:
- "**[0-9]+.[0-9]+.[0-9]+*"
# Allow manual triggering.
workflow_dispatch:

permissions:
contents: read

jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
env:
RUSTFLAGS: -C target-cpu=x86-64-v3
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --all-features
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

musllinux:
runs-on: ${{ matrix.platform.runner }}
env:
RUSTFLAGS: -C target-cpu=x86-64-v3
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --all-features
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
env:
RUSTFLAGS: -C target-cpu=x86-64-v3
strategy:
matrix:
platform:
- runner: windows-latest
target: x86_64
python_arch: x86_64
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.13
architecture: ${{ matrix.platform.python_arch }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --all-features
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist

macos:
runs-on: ${{ matrix.platform.runner }}
env:
RUSTFLAGS: -C target-cpu=apple-m1
strategy:
matrix:
platform:
- runner: macos-latest
target: aarch64
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --all-features
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v6
with:
name: wheels-sdist
path: dist

release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v7
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
with:
subject-path: 'wheels-*/*'
- name: Install uv
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: astral-sh/setup-uv@v7
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: uv publish 'wheels-*/*'
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/data
.DS_Store
*DE.md
dist
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Bindings for a python library. Covers most functionality such as filtering and index manipulation.

### Changed
- Variety of minor type changes to ensure compatability with PyO3. Notably `&Path` --> `&PathBuf`, and `&str` --> `String` in several places. This is due to sizes needing to be known at compile time for PyO3.
- Similarly removal of the lifetime for filepath pointers in `FilterConfig` was required due to PyO3 requirements.
- Index cache is now mutable, allowing different indicies to be cached upon request rather than requiring process restart. Without this, the python library would have been limited to a single index per program.


## [0.14.0] - 2026-02-25

### Added
Expand Down
94 changes: 94 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exclude = ["bench/*", "data/*"]
[lib]
name = "deacon"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]

[dependencies]
clap = { version = "4.5", features = ["derive"] }
Expand Down Expand Up @@ -41,6 +42,7 @@ zstd = { version = "0.13", optional = true }
gzp = { version = "2.0", default-features = false, features = ["deflate_rust"], optional = true }
minreq = { version = "2", features = ["https-rustls-probe"], optional = true }
ensure_simd = "0.1.0"
pyo3 = { version = "0.25.0", features = ["extension-module", "anyhow"] }

[lints.clippy]
too_many_arguments = "allow"
Expand Down
Loading