Skip to content

Commit

Permalink
Depend on Behave 1.2.7.dev6+, use Setuptools-SCM
Browse files Browse the repository at this point in the history
Drop Python 3.7 and Django 3.2, add Django 5.1 to test matrix
  • Loading branch information
bittner committed Oct 3, 2024
1 parent 4891fa0 commit b5e284e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 31 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,16 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
django-version:
- '3.2'
- '4.2'
- '5.0'
exclude:
- { django-version: '3.2', python-version: '3.11' }
- { django-version: '3.2', python-version: '3.12' }
- { django-version: '4.2', python-version: '3.7' }
- { django-version: '5.0', python-version: '3.7' }
- { django-version: '5.0', python-version: '3.8' }
- { django-version: '5.0', python-version: '3.9' }
- '5.1'
include:
- { django-version: '4.2', python-version: '3.8' }
- { django-version: '4.2', python-version: '3.9' }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include LICENSE
include README.rst
recursive-include behave_django *.py
prune tests
prune docs
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Version Support
---------------

*behave-django* is `tested against`_ the officially supported combinations of
Python and Django (Django 3.2, 4.2, 5.0 on Python 3.7 through 3.12).
Python and Django (Django 4.2, 5.0, 5.1 on Python 3.8 through 3.12).

*behave-django* requires a few newer features of *behave* and hence installs
a recent unreleased version of `behave`_ as a dependency.
Expand Down
19 changes: 9 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=64"]
requires = ["setuptools>=64", "setuptools_scm>=8"]

[project]
name = "behave-django"
Expand All @@ -22,15 +22,14 @@ classifiers = [
"Environment :: Plugins",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -46,10 +45,10 @@ keywords = [
"django",
"testing",
]
requires-python = ">=3.7"
requires-python = ">=3.8"
dependencies = [
"behave[toml]@git+http://github.com/behave/[email protected]", # behave>=1.2.7.dev3
"django>=3.2",
"behave[toml]>=1.2.7.dev6",
"django>=4.2",
"beautifulsoup4",
]

Expand Down Expand Up @@ -102,8 +101,8 @@ extend-ignore = ["ANN", "COM812", "D", "FIX", "Q000", "RUF012", "TD"]
"tests/unit/util.py" = ["S603"]
"tests/**/*.py" = ["ARG001", "ARG002", "INP001", "PT009", "S101"]

[tool.setuptools.dynamic]
version = {attr = "behave_django.__version__"}

[tool.setuptools.packages.find]
namespaces = false
where = ["."]

[tool.setuptools_scm]
local_scheme = "no-local-version"
14 changes: 5 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# Tox (https://tox.wiki/) - run tests in isolation using virtualenv.
# Also contains config settings for tools that don't look into pyproject.toml.

[tox]
envlist =
lint
format
# Python/Django combinations that are officially supported
py3{7,8,9,10}-django32
py3{8,9,10,11,12}-django42
py3{10,11,12}-django50
py3{8,9,10,11,12}-django{42}
py3{10,11,12}-django{50,51}
behave-latest
package
docs
clean

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
Expand All @@ -25,17 +22,17 @@ python =

[gh-actions:env]
DJANGO =
3.2: django32
4.2: django42
5.0: django50
5.1: django51

[testenv]
description = Unit tests
deps =
coverage[toml]
django32: Django>=3.2,<4.0
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
latest: Django
latest: git+https://github.com/behave/behave.git#egg=behave
pytest
Expand All @@ -50,8 +47,7 @@ commands =
description = Remove Python bytecode and other debris
skip_install = true
deps = pyclean
commands =
pyclean {posargs:. --debris --erase TESTS-*.xml *-report.xml --yes --verbose}
commands = pyclean {posargs:. --debris --erase TESTS-*.xml *-report.xml --yes --verbose}

[testenv:docs]
description = Build package documentation (HTML)
Expand Down

0 comments on commit b5e284e

Please sign in to comment.