Skip to content

Commit

Permalink
Upgrade project metadata (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
asears authored Jan 22, 2025
1 parent 786e4c1 commit 630caed
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 60 deletions.
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
exclude =
.venv,
.tox,
docs,
testproject,
js_client,
.eggs

extend-ignore = E123, E128, E266, E402, W503, E731, W601, B036
max-line-length = 120
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
tests:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ test_consumer*
.python-version
.pytest_cache/
.vscode
.coverage
2 changes: 1 addition & 1 deletion daphne/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def run(self):
application=application,
endpoints=endpoints,
signal_handlers=False,
**self.kwargs
**self.kwargs,
)
# Set up a poller to look for the port
reactor.callLater(0.1, self.resolve_port)
Expand Down
78 changes: 78 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
[project]
name = "daphne"
dynamic = ["version"]
description = "Django ASGI (HTTP/WebSocket) server"
requires-python = ">=3.9"
authors = [
{ name = "Django Software Foundation", email = "[email protected]" },
]

license = { text = "BSD" }
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
]

dependencies = ["asgiref>=3.5.2,<4", "autobahn>=22.4.2", "twisted[tls]>=22.4"]

[project.optional-dependencies]
tests = [
"django",
"hypothesis",
"pytest",
"pytest-asyncio",
"pytest-cov",
"black",
"tox",
"flake8",
"flake8-bugbear",
"mypy",
]

[project.urls]
homepage = "https://github.com/django/daphne"
documentation = "https://channels.readthedocs.io"
repository = "https://github.com/django/daphne.git"
changelog = "https://github.com/django/daphne/blob/main/CHANGELOG.txt"
issues = "https://github.com/django/daphne/issues"

[project.scripts]
daphne = "daphne.cli:CommandLineInterface.entrypoint"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["daphne"]

[tool.setuptools.dynamic]
version = { attr = "daphne.__version__" }
readme = { file = "README.rst", content-type = "text/x-rst" }

[tool.isort]
profile = "black"

[tool.pytest]
testpaths = ["tests"]
asyncio_mode = "strict"
filterwarnings = ["ignore::pytest.PytestDeprecationWarning"]

[tool.coverage.run]
omit = ["tests/*"]
concurrency = ["multiprocessing"]

[tool.coverage.report]
show_missing = "true"
skip_covered = "true"

[tool.coverage.html]
directory = "reports/coverage_html_report"
59 changes: 0 additions & 59 deletions setup.cfg

This file was deleted.

0 comments on commit 630caed

Please sign in to comment.