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: 0 additions & 6 deletions .coveragerc

This file was deleted.

20 changes: 8 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# EditorConfig is awesome: http://EditorConfig.org
# http://editorconfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8
indent_style = space
indent_size = 4

# Matches the exact files either package.json or .travis.yml
[{.travis.yml}]
indent_style = space
indent_size = 2
[Makefile]
indent_style = tab
1 change: 1 addition & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This project follows [Django's Code of Conduct](https://www.djangoproject.com/conduct/).
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Feature Request
description: Request an enhancement or new feature.
body:
- type: textarea
id: description
attributes:
label: Description
description: Please describe your feature request with appropriate detail.
validations:
required: true
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Issue
description: File an issue
body:
- type: input
id: python_version
attributes:
label: Python Version
description: Which version of Python were you using?
placeholder: 3.9.0
validations:
required: false
- type: input
id: django_version
attributes:
label: Django Version
description: Which version of Django were you using?
placeholder: 3.2.0
validations:
required: false
- type: input
id: package_version
attributes:
label: Package Version
description: Which version of this package were you using? If not the latest version, please check this issue has not since been resolved.
placeholder: 1.0.0
validations:
required: false
- type: textarea
id: description
attributes:
label: Description
description: Please describe your issue.
validations:
required: true
1 change: 1 addition & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please report security issues directly over email to info@markusholtermann.eu.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
groups:
"GitHub Actions":
patterns:
- "*"
schedule:
interval: monthly
111 changes: 111 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: CI

on:
push:
branches:
- main
tags:
- '**'
pull_request:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-24.04

strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'

steps:
- uses: actions/checkout@v5

- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Run tox targets for ${{ matrix.python-version }}
run: uvx --with tox-uv tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)

- name: Upload coverage data
uses: actions/upload-artifact@v5
with:
name: coverage-data-${{ matrix.python-version }}
path: '${{ github.workspace }}/.coverage.*'
include-hidden-files: true
if-no-files-found: error

coverage:
name: Coverage
runs-on: ubuntu-24.04
needs: tests
steps:
- uses: actions/checkout@v5

- uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install dependencies
run: uv pip install --system coverage[toml]

- name: Download data
uses: actions/download-artifact@v6
with:
path: ${{ github.workspace }}
pattern: coverage-data-*
merge-multiple: true

- name: Combine coverage and fail if it's <100%
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=100
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY

- name: Upload HTML report
if: ${{ failure() }}
uses: actions/upload-artifact@v5
with:
name: html-report
path: htmlcov

release:
needs: [coverage]
if: success() && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-24.04
environment: release

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v5

- uses: astral-sh/setup-uv@v7

- name: Build
run: uv build

- uses: pypa/gh-action-pypi-publish@release/v1
105 changes: 0 additions & 105 deletions .github/workflows/test-deploy.yml

This file was deleted.

63 changes: 51 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,58 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
ci:
autoupdate_schedule: monthly

default_language_version:
python: python3.13

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-added-large-files
exclude: "^uv.lock$"
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 21.9b0
- repo: https://github.com/crate-ci/typos
rev: 1976b238f2710646b971e06bc25737249ee6406d # frozen: v1
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: "4.0.1"
- id: typos
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 8a22e281b3f6d1bb298aaabfc165a943a943882c # frozen: v2.7.0
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: "5.9.3"
- id: pyproject-fmt
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 4e2cb0e98735e1a57a027d9440b91663e31d10b0 # frozen: 1.6.0
hooks:
- id: isort
- id: tox-ini-fmt
- repo: https://github.com/rstcheck/rstcheck
rev: 27258fde1ee7d3b1e6a7bbc58f4c7b1dd0e719e5 # frozen: v6.2.5
hooks:
- id: rstcheck
additional_dependencies: ['rstcheck[sphinx,toml]']
- repo: https://github.com/adamchainz/django-upgrade
rev: c03f1b1e703cd967c5fd94e29c61f111e8b0eaf0 # frozen: 1.29.0
hooks:
- id: django-upgrade
- repo: https://github.com/adamchainz/blacken-docs
rev: dda8db18cfc68df532abf33b185ecd12d5b7b326 # frozen: 1.20.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==25.1.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 9c89adb347f6b973f4905a4be0051eb2ecf85dea # frozen: v0.13.3
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: 9f70dc58c23dfcca1b97af99eaeee3140a807c7e # frozen: v1.18.2
# hooks:
# - id: mypy
# additional_dependencies:
# - django-stubs==5.1.2
Loading