Skip to content
Merged
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
7 changes: 4 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v5

- run: git clone https://github.com/wagtail/wagtail.git

- run: python -m pip install flit
- run: flit install --deps=production --extras=mailchimp,mrml,testing
- run: python -m pip install ./wagtail
- run: uv sync --extra=testing --extra=mailchimp --extra=mrml
- run: uv pip install ./wagtail

- run: pytest -vv

Expand Down
35 changes: 16 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
env:
FLIT_ROOT_INSTALL: true
run: |
python -m pip install flit
python -m flit install --deps=production --extras=mailchimp,mrml,testing,ci --symlink
- uses: pre-commit/[email protected]
uv sync --extra=dev
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Run pre-commit
run: uv tool run --with=pre-commit-uv pre-commit run --all-files
- uses: jakebailey/pyright-action@v2
with:
version: PATH
Expand All @@ -50,12 +51,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install .[ci]
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Test
run: tox
run: uv tool run --with=tox-uv --with=tox-gh-actions tox
env:
DB: sqlite

Expand All @@ -64,11 +63,11 @@ jobs:
needs: lint
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
python: ['3.10', '3.11', '3.12', '3.13']

services:
postgres:
image: ${{ matrix.postgres || 'postgres:13' }}
image: ${{ matrix.postgres || 'postgres:14' }}
env:
POSTGRES_PASSWORD: postgres
ports:
Expand All @@ -81,12 +80,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install .[ci]
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Test
run: tox
run: uv tool run --with=tox-uv --with=tox-gh-actions tox
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/wagtail_newsletter
DB: postgres
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added
- Development tooling with `uv` (#85)
- Support for Django 5.2, Wagtail 7.0 and 7.1. (#85)

### Removed

- Support for Python 3.9, Django 5.0, Wagtail 5.2 and 6.4. (#85)

## [0.2.2] - 2025-04-16

### Added
Expand Down
11 changes: 8 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ git clone https://github.com/wagtail/wagtail-newsletter.git
cd wagtail-newsletter
```

With your preferred virtualenv activated, install testing dependencies:
Install development dependencies:

### Using uv (recommended)

```sh
uv sync --extra=dev
```

### Using pip

```sh
python -m pip install --upgrade 'pip>=21.3'
python -m pip install -e '.[testing,ci,mailchimp,mrml]' -U
python -m pip install -e '.[dev]' -U
```

### Using flit
Expand Down Expand Up @@ -56,6 +62,5 @@ To run the test app interactively, use `tox -e interactive`, visit `http://127.0
The documentation source lives under `docs/`. It's built with [Sphinx](https://www.sphinx-doc.org/). You can start a development server that will auto-build and refresh the page in the browser:

```sh
pip install sphinx-autobuild
sphinx-autobuild docs docs/_build/html
```
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Turn Wagtail pages into newsletters.

## Supported versions

- Python (3.9, 3.10, 3.11, 3.12)
- Django (4.2, 5.0)
- Wagtail (5.2, 6.1, 6.2)
- Python (3.10, 3.11, 3.12, 3.13)
- Django (4.2, 5.1, 5.2)
- Wagtail (6.3, 7.0, 7.1)

## Installation

Expand Down
41 changes: 21 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,51 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Django :: 5.2",
"Framework :: Wagtail",
"Framework :: Wagtail :: 5",
"Framework :: Wagtail :: 6",
"Framework :: Wagtail :: 7",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dynamic = ["version"]
dependencies = [
"Django>=4.2",
"Wagtail>=5.2",
"Wagtail>=6.3",
"queryish>=0.2",
]

[project.optional-dependencies]
testing = [
"dj-database-url==2.1.0",
"django-debug-toolbar==4.4.2",
"django-stubs==4.2.7",
"pre-commit==3.4.0",
"pyright==1.1.360",
"pytest==8.1.1",
"pytest-cov==5.0.0",
"pytest-django==4.8.0",
]
ci = [
"tox==4.11.3",
"tox-gh-actions==3.1.3",
"dj-database-url",
"django-debug-toolbar",
"django-stubs",
"pyright",
"pytest",
"pytest-cov",
"pytest-django",
]
docs = [
"sphinx==7.3.7",
"sphinx-wagtail-theme==6.4.0",
"sphinx",
"sphinx-wagtail-theme",
"sphinx-autobuild",
]
mailchimp = [
"mailchimp-marketing>=3.0.80",
]
mrml = [
"mrml>=0.2",
]
dev = [
"wagtail-newsletter[testing,docs,mailchimp,mrml]",
"psycopg",
]

[project.urls]
Home = "https://github.com/wagtail/wagtail-newsletter"
Expand All @@ -79,7 +80,7 @@ exclude = [
]

[tool.pyright]
pythonVersion = "3.9"
pythonVersion = "3.10"

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "wagtail_newsletter.test.settings"
Expand Down
13 changes: 4 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
[tox]
envlist =
python{3.9,3.10,3.11,3.12}-django{4.2}-wagtail{5.2,6.3,6.4}-{sqlite,postgres}
python{3.10,3.11,3.12}-django{5.0}-wagtail{5.2}-{sqlite,postgres}
python{3.10,3.11,3.12}-django{5.0,5.1}-wagtail{6.3,6.4}-{sqlite,postgres}
python{3.13}-django{5.1}-wagtail{6.3,6.4}-{sqlite,postgres}
python{3.10,3.11,3.12,3.13}-django{4.2,5.1,5.2}-wagtail{6.3,7.0,7.1}-{sqlite,postgres}

[gh-actions]
python =
3.9: python3.9
3.10: python3.10
3.11: python3.11
3.12: python3.12
Expand All @@ -22,7 +18,6 @@ DB =
commands = pytest --cov {posargs: -vv}

basepython =
python3.9: python3.9
python3.10: python3.10
python3.11: python3.11
python3.12: python3.12
Expand All @@ -32,12 +27,12 @@ deps =
coverage

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

wagtail5.2: wagtail>=5.2,<5.3
wagtail6.3: wagtail>=6.3,<6.4
wagtail6.4: wagtail>=6.4,<6.5
wagtail7.0: wagtail>=7.0,<7.1
wagtail7.1: wagtail>=7.1,<7.2

postgres: psycopg2>=2.6

Expand Down
Loading