Skip to content

Commit

Permalink
Prep release 0.4 (#27)
Browse files Browse the repository at this point in the history
* Drop support for Python 3.8
  https://endoflife.date/python
* Tidy up tox.ini
* Update ruff version
* Bump version to 0.4
* Tweak pre-commit.ci autoupdate schedule
  • Loading branch information
zerolab authored Aug 22, 2024
1 parent b9384ad commit 1eea3d9
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:

- name: ⬇️ Install build dependencies
run: |
python -Im pip install flit
python -m pip install uv --quiet --upgrade
python -Im uv pip install flit
python -Im flit install --symlink
- name: 🏗️ Build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- uses: actions/checkout@v4

# keep in sync with .pre-commit-config.yaml
- run: python -Im pip install --user ruff==0.4.9
- run: python -Im pip install --user ruff==0.6.1

- name: Run ruff
working-directory: ./src
run: ruff --output-format=github wagtail_periodic_review
run: ruff check --output-format=github wagtail_periodic_review
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
disable-sudo: true
egress-policy: block
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
disable-sudo: true
egress-policy: block
Expand Down
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ default_language_version:
# Keep in sync with test.yml/PYTHON_LATEST
python: python3.12

ci:
autoupdate_schedule: monthly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand All @@ -18,7 +21,7 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# keep in sync with .github/workflows/ruff.yml
rev: 'v0.5.5'
rev: 'v0.6.1'
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@

## Unreleased

## [0.4.0] - 2024-08-22

### Added

- Added official Wagtail 6.2 support
- Added official Wagtail 6.2 support (@engineervix)

### Fixed

- Interactive tox env (@engineervix)

### Removed

- Support for Python 3.8

## [0.3.1] - 2024-06-18

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Now you can run tests as shown below:
tox
```

or, you can run them for a specific environment `tox -e py3.12-django5.0-wagtail5.2` or specific test
`tox -e py3.12-django5.0-wagtail5.2 -- tests.test_file.TestClass.test_method`
or, you can run them for a specific environment `tox -e python3.12-django4.2-wagtail5.2` or specific test
`tox -e python3.12-django4.2-wagtail5.2 -- tests.test_file.TestClass.test_method`

To run the test app interactively, use `tox -e interactive`, visit `http://127.0.0.1:8020/admin/` and log in with `admin`/`changeme`.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ classifiers = [
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Wagtail",
"Framework :: Wagtail :: 5",
"Framework :: Wagtail :: 6",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

dynamic = ["version"]
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = [
"Wagtail>=5.2",
"python-dateutil>=2.8,<3.0.0"
Expand Down Expand Up @@ -55,6 +55,7 @@ exclude = [
"*.ini",
"*.sqlite3",
"*.yml",
"*.yaml",
"ruff.toml",
"manage.py",
]
2 changes: 1 addition & 1 deletion src/wagtail_periodic_review/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = (0, 3, 1)
VERSION = (0, 4, 0)
__version__ = ".".join(map(str, VERSION))
3 changes: 2 additions & 1 deletion src/wagtail_periodic_review/wagtail_hooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any, Mapping
from collections.abc import Mapping
from typing import Any

from django.urls import path, reverse
from django.utils.translation import gettext as _
Expand Down
23 changes: 12 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
[tox]
min_version = 4.0
min_version = 4.11

env_list =
py{38,39,310,311}-django4.2-wagtail{5.2,6.1,6.2,main}
py{310,311,312}-django5.0-wagtail{5.2,6.1,6.2,main}
py312-django5.1-wagtail{6.2,main}
python{39,310,311}-django4.2-wagtail{5.2,6.1,6.2}
python{310,311,312}-django5.0-wagtail{5.2,6.1,6.2}
python312-django5.1-wagtail{6.2,main}

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.9: python39
3.10: python310
3.11: python311
3.12: python312

[testenv]
package = wheel
Expand All @@ -28,14 +27,16 @@ setenv =
PYTHONPATH = {toxinidir}
DJANGO_SETTINGS_MODULE = tests.settings
PYTHONDEVMODE = 1
# will use the Python 3.12+ sys.monitoring when available
COVERAGE_CORE=sysmon
# use the Python 3.12+ sys.monitoring
python3.12: COVERAGE_CORE=sysmon

deps =
coverage>=7.0,<8.0

django4.2: Django>=4.2,<4.3
django5.0: Django>=5.0,<5.1
django5.1: Django>=5.1,<5.2

wagtail5.2: wagtail>=5.2,<5.3
wagtail6.1: wagtail>=6.1,<6.2
wagtail6.2: wagtail>=6.2,<6.3
Expand Down

0 comments on commit 1eea3d9

Please sign in to comment.