Skip to content

Commit

Permalink
bump template to v2024.13 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuadavidthomas authored Feb 16, 2024
1 parent da4515a commit 2a9690d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .copier/package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 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
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
25 changes: 18 additions & 7 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 @@ -11,28 +11,28 @@ repos:
- id: check-yaml

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.15.0
rev: 1.16.0
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.2.1
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
rev: 1.16.0
hooks:
- id: blacken-docs
alias: autoformat
additional_dependencies:
- black==22.12.0

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v4.0.0-alpha.8
hooks:
- id: prettier
# lint the following with prettier:
Expand All @@ -50,13 +50,24 @@ 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.11.0
rev: v2.12.0
hooks:
- id: pretty-format-toml
args: [--autofix]

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
rev: v0.16
hooks:
- id: validate-pyproject
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ tag = false
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"

[tool.bumpver.file_patterns]
".copier/package.yml" = [
'current_version: {version}'
]
"src/django_twc_toolbox/__init__.py" = [
'__version__ = "{version}"'
]
Expand Down
2 changes: 1 addition & 1 deletion src/django_twc_toolbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

__version__ = "0.2.1"
__template_version__ = "2024.10"
__template_version__ = "2024.13"

0 comments on commit 2a9690d

Please sign in to comment.