Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for Wagtail 6.1 upgrade #24

Merged
merged 6 commits into from
Jul 14, 2024
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
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12"]
database: ["sqlite"]

steps:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12"]
database: ["postgres"]

services:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12"]
database: ["mysql"]

services:
Expand Down
17 changes: 0 additions & 17 deletions .gitpod.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 5.13.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
rev: 7.1.0
hooks:
- id: flake8
- repo: https://github.com/jackdewinter/pymarkdown
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ All notable changes to this project will be documented in this file.

- Add loading the richtext filter in a template
- Fix typo in README.md
- update for wagtail 6.0, django 4.2 and python 3.9
- update for wagtail 6.0, 6.1 & django 4.2 & 50
- update for python 3.9, 3.10, 3.11 & 3.12
- drop python 3.8 testing
- fix actions using mysql image

## [1.0.0] 2023-02-12
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,13 @@ The test app can be run to develop your contribution.
1. Fork the repo and clone it to your computer.
2. Change to the folder where you cloned it to.

With [poetry](https://python-poetry.org) installed run:
Create a virtual environment and install the dependencies:

```bash
poetry install
poetry shell
python3 -m venv venv
source venv/bin/activate
pip install -e ".[development,testing]"

# run the migrations, add an admin account and start the app
python manage.py migrate
python manage.py createsuperuser
Expand Down
1,151 changes: 0 additions & 1,151 deletions poetry.lock

This file was deleted.

78 changes: 46 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,58 +1,72 @@
[tool.poetry]
[project]
name = "wagtail-f-richtext"
version = "1.0.0"
version = "1.1.0"
description = "An alternative Wagtail richtext filter that applies classes or styles to rich text HTML content."
readme = "README.md"
authors = ["Nick Moreton <nickmoreton@me.com>"]
license = "MIT"
classifiers=[
keywords = ["wagtail", "richtext", "filter", "html", "class", "style"]
authors = [
{name = "Nick Moreton", email = "nickmoreton@me.com"}
]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Wagtail",
"Framework :: Wagtail :: 4",
"Framework :: Wagtail :: 5",
"Framework :: Wagtail :: 6",
]
requires-python = ">=3.9"
dependencies =[
"Wagtail>=4.1",
]

[tool.poetry.dependencies]
python = "^3.8"
wagtail = "^4.1"

[tool.poetry.group.dev.dependencies]
black = "^24.2.0"
tox = "^3.26.0"
coverage = "^7.1.0"

[tool.poetry.group.dev.dependencies.pymarkdownlnt]
version = ">=0.9.7"
python = "^3.11"
[project.optional-dependencies]
development = [
"black==24.4.2",
"flake8==7.1.0",
"isort==5.13.0",
]
testing = [
"coverage"
]

[tool.poetry.group.dev.dependencies.flake8]
version = ">=7.0.0"
python = "^3.11"
[project.urls]
Repository = "https://github.com/wagtail-packages/wagtail-f-richtext"
Issues = "https://github.com/wagtail-packages/wagtail-f-richtext/issues"
Changelog = "https://github.com/wagtail-packages/wagtail-f-richtext/blob/release/CHANGELOG.md"

[tool.poetry.group.dev.dependencies.isort]
version = ">=5.13.2"
python = "^3.11"

[tool.poetry.group.dev.dependencies.pre-commit]
version = ">=3.0.0"
python = "^3.11"
[tool.black]
line-length = 88
target-version = ['py39']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
profile = "black"
2 changes: 1 addition & 1 deletion tests/testapp/templates/blocks/f_richtext_block.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="border-box">
<p class="label">Template Tag:</p>
<div class="padding">{% verbatim %}{{ value|f_richtext:"inline_styles" }}{% endverbatim %}</div>
<p class="padding">This template tag will parse the html and inline styles defined in your configuration</p>
<p class="padding">This template tag will parse the html and add inline styles defined in your configuration</p>
<p class="label">HTML:</p>
<pre><code class="language-html"></code></pre>
<div class="beautify padding">{{ value|f_richtext:"inline_styles" }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>{{ page.title }}</h1>
<div class="border-box">
<p class="label">Template Tag:</p>
<div class="padding">{% verbatim %}{{ page.body|f_richtext:"inline_styles" }}{% endverbatim %}</div>
<p class="padding">This template tag will parse the html and inline styles defined in your configuration</p>
<p class="padding">This template tag will parse the html and add inline styles defined in your configuration</p>
<p class="label">HTML:</p>
<pre><code class="language-html"></code></pre>
<div class="beautify padding">{{ page.body|f_richtext:"inline_styles" }}</div>
Expand Down
31 changes: 13 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
[tox]
skipsdist = True
usedevelop = True
isolated_build = True
skip_missing_interpreters = True

envlist =
py38-django32-wagtail41-{sqlite,postgres,mysql}
py{39,310}-django{40,41}-wagtail{41,42,50,51,52}-{sqlite,postgres,mysql}
py{311}-django{42}-wagtail{52,60}-{sqlite,postgres,mysql}
py312-django42-wagtail60-{sqlite,postgres,mysql}
py39-dj32-wt41-{sqlite,postgres,mysql}
py{310,311,312}-dj{42,50}-wt{52,60,61}-{sqlite,postgres,mysql}

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
Expand All @@ -24,25 +21,23 @@ DATABASE =
mysql: mysql

[testenv]
skip_install = True
install_command = pip install -e ".[testing]" -U {opts} {packages}

commands =
coverage run manage.py test --deprecation all
coverage report -m

deps =
coverage

django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django>=4.2,<4.3

wagtail41: Wagtail>=4.1,<4.2
wagtail42: Wagtail>=4.2,<5.0
wagtail50: Wagtail>=5.0,<5.1
wagtail51: Wagtail>=5.1,<5.2
wagtail52: Wagtail>=5.2,<5.3
wagtail60: Wagtail>=6.0,<6.1
dj32: Django>=3.2,<4.0
dj42: Django>=4.2,<4.3
dj50: Django>=5.0,<5.1

wt41: Wagtail>=4.1,<4.2
wt52: Wagtail>=5.2,<5.3
wt60: Wagtail>=6.0,<6.1
wt61: Wagtail>=6.1,<6.2

postgres: psycopg2
mysql: mysqlclient
Expand Down
5 changes: 0 additions & 5 deletions wagtail_f_richtext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
default_app_config = "wagtail_f_richtext.apps.WagtailFRichtextAppConfig"


VERSION = (0, 1, 1)
__version__ = ".".join(map(str, VERSION))
Loading