-
Notifications
You must be signed in to change notification settings - Fork 15
Support Wagtail >= 4, drop support for Wagtail < 4 #72
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8a478e5
Switch to pyproject.toml
willbarton 0814b0d
Add interactive tox environment
willbarton 17e7d9c
Update release to PyPI workflow
willbarton 277a110
Use CFPB’s flag icon
willbarton 705181f
Remove checks for Wagtail > 3
willbarton 05418b0
Update project scaffolding for Wagtail 4
willbarton 1448448
Remove wagtail <3
willbarton 1a94a16
Update admin templates for Wagtail 4
willbarton aeb9ac1
Fix title tags
willbarton 684ee68
Use Wagtail’s panel.html template for fields
willbarton 2f843ee
Remove unused breadcrumb CSS
willbarton 9d273d9
Update docs and screenshots
willbarton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,28 @@ | ||
| name: Publish to PyPI | ||
| on: | ||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
|
|
||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: actions/checkout@v2 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v1 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.7 | ||
| python-version: 3.11 | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install --upgrade pip build | ||
| pip install twine wheel | ||
| - name: Build the package | ||
| run: | | ||
| python setup.py sdist bdist_wheel --universal | ||
| python -m build | ||
| - name: Upload to PyPI | ||
| run: twine upload dist/* | ||
| env: | ||
| env: | ||
| TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
| TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,3 +73,4 @@ dist/ | |
|
|
||
| # IDEs | ||
| .idea/ | ||
| *.db | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,54 @@ | ||
| [project] | ||
| name = "wagtail-flags" | ||
| version = "5.3.0" | ||
| description = "Feature flags for Wagtail sites" | ||
| readme = "README.md" | ||
| requires-python = ">=3.8" | ||
| license = {text = "CC0"} | ||
| authors = [ | ||
| {name = "CFPB", email = "[email protected]" } | ||
| ] | ||
| dependencies = [ | ||
| "wagtail>=4", | ||
| "django-flags>4.2" | ||
| ] | ||
| classifiers = [ | ||
| "Framework :: Django", | ||
| "Framework :: Django :: 3.2", | ||
| "Framework :: Django :: 4", | ||
| "Framework :: Wagtail", | ||
| "Framework :: Wagtail :: 4", | ||
| "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", | ||
| "License :: Public Domain", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| testing = [ | ||
| "coverage[toml]", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| "Homepage" = "https://github.com/cfpb/wagtail-flags" | ||
| "Bug Reports" = "https://github.com/cfpb/wagtail-flags/issues" | ||
| "Source" = "https://github.com/cfpb/wagtail-flags" | ||
|
|
||
| [build-system] | ||
| requires = ["setuptools>=43.0.0", "wheel"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [tool.setuptools.package-data] | ||
| wagtailflags = [ | ||
| "templates/wagtailflags/*", | ||
| "templates/wagtailflags/flags/*", | ||
| "templates/wagtailflags/includes/*", | ||
| "static/wagtailflags/css/*", | ||
| ] | ||
|
|
||
| [tool.black] | ||
| line-length = 79 | ||
| target-version = ['py36', 'py38'] | ||
| target-version = ["py38"] | ||
| include = '\.pyi?$' | ||
| exclude = ''' | ||
| ( | ||
|
|
@@ -14,15 +62,41 @@ exclude = ''' | |
| | dist | ||
| | migrations | ||
| | site | ||
| | \*.json | ||
| | \*.csv | ||
| )/ | ||
| ) | ||
| ''' | ||
|
|
||
| [build-system] | ||
| requires = [ | ||
| "setuptools>=42", | ||
| "wheel" | ||
| [tool.isort] | ||
| profile = "black" | ||
| line_length = 79 | ||
| lines_after_imports = 2 | ||
| skip = [".tox", ".venv", "venv"] | ||
| known_django = ["django"] | ||
| known_wagtail = ["wagtail"] | ||
| default_section = "THIRDPARTY" | ||
| sections = [ | ||
| "STDLIB", | ||
| "DJANGO", | ||
| "WAGTAIL", | ||
| "THIRDPARTY", | ||
| "FIRSTPARTY", | ||
| "LOCALFOLDER" | ||
| ] | ||
|
|
||
| [tool.ruff] | ||
| exclude = [ | ||
| ".git", | ||
| ".tox", | ||
| "__pycache__", | ||
| ] | ||
| ignore = [] | ||
| select = [ | ||
| "E", | ||
| "F", | ||
| "W", | ||
| ] | ||
|
|
||
| [tool.coverage.run] | ||
| omit = [ | ||
| "wagtailflags/tests/*", | ||
| ] | ||
| build-backend = "setuptools.build_meta" | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| from setuptools import setup | ||
|
|
||
| if __name__ == '__main__': | ||
|
|
||
| if __name__ == "__main__": | ||
| setup() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,7 @@ | |
| skipsdist=True | ||
| envlist= | ||
| lint, | ||
| py{39,310}-dj{32}-wag{215}, | ||
| py{39,310}-dj{32,40}-wag{30,latest}, | ||
| py{38,311}-dj{3,4}-wag{4,latest}, | ||
| coverage | ||
|
|
||
| [testenv] | ||
|
|
@@ -14,33 +13,50 @@ setenv= | |
| DJANGO_SETTINGS_MODULE=wagtailflags.tests.settings | ||
|
|
||
| basepython= | ||
| py39: python3.9 | ||
| py310: python3.10 | ||
| py38: python3.8 | ||
| py311: python3.11 | ||
|
|
||
| deps= | ||
| dj32: Django>=3.2,<3.3 | ||
| dj40: Django>=4.0,<4.1 | ||
| wag215: wagtail>=2.15,<2.16 | ||
| wag30: wagtail>=3.0,<3.1 | ||
| waglatest: wagtail<4 | ||
| dj3: Django>=3.2,<4 | ||
| dj4: Django>=4.1,<5 | ||
| wag4: wagtail>=4,<5 | ||
| waglatest: wagtail>4 | ||
|
|
||
| [testenv:lint] | ||
| basepython=python3.10 | ||
| basepython=python3.8 | ||
| deps= | ||
| black | ||
| flake8 | ||
| ruff | ||
| isort | ||
| commands= | ||
| black --check wagtailflags | ||
| flake8 wagtailflags | ||
| ruff wagtailflags | ||
| isort --check-only --diff wagtailflags | ||
|
|
||
| [testenv:coverage] | ||
| basepython=python3.10 | ||
| basepython=python3.8 | ||
| deps= | ||
| coverage | ||
| diff_cover | ||
| commands= | ||
| coverage combine | ||
| coverage xml | ||
| diff-cover coverage.xml --compare-branch=origin/main --fail-under=100 | ||
|
|
||
| [testenv:interactive] | ||
| basepython=python3.8 | ||
|
|
||
| deps= | ||
| Django>=3.2,<3.3 | ||
|
|
||
| commands_pre= | ||
| {envbindir}/django-admin makemigrations | ||
| {envbindir}/django-admin migrate | ||
| {envbindir}/django-admin shell -c "from django.contrib.auth.models import User;(not User.objects.filter(username='admin').exists()) and User.objects.create_superuser('admin', '[email protected]', 'changeme')" | ||
|
|
||
| commands= | ||
| {posargs:{envbindir}/django-admin runserver 0.0.0.0:8000} | ||
|
|
||
| setenv= | ||
| DJANGO_SETTINGS_MODULE=wagtailflags.tests.settings | ||
| INTERACTIVE=1 | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| .flags-breadcrumb { | ||
| margin-left: 0; | ||
| } | ||
| section.flag { | ||
| margin-top: 4em; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.