From 3b18e6b67d8a849db106bed71dbe05f6e166e53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Braghi=C8=99?= <31622+zerolab@users.noreply.github.com> Date: Tue, 13 Aug 2024 16:51:02 +0100 Subject: [PATCH] Prep v012 (#73) * Use frozen constraints in tox forces the exact Django/Wagtail versions * Bump ruff version * Tidy up tox config * Update changelog and bump version to 0.12 * Tweak migration dependency --- .github/workflows/ruff.yml | 3 ++- .github/workflows/test.yml | 2 +- .pre-commit-config.yaml | 3 ++- CHANGELOG.md | 7 +++++++ tox.ini | 6 +++++- wagtail_footnotes/__init__.py | 2 +- wagtail_footnotes/migrations/0006_alter_footnote_locale.py | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 903e5f3..43378fc 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -15,7 +15,8 @@ jobs: steps: - uses: actions/checkout@v4 - - run: python -Im pip install --user ruff==0.5.0 + # keep in sync with .pre-commit-config.yaml + - run: python -Im pip install --user ruff==0.5.7 - name: Run ruff run: ruff check --output-format=github wagtail_footnotes diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e666fa1..2f441e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,7 +58,7 @@ jobs: run: python -Im flit build --format wheel - name: 🧪 Run tox targets for Python ${{ matrix.python }} - run: tox --installpkg ./dist/*.whl + run: tox -q --installpkg ./dist/*.whl - name: ⬆️ Upload coverage data uses: actions/upload-artifact@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b624374..36e04c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,8 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.5.0' + # Keep in sync with .github/workflows/ruff.yml + rev: 'v0.5.7' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/CHANGELOG.md b/CHANGELOG.md index b89bdf6..5972ee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +## 0.12.0 + +- Added support for Wagtail 6.2 (https://github.com/torchbox/wagtail-footnotes/pull/72) @willbarton + Note: this adds a backwards-compatible locale verbose_name migration +- Added ability to customize the footnote reference rendering (https://github.com/torchbox/wagtail-footnotes/pull/70) @willbarton + To change the default template (`wagtail_footnotes/includes/footnote_reference.html`), add the `WAGTAIL_FOOTNOTES_REFERENCE_TEMPLATE` setting to your template + ## 0.11.0 - Improve README @benjaoming diff --git a/tox.ini b/tox.ini index 1ba661b..57b3306 100644 --- a/tox.ini +++ b/tox.ini @@ -17,13 +17,17 @@ python = [testenv] package = wheel wheel_build_env = .pkg +use_frozen_constraints = true +constrain_package_deps = true pass_env = FORCE_COLOR NO_COLOR -deps = +set_env = + python3.12: COVERAGE_CORE=sysmon +deps = django4.2: Django>=4.2,<4.3 django5.0: Django>=5.0,<5.1 diff --git a/wagtail_footnotes/__init__.py b/wagtail_footnotes/__init__.py index ee36bd2..b826021 100644 --- a/wagtail_footnotes/__init__.py +++ b/wagtail_footnotes/__init__.py @@ -1,3 +1,3 @@ -VERSION = (0, 11, 0) +VERSION = (0, 12, 0) __version__ = ".".join(map(str, VERSION)) diff --git a/wagtail_footnotes/migrations/0006_alter_footnote_locale.py b/wagtail_footnotes/migrations/0006_alter_footnote_locale.py index 32dd9a2..d0c7562 100644 --- a/wagtail_footnotes/migrations/0006_alter_footnote_locale.py +++ b/wagtail_footnotes/migrations/0006_alter_footnote_locale.py @@ -7,7 +7,7 @@ class Migration(migrations.Migration): dependencies = [ - ("wagtailcore", "0094_alter_page_locale"), + ("wagtailcore", "0078_referenceindex"), ( "wagtail_footnotes", "0005_alter_footnote_locale_alter_footnote_translation_key",