Skip to content
Draft
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
54 changes: 26 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,61 @@ jobs:
build:
name: Build
runs-on: ubuntu-24.04
env:
PYTHON_VERSION: "3.10"
UV_VERSION: "0.11.13"

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup Python
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
python-version: "3.13"
enable-cache: true
version: ${{ env.UV_VERSION }}

- name: Install Poetry
uses: snok/install-poetry@v1
- name: "Set up Python"
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: poetry install
run: uv sync --locked --all-extras --dev

- name: Lint
run: poetry run black --check .
run: uv run ruff check .

- name: Build
run: poetry build
run: uv build

# the `coverage xml -i` command is needed to re-write the
# coverage report with relative paths
- name: Test
run: |
poetry run pytest --cov src --cov-report xml tests
poetry run coverage xml -i
run: uv run pytest

test:
name: Test
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
poetry-version: ["1.8.2"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup python
uses: actions/setup-python@v6
with:
python-version: "${{ matrix.python-version }}"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
version: "${{ matrix.poetry-version }}"
enable-cache: true
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: poetry install
run: uv sync --locked --all-extras --dev

- name: Build
run: poetry build
run: uv build

- name: Test
run: poetry run tox
run: uv run pytest
40 changes: 0 additions & 40 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/fortify.yml

This file was deleted.

28 changes: 13 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ jobs:
name: Deploy to package index
runs-on: ubuntu-24.04
env:
PYTHON_VERSION: "3.12"
REPOSITORY_USERNAME: ${{ secrets.PYPI_USERNAME }}
REPOSITORY_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PYTHON_VERSION: "3.10"
UV_VERSION: "0.11.13"
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }}
REPOSITORY_URL: ${{ secrets.PYPI_PUBLISH_URL }}
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
CONDA_ENV_NAME: conda-env

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: true
version: ${{ env.UV_VERSION }}

- name: Setup Python
uses: actions/setup-python@v6
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -32,21 +38,13 @@ jobs:
activate-environment: ${{ env.CONDA_ENV_NAME }}
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Configure Poetry
run: |
poetry config repositories.publish $REPOSITORY_URL
poetry config http-basic.publish $REPOSITORY_USERNAME $REPOSITORY_PASSWORD

- name: Build
run: |
poetry build
uv build

- name: Publish
run: |
poetry publish -r publish
uv publish

- name: Publish to Anaconda
shell: bash -el {0}
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ target/
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
Loading
Loading