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
4 changes: 2 additions & 2 deletions .copier/package.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v2024.10
_commit: v2024.13
_src_path: gh:westerveltco/django-twc-package
author_email: [email protected]
author_name: Josh Thomas
current_version: 0.1.0
current_version: 0.2.0
django_versions:
- '3.2'
- '4.2'
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,28 @@ env:
FORCE_COLOR: "1"

jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4

- uses: wntrblm/nox@main
with:
python-versions: "3.8"

- id: set-matrix
run: |
echo "matrix=$(nox -l --json | jq -c '[.[] | select(.name == "tests") | {"python-version": .python, "django-version": .call_spec.django}] | {include: .}')" >> $GITHUB_OUTPUT

test:
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
needs: generate-matrix
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["3.2", "4.2", "5.0", "main"]
env:
NOX_SESSION: "tests(python='${{ matrix.python-version }}', django='${{ matrix.django-version }}')"
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4

Expand All @@ -38,20 +50,9 @@ jobs:
run: |
python -m pip install --upgrade pip nox

- name: Check if test session exists
run: |
if nox -l | grep -q "${{ env.NOX_SESSION }}"; then
echo "Session exists, proceeding with tests"
echo "RUN_TESTS=true" >> $GITHUB_ENV
else
echo "Session does not exist, skipping tests"
echo "RUN_TESTS=false" >> $GITHUB_ENV
fi

- name: Run tests
if: env.RUN_TESTS == 'true'
run: |
python -m nox --session "${{ env.NOX_SESSION }}"
python -m nox --session "tests(python='${{ matrix.python-version }}', django='${{ matrix.django-version }}')"

tests:
runs-on: ubuntu-latest
Expand Down
15 changes: 13 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.8
python: python3.12

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -24,7 +24,7 @@ repos:
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
rev: 1.16.0
hooks:
- id: blacken-docs
alias: autoformat
Expand All @@ -50,6 +50,17 @@ repos:
- id: djlint-reformat-django
- id: djlint-django

- repo: local
hooks:
- id: rustywind
name: rustywind Tailwind CSS class linter
language: node
additional_dependencies:
- [email protected]
entry: rustywind
args: [--write]
types_or: [html, jsx, tsx]

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/

## [Unreleased]

### Changed

- Now using v2024.13 of `django-twc-package`.

## [0.2.0]

### Added
Expand Down
4 changes: 2 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ When it comes time to cut a new release, follow these steps:

1. Create a new git branch off of `main` for the release.

Prefer the convention `release-<version>`, where `<version>` is the next incremental version number (e.g. `release-v0.1.0` for version 0.1.0).
Prefer the convention `release-<version>`, where `<version>` is the next incremental version number (e.g. `release-v0.2.0` for version 0.2.0).

```shell
git checkout -b release-v<version>
Expand Down Expand Up @@ -60,7 +60,7 @@ When it comes time to cut a new release, follow these steps:

6. Draft a [new release](https://github.com/westerveltco/django-simple-nav/releases/new) on GitHub.

Use the version number with a leading `v` as the tag name (e.g. `v0.1.0`).
Use the version number with a leading `v` as the tag name (e.g. `v0.2.0`).

Allow GitHub to generate the release title and release notes, using the 'Generate release notes' button above the text box. If this is a final release coming from a tagged release (or multiple tagged releases), make sure to copy the release notes from the previous tagged release(s) to the new release notes (after the release notes already generated for this final release).

Expand Down
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,15 @@ tag = false
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"

[tool.bumpver.file_patterns]
"src/django_simple_nav/__init__.py" = ['__version__ = "{version}"']
"tests/test_version.py" = ['assert __version__ == "{version}"']
".copier/package.yml" = [
'current_version: {version}'
]
"src/django_simple_nav/__init__.py" = [
'__version__ = "{version}"'
]
"tests/test_version.py" = [
'assert __version__ == "{version}"'
]

[tool.coverage.paths]
source = ["src"]
Expand Down
2 changes: 1 addition & 1 deletion src/django_simple_nav/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

__version__ = "0.2.0"
__template_version__ = "2024.10"
__template_version__ = "2024.13"