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
40 changes: 19 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on: push
# - At least one test run for older supported version of Python and Django

# Current configuration:
# - python 3.12, django 5.0
# - python 3.12, django 4.2
# - python 3.11, django 4.1
# - python 3.10, django 4.0
# - python 3.9, django 3.2
Expand All @@ -19,20 +21,12 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
cache: "pip"
cache-dependency-path: "**/setup.cfg"
cache-dependency-path: "pyproject.toml"
- run: pip install -e .[lint]
- name: Run flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run isort
run: isort . --check-only --diff
- name: Run black
run: black . --check --fast
- name: Run ruff
run: ruff check .

test:
name: 🧪 Test
Expand All @@ -44,22 +38,26 @@ jobs:
strategy:
matrix:
include:
- name: dj41-py310
django: 'Django>=4.1,<4.2'
python: '3.10'
- name: dj5-py312
django: 'Django>=5,<5.1'
python: '3.12'
latest: true
experimental: false
- name: dj42-py312
django: 'Django>=4.2,<5'
python: '3.12'
experimental: false
- name: dj41-py311
django: 'Django>=4.1,<4.2'
python: '3.11'
experimental: false
- name: dj32-py39
django: 'Django>=3.2,<4.0'
python: '3.9'
experimental: false
- name: dj31-py38
django: 'Django>=3.1,<3.2'
python: '3.8'
experimental: false
- name: djmain-py311
- name: djmain-py312
django: 'git+https://github.com/django/django.git@main#egg=Django'
python: '3.11'
python: '3.12'
experimental: true
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

86 changes: 65 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,65 @@
[tool.black]
line_length = 88
target-version = ['py38']
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.mypy_cache
| \.tox
| \.venv
| __pycache__
| _build
| build
| dist
| docs
| venv
| node_modules
)/
)
'''
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "django-querystring-tag"
authors = [{name = "Andy Babic", email = "andyjbabic@gmail.com"}]
description = "A single, powerful template tag for modifying and rendering safe, suitably-encoded querystrings. It's the clean and simple way to create pagination links, filter toggles, and other state-preserving links."
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
]
dynamic = ["version"]
requires-python = ">=3.11"
dependencies = [
"Django>=4.2",
]
[project.optional-dependencies]
lint = [
"ruff>=0.5",
]
test = [
"dj-database-url==2.1.0",
"pytest-cov==2.12.1",
"pytest-mock==3.12.0",
"pytest-django>=4.5.2",
"pytest>=7.4.2",
]

[project.urls]
Home = "https://github.com/ababic/django-querystring-tag"

[tool.flit.module]
name = "querystring_tag"

[tool.flit.sdist]
exclude = [
"querystring_tag/testapp",
"querystring_tag/templatetags/tests.py",
]

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "testapp.settings"
pythonpath = ["tests.py", "test_*.py", "*_tests.py"]
addopts = "--tb=short"
log_level = "INFO"
filterwarnings = [
"ignore::DeprecationWarning",
]

[tool.ruff]
lint.select = ["F", "E", "C90", "I", "B", "DJ", "RUF", "TRY", "C4", "TCH005", "TCH004"]
lint.ignore = ["TRY003", "E501", "RUF012"]
6 changes: 0 additions & 6 deletions pytest.ini

This file was deleted.

61 changes: 0 additions & 61 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.