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

Switch to pyproject.toml, drop support for Django 4.1 #87

Merged
merged 10 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
18 changes: 0 additions & 18 deletions .bumpversion.cfg

This file was deleted.

4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
ignore=W293,W291,E501,E261
max-line-length=88
exclude=env,.tox
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.10', '3.11']
django: ['3.2', '4.1', '4.2']
python: ['3.10', '3.11', '3.12']
django: ['3.2', '4.2']
exclude:
- python: '3.11'
- python: ['3.11', '3.12']
django: '3.2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know that was valid syntax, TIL


name: Run the test suite (Python ${{ matrix.python }}, Django ${{ matrix.django }}
Expand Down Expand Up @@ -76,10 +76,13 @@ jobs:
with:
python-version: '3.10'

- name: Build sdist and wheel
- name: Build wheel
run: |
pip install pip setuptools wheel --upgrade
python setup.py sdist bdist_wheel
pip install build --upgrade
python -m build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Viicos marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright {% now "Y" %} Maykin Media
Copyright 2022 Maykin Media

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Requirements
------------

* Python 3.10 or newer
* setuptools 30.3.0 or newer
* Django 3.2 or newer


Expand Down
133 changes: 133 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
[build-system]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"

[project]
name = "zgw-consumers"
version = "0.30.0"
description = "Configuration for service (OpenAPI 3 or other) consumers"
authors = [
{name = "Maykin Media", email = "[email protected]"}
]
readme = "README.rst"
license = {file = "LICENSE"}
keywords = ["Django", "ZGW", "Common Ground", "VNG", "API", "OpenAPI", "OAS", "mTLS"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Intended Audience :: Developers",
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Viicos marked this conversation as resolved.
Show resolved Hide resolved
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.10"
dependencies = [
"django>=3.2",
"django-relativedelta>=2.0.0",
"django-solo",
"gemma-zds-client>=2.0.0",
"django-simple-certmanager>=1.4.1",
"requests",
"ape-pie",
]

[project.urls]
Homepage = "https://github.com/maykinmedia/zgw-consumers"
Documentation = "https://zgw-consumers.readthedocs.io/en/latest/"
"Bug Tracker" = "https://github.com/maykinmedia/zgw-consumers/issues"
"Source Code" = "https://github.com/maykinmedia/zgw-consumers"
Changelog = "https://github.com/maykinmedia/zgw-consumers/blob/main/CHANGELOG.rst"

[project.optional-dependencies]
db = [
"psycopg2",
]
drf = [
"djangorestframework",
]
# These are not the test requirements! They are extras to be installed when making use of `zgw_consumers.test`
testutils = [
"Faker>=0.7.0",
"factory-boy",
"requests-mock",
]
tests = [
"django-redis",
"pytest",
"pytest-django",
"requests-mock",
"freezegun",
"tox",
"isort",
"black",
"flake8",
"tabulate",
"pyquery",
]
coverage = [
"pytest-cov",
]
docs = [
"sphinx",
"sphinx-rtd-theme",
]
release = [
"bump-my-version",
"twine",
Viicos marked this conversation as resolved.
Show resolved Hide resolved
]

[tool.setuptools.packages.find]
include = ["zgw_consumers*"]
namespaces = false

[tool.isort]
profile = "black"
combine_as_imports = true
known_django = "django"
known_first_party="zgw_consumers"
sections=["FUTURE", "STDLIB", "DJANGO", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
Viicos marked this conversation as resolved.
Show resolved Hide resolved

[tool.pytest.ini_options]
testpaths = ["tests"]
DJANGO_SETTINGS_MODULE = "testapp.settings"

[tool.bumpversion]
current_version = "0.30.0"
files = [
{filename = "pyproject.toml"},
{filename = "README.rst"},
{filename = "zgw_consumers/locale/nl/LC_MESSAGES/django.po"},
{filename = "docs/conf.py"},
]

[tool.coverage.run]
branch = true
source = [
"zgw_consumers"
]
omit = [
"zgw_consumers/migrations/*",
]

[tool.coverage.report]
exclude_also = [
"if (typing\\.)?TYPE_CHECKING:",
"@(typing\\.)?overload",
"class .*\\(.*Protocol.*\\):",
"@(abc\\.)?abstractmethod",
"raise NotImplementedError",
"\\.\\.\\.",
"pass",
]
omit = [
"zgw_consumers/migrations/*",
]

[tool.coverage.html]
directory = "cover"
134 changes: 0 additions & 134 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

Loading
Loading