Skip to content

Commit e7ac7ff

Browse files
bump template to 2024.23
1 parent fbf94e8 commit e7ac7ff

File tree

9 files changed

+76
-88
lines changed

9 files changed

+76
-88
lines changed

.copier/package.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v2024.20
2+
_commit: v2024.23
33
_src_path: gh:westerveltco/django-twc-package
44
author_email: [email protected]
55
author_name: Josh Thomas
@@ -19,5 +19,6 @@ python_versions:
1919
- '3.10'
2020
- '3.11'
2121
- '3.12'
22+
- '3.13'
2223
test_django_main: true
2324
versioning_scheme: SemVer

.github/workflows/release.yml

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,32 @@ on:
44
release:
55
types: [released]
66

7-
jobs:
8-
check:
9-
runs-on: ubuntu-latest
10-
permissions:
11-
actions: read
12-
contents: read
13-
env:
14-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15-
steps:
16-
- uses: actions/checkout@v4
7+
permissions:
8+
contents: write
179

18-
- name: Check most recent test run on `main`
19-
id: latest-test-result
20-
run: |
21-
echo "result=$(gh run list \
22-
--branch=main \
23-
--workflow=test.yml \
24-
--json headBranch,workflowName,conclusion \
25-
--jq '.[] | select(.headBranch=="main" and .conclusion=="success") | .conclusion' \
26-
| head -n 1)" >> $GITHUB_OUTPUT
27-
28-
- name: OK
29-
if: ${{ (contains(steps.latest-test-result.outputs.result, 'success')) }}
30-
run: exit 0
31-
32-
- name: Fail
33-
if: ${{ !contains(steps.latest-test-result.outputs.result, 'success') }}
34-
run: exit 1
10+
jobs:
11+
test:
12+
uses: ./.github/workflows/test.yml
3513

3614
pypi:
3715
if: ${{ github.event_name == 'release' }}
3816
runs-on: ubuntu-latest
39-
needs: check
17+
needs: test
4018
environment: release
4119
permissions:
4220
contents: read
4321
id-token: write
4422
steps:
4523
- uses: actions/checkout@v4
46-
with:
47-
persist-credentials: false
4824

49-
- uses: westerveltco/setup-ci-action@v0
25+
- uses: actions/setup-python@v5
5026
with:
51-
python-version: 3.12
52-
extra-python-dependencies: hatch
53-
use-uv: true
27+
python-version: 3.13
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install -U pip uv
32+
python -m uv pip install --system hatch
5433
5534
- name: Build package
5635
run: |

.github/workflows/test.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ jobs:
2020
matrix: ${{ steps.set-matrix.outputs.matrix }}
2121
steps:
2222
- uses: actions/checkout@v4
23-
with:
24-
persist-credentials: false
2523

26-
- uses: westerveltco/setup-ci-action@v0
24+
- uses: actions/setup-python@v5
2725
with:
2826
python-version: 3.8
29-
extra-python-dependencies: nox
30-
use-uv: true
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install -U pip uv
31+
python -m uv pip install --system nox
3132
3233
- id: set-matrix
3334
run: |
@@ -42,14 +43,16 @@ jobs:
4243
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
4344
steps:
4445
- uses: actions/checkout@v4
45-
with:
46-
persist-credentials: false
4746

48-
- uses: westerveltco/setup-ci-action@v0
47+
- uses: actions/setup-python@v5
4948
with:
5049
python-version: ${{ matrix.python-version }}
51-
extra-python-dependencies: nox
52-
use-uv: true
50+
allow-prereleases: true
51+
52+
- name: Install dependencies
53+
run: |
54+
python -m pip install -U pip uv
55+
python -m uv pip install --system nox
5356
5457
- name: Run tests
5558
run: |
@@ -71,14 +74,15 @@ jobs:
7174
runs-on: ubuntu-latest
7275
steps:
7376
- uses: actions/checkout@v4
74-
with:
75-
persist-credentials: false
7677

77-
- uses: westerveltco/setup-ci-action@v0
78+
- uses: actions/setup-python@v5
7879
with:
7980
python-version: 3.8
80-
extra-python-dependencies: nox
81-
use-uv: true
81+
82+
- name: Install dependencies
83+
run: |
84+
python -m pip install -U pip uv
85+
python -m uv pip install --system nox
8286
8387
- name: Run mypy
8488
run: |
@@ -88,14 +92,15 @@ jobs:
8892
runs-on: ubuntu-latest
8993
steps:
9094
- uses: actions/checkout@v4
91-
with:
92-
persist-credentials: false
9395

94-
- uses: westerveltco/setup-ci-action@v0
96+
- uses: actions/setup-python@v5
9597
with:
9698
python-version: 3.8
97-
extra-python-dependencies: nox
98-
use-uv: true
99+
100+
- name: Install dependencies
101+
run: |
102+
python -m pip install -U pip uv
103+
python -m uv pip install --system nox
99104
100105
- name: Run coverage
101106
run: |

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
## Requirements
1414

15-
- Python 3.8, 3.9, 3.10, 3.11, 3.12
15+
- Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
1616
- Django 4.2, 5.0
1717

18-
## Getting Started
18+
## Installation
1919

2020
<!-- getting-started-start -->
2121
1. **Install the package from PyPI.**
@@ -52,7 +52,7 @@
5252
If you do not add `django.contrib.auth` to your `INSTALLED_APPS` and you define any permissions for your navigation items, `django-simple-nav` will simply ignore the permissions and render all items regardless of whether the permission check is `True` or `False.`
5353
<!-- getting-started-end -->
5454

55-
## Usage
55+
## Getting Started
5656

5757
<!-- usage-start -->
5858
1. **Create a navigation definition.**

noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
PY310 = "3.10"
1414
PY311 = "3.11"
1515
PY312 = "3.12"
16-
PY_VERSIONS = [PY38, PY39, PY310, PY311, PY312]
16+
PY313 = "3.13"
17+
PY_VERSIONS = [PY38, PY39, PY310, PY311, PY312, PY313]
1718
PY_DEFAULT = PY_VERSIONS[0]
1819
PY_LATEST = PY_VERSIONS[-1]
1920

pyproject.toml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ classifiers = [
1919
"Programming Language :: Python :: 3.10",
2020
"Programming Language :: Python :: 3.11",
2121
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
2223
"Programming Language :: Python :: Implementation :: CPython"
2324
]
2425
dependencies = [
@@ -114,7 +115,12 @@ django_settings_module = "tests.settings"
114115
strict_settings = false
115116

116117
[tool.djlint]
118+
blank_line_after_tag = "endblock,endpartialdef,extends,load"
119+
blank_line_before_tag = "block,partialdef"
120+
custom_blocks = "partialdef"
121+
ignore = "H031" # Don't require `meta` tag keywords
117122
indent = 2
123+
profile = "django"
118124

119125
[tool.hatch.build]
120126
exclude = [".*", "Justfile"]
@@ -127,7 +133,13 @@ path = "src/django_simple_nav/__init__.py"
127133

128134
[tool.mypy]
129135
check_untyped_defs = true
130-
exclude = "docs/.*\\.py$"
136+
exclude = [
137+
"docs",
138+
"tests",
139+
"migrations",
140+
"venv",
141+
".venv"
142+
]
131143
mypy_path = "src/"
132144
no_implicit_optional = true
133145
plugins = ["mypy_django_plugin.main"]
@@ -138,7 +150,11 @@ warn_unused_ignores = true
138150
[[tool.mypy.overrides]]
139151
ignore_errors = true
140152
ignore_missing_imports = true
141-
module = ["django_simple_nav.*.migrations.*", "tests.*"]
153+
module = [
154+
"*.migrations.*",
155+
"tests.*",
156+
"docs.*"
157+
]
142158

143159
[tool.mypy_django_plugin]
144160
ignore_missing_model_attributes = true

src/django_simple_nav/_type_utils.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/django_simple_nav/_typing.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from __future__ import annotations
2+
3+
import sys
4+
5+
if sys.version_info >= (3, 12):
6+
from typing import override as typing_override
7+
else: # pragma: no cover
8+
from typing_extensions import (
9+
override as typing_override, # pyright: ignore[reportUnreachable]
10+
)
11+
12+
override = typing_override

src/django_simple_nav/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from django.conf import settings
66

7-
from django_simple_nav._type_utils import override
7+
from ._typing import override
88

99
DJANGO_SIMPLE_NAV_SETTINGS_NAME = "DJANGO_SIMPLE_NAV"
1010

0 commit comments

Comments
 (0)