diff --git a/.copier/package.yml b/.copier/package.yml index 7ffd394..ea1b9ed 100644 --- a/.copier/package.yml +++ b/.copier/package.yml @@ -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: josh@joshthomas.dev author_name: Josh Thomas -current_version: 0.1.0 +current_version: 0.2.0 django_versions: - '3.2' - '4.2' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f1b1d2..f79562e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cef2ddc..e24c08d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ default_language_version: - python: python3.8 + python: python3.12 repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -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 @@ -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: + - rustywind@0.21.0 + entry: rustywind + args: [--write] + types_or: [html, jsx, tsx] + - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks rev: v2.12.0 hooks: diff --git a/CHANGELOG.md b/CHANGELOG.md index 34e0428..f1481cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/RELEASING.md b/RELEASING.md index 2372460..da2e6a1 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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-`, where `` is the next incremental version number (e.g. `release-v0.1.0` for version 0.1.0). + Prefer the convention `release-`, where `` is the next incremental version number (e.g. `release-v0.2.0` for version 0.2.0). ```shell git checkout -b release-v @@ -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). diff --git a/pyproject.toml b/pyproject.toml index ca8ba30..d2628ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] diff --git a/src/django_simple_nav/__init__.py b/src/django_simple_nav/__init__.py index 22b75f5..ad5451d 100644 --- a/src/django_simple_nav/__init__.py +++ b/src/django_simple_nav/__init__.py @@ -1,4 +1,4 @@ from __future__ import annotations __version__ = "0.2.0" -__template_version__ = "2024.10" +__template_version__ = "2024.13"