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
50 changes: 23 additions & 27 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: docs

on:
push:
tags: ['*']
tags: ["*"]
workflow_dispatch:

permissions:
Expand All @@ -13,29 +13,25 @@ jobs:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install poetry
run: python -m pip install poetry
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Cache the virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --with docs --without dev
- name: Build site
run: poetry run mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install dependencies
run: uv sync --locked --no-dev --group docs
- name: Build site
run: uv run mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./site

deploy:
needs: build
Expand All @@ -47,6 +43,6 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
60 changes: 28 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,39 @@ name: tests

on:
push:
branches: ['main']
tags: ['*']
branches: ["main"]
tags: ["*"]
pull_request:
branches: ['main']
branches: ["main"]

jobs:
tests:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install poetry
run: python -m pip install poetry
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Cache the virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --without docs
- name: Lint
run: poetry run ruff check --show-files --exit-non-zero-on-fix
- name: Run tests
run: poetry run pytest -v --cov --cov-report term-missing
- name: Build artifacts
run: poetry build
if: startsWith(github.ref, 'refs/tags/')
- name: Publish release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/dist/*
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install dependencies
run: uv sync --locked --all-extras --dev
- name: Lint
run: uv run ruff check --show-files --exit-non-zero-on-fix
- name: Run tests
run: uv run pytest -v --cov --cov-report term-missing
- name: Build artifacts
run: uv build
if: startsWith(github.ref, 'refs/tags/')
- name: Publish release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/dist/*
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ipython_config.py
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
Expand Down
35 changes: 17 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.1.0
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.2.0
hooks:
- id: conventional-pre-commit
- id: conventional-pre-commit
name: conventional-commit-check
stages: [commit-msg]
args: []
- repo: https://github.com/python-poetry/poetry
rev: '1.8.2'
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.17
hooks:
- id: poetry-check
name: poetry-check
- repo: local
- id: uv-lock
- repo: local
hooks:
- id: ruff-check
- id: ruff-check
name: ruff-check
entry: ruff check --fix --exit-non-zero-on-fix
entry: uv run ruff check --fix --exit-non-zero-on-fix
language: system
types: [python]
- id: ruff-format
- id: ruff-format
name: ruff-format
entry: ruff format
entry: uv run ruff format
language: system
types: [python]
162 changes: 0 additions & 162 deletions DEV.md

This file was deleted.

Loading