From e7fca13d818c253d0d0c8b77ab5e3387105f6973 Mon Sep 17 00:00:00 2001 From: "Ronny V." Date: Mon, 14 Oct 2024 14:51:13 +0200 Subject: [PATCH] v11.5.1 (#35) --- .github/workflows/ci.yml | 5 +++-- .pre-commit-config.yaml | 23 +++++++++++++++----- CHANGES.md | 7 +++++- README.md | 2 +- ambient_toolbox/__init__.py | 2 +- pyproject.toml | 16 ++++++++------ scripts/unix/publish_to_pypi.sh | 2 +- scripts/windows/publish_to_pypi.ps1 | 2 +- testapp/templates/403.html | 4 ++-- testapp/templates/testapp/test_template.html | 1 - 10 files changed, 41 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9a8828..674134f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,8 @@ name: Unit tests on: push: - branches: [ '**' ] + branches: + - master pull_request: jobs: @@ -43,7 +44,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python-version: ['3.9', '3.10', '3.11', '3.12', ] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', ] django-version: ['42', '50', '51', ] exclude: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9916b11..58b016d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.4 + rev: v0.6.9 hooks: # Run the Ruff linter. - id: ruff @@ -12,7 +12,7 @@ repos: - id: ruff-format - repo: https://github.com/adamchainz/blacken-docs - rev: 1.18.0 + rev: 1.19.0 hooks: - id: blacken-docs additional_dependencies: @@ -20,15 +20,26 @@ repos: files: '(?:README\.md|docs\/.*\.(?:md|rst))' - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.18.0 hooks: - id: pyupgrade args: [ --py39-plus ] - stages: [ push ] + stages: [ pre-push ] - repo: https://github.com/adamchainz/django-upgrade - rev: 1.21.0 + rev: 1.22.1 hooks: - id: django-upgrade args: [--target-version, "4.2"] - stages: [ push ] + stages: [ pre-push ] + + - repo: https://github.com/adamchainz/djade-pre-commit + rev: 1.3.0 + hooks: + - id: djade + args: [--target-version, "4.2"] + exclude: | + (?x)^( + charts/.* + |.*\.py + )$ diff --git a/CHANGES.md b/CHANGES.md index 811cc79..c62c0f6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,12 @@ # Changelog -**11.5.0** (2024-09-29) +**11.5.1** (2024-10-08) +* Added Python 3.13 support +* Added Djade linter to pre-commit +* Improved GitHub action triggers +* Updated dev dependencies and linters +**11.5.0** (2024-09-29) * Added system check to ensure that all model relation fields have a related name, either directly set or via the model meta-option "default_related_name". diff --git a/README.md b/README.md index 7992250..90797e5 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Example: run all hooks of pre-push stage ### Update documentation -- To build the documentation run: `sphinx-build docs/ docs/_build/html/`. +- To build the documentation, run: `sphinx-build docs/ docs/_build/html/`. - Open `docs/_build/html/index.html` to see the documentation. diff --git a/ambient_toolbox/__init__.py b/ambient_toolbox/__init__.py index 0ef23cb..345046a 100644 --- a/ambient_toolbox/__init__.py +++ b/ambient_toolbox/__init__.py @@ -1,3 +1,3 @@ """Python toolbox of Ambient Digital containing an abundance of useful tools and gadgets.""" -__version__ = "11.5.0" +__version__ = "11.5.1" diff --git a/pyproject.toml b/pyproject.toml index a1b34a4..a347300 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Utilities", ] dynamic = ["version", "description"] @@ -38,19 +39,19 @@ dependencies = [ [project.optional-dependencies] dev = [ - 'typer~=0.9', - 'freezegun~=1.3', - 'pytest-django~=4.7', - 'pytest-mock~=3.12', + 'typer~=0.12', + 'freezegun~=1.5', + 'pytest-django~=4.9', + 'pytest-mock~=3.14', 'coverage~=7.6', - 'pre-commit~=3.7', - 'ruff~=0.4', + 'pre-commit~=4.0', + 'ruff~=0.6', 'sphinx~=7.1', 'sphinx-rtd-theme~=2.0', 'm2r2==0.3.3.post2', 'mistune<2.0.0', 'flit~=3.9', - 'keyring~=25.2', + 'keyring~=25.4', 'ambient-package-update', 'gevent~=23.9', 'httpx~=0.27', @@ -218,6 +219,7 @@ python = 3.10: py310 3.11: py311 3.12: py312 + 3.13: py313 """ [tool.pytest.ini_options] diff --git a/scripts/unix/publish_to_pypi.sh b/scripts/unix/publish_to_pypi.sh index 5fbe95a..83a3063 100644 --- a/scripts/unix/publish_to_pypi.sh +++ b/scripts/unix/publish_to_pypi.sh @@ -1,2 +1,2 @@ flit publish --repository testpypi - flit publish \ No newline at end of file + flit publish diff --git a/scripts/windows/publish_to_pypi.ps1 b/scripts/windows/publish_to_pypi.ps1 index 5fbe95a..83a3063 100644 --- a/scripts/windows/publish_to_pypi.ps1 +++ b/scripts/windows/publish_to_pypi.ps1 @@ -1,2 +1,2 @@ flit publish --repository testpypi - flit publish \ No newline at end of file + flit publish diff --git a/testapp/templates/403.html b/testapp/templates/403.html index ddeffef..b05d54f 100644 --- a/testapp/templates/403.html +++ b/testapp/templates/403.html @@ -50,10 +50,10 @@ {% block body %}
-

{% trans "Error 403" %}

+

{% translate "Error 403" %}

You don't have access to this page.

-{% endblock %} +{% endblock body %} diff --git a/testapp/templates/testapp/test_template.html b/testapp/templates/testapp/test_template.html index 053f22c..4811ca1 100644 --- a/testapp/templates/testapp/test_template.html +++ b/testapp/templates/testapp/test_template.html @@ -8,4 +8,3 @@ -