Skip to content
Open
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 .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
python-version: 3

- name: Install dependencies
run: python -m pip install --upgrade setuptools wheel
run: python -m pip install --upgrade build

- name: Build Python package
run: python setup.py bdist_wheel sdist
run: python -m build

- name: Upload Python packages artifact
uses: actions/upload-artifact@v4
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,25 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions coverage codecov

- name: Tox tests
run: tox -v
env:
DJANGO: ${{ matrix.django-version }}
WAGTAIL: ${{ matrix.wagtail-version }}

- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
name: Python ${{ matrix.python-version }}
name: Python ${{ matrix.python }}
22 changes: 5 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
default_language_version:
node: system
python: python3.12
python: python3.13
repos:
- repo: https://github.com/python/black
rev: 25.1.0
- repo: https://github.com/psf/black
rev: 26.5.1
hooks:
- id: black
exclude: migrations/
- repo: https://github.com/PyCQA/isort
rev: 6.0.1
rev: 8.0.1
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
# flake8 config is in setup.cfg
rev: 7.1.2
rev: 7.3.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.2
hooks:
- id: prettier
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: c4c991cd38b0218735858716b09924f8b20e3812
hooks:
- id: stylelint
additional_dependencies:
- stylelint@10.1.0
- stylelint-config-torchbox@0.5.0
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

Wagtail 7.4 LTS maintenance

- Support matrix narrowed to Wagtail 7.0–7.4, Django 5.2–6.0, Python 3.10–3.14
- Tox testing add Wagtail 7.2, 7.3 and 7.4 and Django 6.0
- Tox testing add Python 3.14
- Tox testing drop Wagtail 5.2, 6.3 and 6.4 (EOL), Django 4.2 and 5.1 (EOL)
- Tox testing drop Python 3.9 (EOL)
- Fix `wagtail.core.middleware.SiteMiddleware` import in test settings (renamed in Wagtail 5)
- Consolidate `setup.cfg` so `setup.py` is the single source of packaging metadata
- Release workflow switched from `python setup.py` to `python -m build`

Wagtail 7.0 maintenance

- Tox testing add Wagtail 7.0, 7.1 and Django 5.2
Expand Down
29 changes: 4 additions & 25 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
[metadata]
description-file = README.md
author = Kevin Howbrook
description = Replace all your images with files from unsplash
version = 1.0.0
url = https://github.com/kevinhowbrook/wagtail-makeup
keywords =
wagtail
django
long_description = file:README.md
long_description_content_type = text/markdown
license_files =
LICENSE.txt

[options]
python_requires = >= 3.9
setup_requires =
setuptools >= 40.6
pip >= 10
include_package_data = true
packages = find:
install_requires =
Django>=4.2
wagtail>=5.2
python-unsplash>=1.1.0, <1.2
[flake8]
max-line-length = 88
extend-ignore = E203
exclude = .tox,.venv,venv,build,dist,*.egg-info,migrations
28 changes: 19 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
long_description = f.read()

testing_extras = [
"coverage>=4.5",
"coverage>=7.0",
]

development_extras = [
"black==25.1.0",
"flake8==7.1.2",
"isort==6.0.1",
"black==26.5.1",
"flake8==7.3.0",
"isort==8.0.1",
]

setup(
Expand All @@ -33,7 +33,12 @@
license="MIT",
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
install_requires=["wagtail>=5.2", "python-unsplash>=1.1.0"],
python_requires=">=3.10",
install_requires=[
"Django>=5.2",
"wagtail>=7.0",
"python-unsplash>=1.1.0",
],
extras_require={
"testing": testing_extras,
"development": development_extras,
Expand All @@ -42,12 +47,17 @@
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.1",
"Framework :: Django :: 5.2",
"Framework :: Django :: 6.0",
"Framework :: Wagtail",
"Framework :: Wagtail :: 5",
"Framework :: Wagtail :: 6",
"Framework :: Wagtail :: 7",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
],
),
26 changes: 10 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,50 +1,44 @@
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314

[gh-actions:env]
DJANGO =
4.2: dj42
5.1: dj51
5.2: dj52
6.0: dj60

WAGTAIL =
5.2: wt52
6.3: wt63
6.4: wt64
7.0: wt70
7.1: wt71
7.3: wt73
7.4: wt74

[tox]
skipsdist = True
usedevelop = True

envlist =
py{39,310,311,312}-dj42-wt{52,63,64,70,71}
py{310,311,312,313}-dj{51,52}-wt{63,64,70,71}
py{310,311,312,313,314}-dj52-wt{70,73,74}
py{313,314}-dj60-wt{73,74}

[testenv]
description = Unit tests
install_command = pip install -e ".[testing]" -U {opts} {packages}
commands = coverage run --source=wagtailmakeup runtests.py

basepython =
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
py313: python3.13
py314: python3.14

deps =
dj42: Django>=4.2,<4.3
dj51: Django>=5.1,<5.2
dj52: Django>=5.2,<5.3
wt52: wagtail>=5.2,<5.3
wt63: wagtail>=6.3,<6.4
wt64: wagtail>=6.4,<6.5
dj60: Django>=6.0,<6.1
wt70: wagtail>=7.0,<7.1
wt71: wagtail>=7.1,<7.2
wt73: wagtail>=7.3,<7.4
wt74: wagtail>=7.4,<7.5
6 changes: 2 additions & 4 deletions wagtailmakeup/management/commands/make_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ def save_image(self, unsplash_photo):
photo = api.photo.get(unsplash_photo.id)
url = photo.urls.raw
# loop the images and save'em
print(
f"Downloading image {photo.id} > \
{MEDIA_ROOT}/unsplash-{photo.id}"
)
print(f"Downloading image {photo.id} > \
{MEDIA_ROOT}/unsplash-{photo.id}")
r = requests.get(url, stream=True)
if r.status_code == 200:
with open(MEDIA_ROOT + f"/unsplash-{photo.id}", "wb") as f:
Expand Down
2 changes: 1 addition & 1 deletion wagtailmakeup/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"wagtail.core.middleware.SiteMiddleware",
"wagtail.middleware.SiteMiddleware",
]

ROOT_URLCONF = "wagtailmakeup.tests.urls"
Expand Down
Loading