diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 074743e..3086523 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,3 +1,8 @@ +# This file is autogenerated by maturin v1.3.0 +# To update, run +# +# maturin generate-ci github +# name: CI on: @@ -5,58 +10,103 @@ on: branches: - main - master + tags: + - '*' pull_request: workflow_dispatch: +permissions: + contents: read + jobs: linux: runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] steps: - - uses: actions/checkout@v3 - - uses: PyO3/maturin-action@v1 - with: - manylinux: auto - command: build - args: --release --sdist -o dist --find-interpreter - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + manylinux: auto + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist windows: runs-on: windows-latest + strategy: + matrix: + target: [x64, x86] steps: - - uses: actions/checkout@v3 - - uses: PyO3/maturin-action@v1 - with: - command: build - args: --release -o dist --find-interpreter - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + architecture: ${{ matrix.target }} + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist macos: runs-on: macos-latest + strategy: + matrix: + target: [x86_64, aarch64] steps: - - uses: actions/checkout@v3 - - uses: PyO3/maturin-action@v1 - with: - command: build - args: --release -o dist --universal2 --find-interpreter - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + command: sdist + args: --out dist + - name: Upload sdist + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist release: name: Release runs-on: ubuntu-latest if: "startsWith(github.ref, 'refs/tags/')" - needs: [ macos, windows, linux ] + needs: [linux, windows, macos, sdist] steps: - uses: actions/download-artifact@v3 with: @@ -67,4 +117,4 @@ jobs: MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} with: command: upload - args: --skip-existing * \ No newline at end of file + args: --non-interactive --skip-existing * diff --git a/Cargo.lock b/Cargo.lock index 1ce88ba..eab8baf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -186,7 +186,7 @@ dependencies = [ [[package]] name = "maptide" -version = "0.2.0" +version = "0.2.1" dependencies = [ "noodles", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index 04cecfd..7b75d23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "maptide" -version = "0.2.0" +version = "0.2.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/python/maptide/api.py b/python/maptide/api.py index b1a2153..3dca431 100644 --- a/python/maptide/api.py +++ b/python/maptide/api.py @@ -1,12 +1,12 @@ import os -from typing import Dict, Tuple, List +from typing import Dict, Tuple, List, Optional from . import maptide #  type: ignore def query( bam: str, - region: str | None = None, - bai: str | None = None, + region: Optional[str] = None, + bai: Optional[str] = None, mapping_quality: int = 0, base_quality: int = 0, ) -> Dict[str, Dict[Tuple[int, int], List[int]]]: