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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Tests
on:
pull_request:
paths:
Expand All @@ -9,7 +9,7 @@ on:
- 'uv.lock'
workflow_dispatch:
jobs:
tests:
pytest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -21,6 +21,6 @@ jobs:
with:
enable-cache: true
- run: uv python install ${{ matrix.python-version }}
- run: uv sync --all-extras --frozen
- run: make test

continue-on-error: true
15 changes: 11 additions & 4 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@ on:
pull_request:
workflow_dispatch:
jobs:
lint:
name: Code Check
pre-commit-hooks:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uv python install 3.11
- run: make
- run: uv python install 3.12
- run: make check
typecheck:
name: Types Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uv python install 3.12
- run: make mypy
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ on:
workflow_dispatch:
jobs:
upload-coverage-report:
name: Upload Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uv python install 3.11
- run: make
- run: uv python install 3.12
- run: make coverage
- uses: codecov/codecov-action@v5
with:
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish docs GH Pages
name: Doc-Test
on:
pull_request: # todo: remove this after testing
release:
types: [ published ]
pull_request:
workflow_dispatch:

permissions:
Expand All @@ -21,13 +19,4 @@ jobs:
with:
enable-cache: true
- run: uv python install 3.12

- run: make install-docs
- run: make doc

# - name: Deploy
# uses: peaceiris/actions-gh-pages@v4
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs/build
# keep_files: true
- run: make doctest
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribution Guidelines

Thank you for your interest in contributing to "my-package". **Note:** Remember to update the package name if it
Thank you for your interest in contributing to "my-pkg". # TODO: Remember to update the package name if it
changes.

## Prerequisites
Expand Down
33 changes: 12 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ default: install

install:
uv sync --all-extras --all-groups --frozen
uv tool install pre-commit --with pre-commit-uv --force-reinstall
uv run pre-commit install
uvx pre-commit install

install-docs:
uv sync --group docs --frozen --no-group dev
Expand All @@ -16,34 +15,26 @@ update:
uvx pre-commit autoupdate
$(MAKE) install

test:
test: install
uv run pytest

check:
uv run pre-commit run --all-files
check: install
uvx pre-commit run --all-files

coverage:
coverage: install
uv run pytest --cov=my_pkg --cov-report=xml # todo: change my_pkg to the actual package name

cov:
cov: install
uv run pytest --cov=my_pkg --cov-report=term-missing # todo: change my_pkg to the actual package name

mypy:
uv tool run mypy my_pkg --config-file pyproject.toml
mypy: install
uv run mypy my_pkg --config-file pyproject.toml
# todo: chanege my_pkg to the actual package name

doc:
uv run sphinx-build -M html docs/source docs/build/


doctest:
uv run sphinx-build -M doctest docs/source docs/build/ -W --keep-going
doctest: install-docs doc

# Optional target that builds docs but ignores warnings
doc-build:
uv run sphinx-build -M html docs/source docs/build/


doc: doctest doc-build
doc:
uv run --no-sync sphinx-build -M doctest docs/source docs/build/ -W --keep-going --fresh-env
uv run --no-sync sphinx-build -M html docs/source docs/build/ -W --keep-going --fresh-env

check-all: check test mypy doc
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ dependencies = []

[dependency-groups]
dev = [
"pytest>=7.1.2",
"pytest>=8.3.5",
"hypothesis>=6.23.3",
"pre-commit>=2.20.0",
"pre-commit-uv>=4",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.26.0",
"mypy==1.15.0",
"pytest-parametrization>=2022",
"ruff>=0.8.2",
"sybil[pytest]",

]
docs = [
"sphinx>=8.2.0; python_version >= '3.11'",
Expand Down
46 changes: 23 additions & 23 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automerge": true,
"extends": [
"config:recommended"
],
"labels": [
"renovate"
],
"lockFileMaintenance": {
"enabled": true,
"automerge": true,
"enabled": true,
"groupName": "uv-lock",
"schedule": [
"at any time"
],
"groupName": "uv-lock"
]
},
"automerge": true,
"pre-commit": {
"enabled": true
},
"schedule": [
"at any time"
],
"labels": [
"renovate"
],
"packageRules": [
{
"matchManagers": [
"github-actions"
],
"labels": [
"github-actions",
"renovate"
],
"matchManagers": [
"github-actions"
]
},
{
"matchManagers": [
"pre-commit"
],
"labels": [
"pre-commit",
"renovate"
],
"matchManagers": [
"pre-commit"
]
},
{
"labels": [
"python",
"renovate"
],
"matchManagers": [
"pip-compile",
"pip_requirements",
"pip_setup",
"pipenv",
"poetry"
],
"labels": [
"python",
"renovate"
]
}
],
"pre-commit": {
"enabled": true
},
"schedule": [
"at any time"
]
}
Loading