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

Update fork from upstream #3

Merged
merged 54 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c6a5d1d
Cleanup RichTextBlockWithFootnotes (#2)
Jun 25, 2021
6e52cc8
Fix replace_footnote_tags by passing 'value' through and correct feat…
Jun 25, 2021
f0685d3
Footnote make Page and UUID unique together (#16)
Jun 30, 2021
474c19d
Bump version to 0.7.0
Jun 30, 2021
d1db7e5
Only attempt to add footnotes if the context's 'page' is a Page object
alxbridge Sep 10, 2021
7fd7ae9
Update wagtail_footnotes/blocks.py
Sep 15, 2021
0a13e37
Merge pull request #21 from torchbox/fix/page-context
zerolab Sep 15, 2021
b5fe086
Cast ``Footnote.uuid`` to string so previews work
jsma Feb 22, 2022
8f69541
update wagtail 3.0 code changes
BrianXu20 Jun 8, 2022
dd9e323
update package information
BrianXu20 Jun 8, 2022
18e23bc
update CHANGELOG
BrianXu20 Jun 8, 2022
0686c05
Merge pull request #24 from GreenLightGo/fix-preview
zerolab Jun 23, 2022
a138288
Bump version and update changelog
kevinhowbrook Jun 23, 2022
5e6cec8
Fix typo
kevinhowbrook Jun 23, 2022
a5f26e4
Merge pull request #30 from torchbox/0.7.1-version-bump
kevinhowbrook Jun 23, 2022
bc6b686
Modify setup.py so package can be detected by GitHub (#31)
zerolab Jun 23, 2022
56b239e
Merge branch 'master' into feature/wagtail-3.0
kevinhowbrook Jun 23, 2022
1308617
Bump to version 0.8.0
kevinhowbrook Jun 23, 2022
0f27544
Merge pull request #29 from BrianXu20/feature/wagtail-3.0
kevinhowbrook Jun 23, 2022
b432a05
Drop Django constraint and let Wagtail dictate it
kevinhowbrook Jun 24, 2022
21a3ad5
Merge pull request #33 from torchbox/drop-django-constraint
kevinhowbrook Jun 24, 2022
69fb9b6
Adds apps file to specifcy auto field
Jul 25, 2022
35bd4ac
Add GitHub Action to publish to PyPI on release
zerolab Oct 13, 2022
25dc1b2
Merge pull request #45 from torchbox/chore/gh-action-publish
nickmoreton Oct 14, 2022
1fcc5ec
Allow wagtail 4
nickmoreton Sep 23, 2022
7a781c7
Alter footnotes admin css selector
nickmoreton Sep 23, 2022
a18d108
Adjust footnotes template to match the new style
nickmoreton Sep 23, 2022
6ce9217
Wagtail 2.15,2.16 & 3.0 adjustments
nickmoreton Sep 23, 2022
5a4f98a
Fixed typo in template name (#44)
jsma Oct 5, 2022
78ffd6b
Revise version to 0.9.0
nickmoreton Oct 14, 2022
3f13575
Merge pull request #42 from torchbox/support/wagtail-4
nickmoreton Oct 14, 2022
e96c6d4
Update CHANGELOG.md
nickmoreton Oct 14, 2022
ab35e79
Update CHANGELOG.md
nickmoreton Oct 14, 2022
8531551
Merge pull request #38 from developersociety/add-apps
nickmoreton Oct 17, 2022
954aa31
Updates to support Wagtail 5 (#49)
nickmoreton Jul 28, 2023
07954ee
Switch to using ruff
zerolab Jul 28, 2023
ae0e926
Lint
zerolab Jul 28, 2023
adfc89b
Remove unused template/JS
zerolab Jul 28, 2023
f2df462
Tidy up GitHub Actions
zerolab Jul 28, 2023
f24bc4f
Switch to tox 4
zerolab Jul 28, 2023
3f4dd9c
Test against Wagtail 5.1 (and drop 4.2)
zerolab Jul 28, 2023
804f689
Tidy up coverage configuration
zerolab Jul 28, 2023
f227c05
Build and use wheel in CI
zerolab Jul 28, 2023
4b25d05
Add coverage report in CI
zerolab Jul 28, 2023
15ba70f
Switch to using PyPI trusted publishing (#53)
zerolab Jul 28, 2023
d21402a
Switch to using flit for package build (#54)
zerolab Jul 28, 2023
2c917c3
Drop the docs folder
zerolab Jul 28, 2023
deb33ae
Update the CHANGELOG
zerolab Jul 28, 2023
df367bc
Bump version to 0.10.0
zerolab Jul 28, 2023
e576782
Added basic contributing notes (#56)
jsma Aug 1, 2023
7488a06
Add formal Wagtail 5.2 support (#63)
katdom13 Nov 20, 2023
d52376f
Merge remote-tracking branch 'upstream/main' into chore/update-fork-f…
jhonatan-lopes Jan 16, 2024
710084f
Adapt syntax for Wagtail 4
jhonatan-lopes Jan 16, 2024
8a592ac
Reorder migration
jhonatan-lopes Jan 16, 2024
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
56 changes: 56 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish to PyPI

on:
release:
types: [released, prereleased]

permissions:
contents: read # to fetch code (actions/checkout)

env:
PYTHON_LATEST: "3.11"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_LATEST}}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: ⬇️ Install dependencies
run: |
python -Im pip install flit
python -Im flit install --symlink
- name: 🏗️ Build
run: python -Im flit build

- uses: actions/upload-artifact@v3
with:
path: ./dist

# https://docs.pypi.org/trusted-publishers/using-a-publisher/
pypi-publish:
needs: build
environment: 'release'

name: ⬆️ Upload release to PyPI
runs-on: ubuntu-latest
permissions:
# Mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v3

- name: 🚀 Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
print-hash: true
101 changes: 101 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: CI

on:
push:
branches:
- main
- 'stable/**'

pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

env:
FORCE_COLOR: "1" # Make tools pretty.
TOX_TESTENV_PASSENV: FORCE_COLOR
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_NO_PYTHON_VERSION_WARNING: "1"
PYTHON_LATEST: "3.11"


jobs:

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_LATEST}}
- uses: pre-commit/action@v3.0.0

tests:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: 🐍 Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: 📦 Install dependencies
run: |
python -Im pip install tox tox-gh-actions flit
python -Im flit install --symlink
- name: 🏗️ Build wheel
run: python -Im flit build --format wheel

- name: 🧪 Run tox targets for Python ${{ matrix.python-version }}
run: tox --installpkg ./dist/*.whl

- name: ⬆️ Upload coverage data
uses: actions/upload-artifact@v3
with:
name: coverage-data
path: .coverage.*
if-no-files-found: ignore
retention-days: 1

coverage:
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
# Use latest Python, so it understands all syntax.
python-version: ${{env.PYTHON_LATEST}}

- run: python -Im pip install --upgrade "coverage[toml]>=7.2,<8.0"

- name: ⬇️ Download coverage data
uses: actions/download-artifact@v3
with:
name: coverage-data

- name: + Combine coverage
run: |
python -Im coverage combine
python -Im coverage html --skip-covered --skip-empty
python -Im coverage report
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
- name: 📈 Upload HTML report if check failed.
uses: actions/upload-artifact@v3
with:
name: html-report
path: htmlcov
165 changes: 162 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,164 @@
__pycache__
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

dist/
# C extensions
*.so

# Distribution / packaging
.Python
build/
wagtail_footnotes.egg-info/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/


# local
test_wagtail_footnotes.db
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
ci:
autofix_prs: false

default_language_version:
python: python3.11

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.280'
hooks:
- id: ruff
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.15.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7.0]
- repo: https://github.com/adamchainz/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.7.0
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.12
hooks:
- id: pymarkdown
args:
- --disable-rules
- line-length
- scan
Loading