Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"permissions": {
"allow": [
"Bash(*)",
"Bash",
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Permission specification changed from wildcard 'Bash()' to simple 'Bash'. This narrows the permission scope, which may be intentional for security. However, verify that this change doesn't break any functionality that relied on the wildcard permission pattern. If 'Bash()' was allowing parameterized permissions, this change could restrict necessary operations.

Suggested change
"Bash",
"Bash(*)",

Copilot uses AI. Check for mistakes.
"Edit",
"MultiEdit",
"NotebookEdit",
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/deploy_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy Documentation
on:
workflow_dispatch:
push:
branches: [ main ]
branches: [main]

paths:
- 'src/docs/*'
Expand All @@ -22,28 +22,26 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Set up Python3
uses: actions/setup-python@v3
with:
python-version: 3.9

#----------------------------------------------
# install & configure poetry
# install uv
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1.3
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
enable-cache: true
cache-dependency-glob: "uv.lock"

#----------------------------------------------
# install dependencies if cache does not exist
# install project dependencies
#----------------------------------------------
- name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction
run: uv sync --dev --locked --no-progress

#----------------------------------------------
# Create documentation and deploy.
Expand Down
67 changes: 21 additions & 46 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,87 +1,62 @@
# Built from:
# https://docs.github.com/en/actions/guides/building-and-testing-python
# https://github.com/snok/install-poetry#workflows-and-tips

name: Build and test

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9' ]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install dependencies
run: |
pip install tox
run: uv sync --dev --locked
- name: Check code quality with flake8
run: tox -e flake8
run: uv run tox -e flake8

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9' ]
python-version: ["3.11"]

steps:

#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1.3
with:
virtualenvs-create: true
virtualenvs-in-project: true
uses: actions/checkout@v4

#----------------------------------------------
# load cached venv if cache exists
# install uv
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"

#----------------------------------------------
# install dependencies if cache does not exist
# install dependencies
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
run: uv sync --dev --locked

#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
run: poetry run python -m unittest discover

run: uv run python -m unittest discover
44 changes: 29 additions & 15 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,40 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1.3.1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: poetry install --no-interaction
python-version: "3.12"
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Build source and wheel archives
run: |
poetry version $(git describe --tags --abbrev=0)
poetry build
uv sync --locked --no-dev
VERSION="$(git describe --tags --abbrev=0)"
VERSION="${VERSION#v}"
export VERSION
python - <<'PY'
import os
import re
from pathlib import Path

path = Path("pyproject.toml")
data = path.read_text()
version = os.environ["VERSION"]
updated = re.sub(
r'^version = ".*"$',
f'version = "{version}"',
data,
count=1,
flags=re.MULTILINE,
)
path.write_text(updated)
print(f"Set project version to {version}")
PY
uv build

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@v1.2.2
Expand Down
Loading