Skip to content

Commit 630caed

Browse files
authored
Upgrade project metadata (#542)
1 parent 786e4c1 commit 630caed

File tree

6 files changed

+95
-60
lines changed

6 files changed

+95
-60
lines changed

.flake8

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[flake8]
2+
exclude =
3+
.venv,
4+
.tox,
5+
docs,
6+
testproject,
7+
js_client,
8+
.eggs
9+
10+
extend-ignore = E123, E128, E266, E402, W503, E731, W601, B036
11+
max-line-length = 120

.github/workflows/tests.yml

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- main
77
pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
812

913
jobs:
1014
tests:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ test_consumer*
1313
.python-version
1414
.pytest_cache/
1515
.vscode
16+
.coverage

daphne/testing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def run(self):
158158
application=application,
159159
endpoints=endpoints,
160160
signal_handlers=False,
161-
**self.kwargs
161+
**self.kwargs,
162162
)
163163
# Set up a poller to look for the port
164164
reactor.callLater(0.1, self.resolve_port)

pyproject.toml

+78
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,81 @@
1+
[project]
2+
name = "daphne"
3+
dynamic = ["version"]
4+
description = "Django ASGI (HTTP/WebSocket) server"
5+
requires-python = ">=3.9"
6+
authors = [
7+
{ name = "Django Software Foundation", email = "[email protected]" },
8+
]
9+
10+
license = { text = "BSD" }
11+
classifiers = [
12+
"Development Status :: 4 - Beta",
13+
"Environment :: Web Environment",
14+
"Intended Audience :: Developers",
15+
"License :: OSI Approved :: BSD License",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
24+
"Topic :: Internet :: WWW/HTTP",
25+
]
26+
27+
dependencies = ["asgiref>=3.5.2,<4", "autobahn>=22.4.2", "twisted[tls]>=22.4"]
28+
29+
[project.optional-dependencies]
30+
tests = [
31+
"django",
32+
"hypothesis",
33+
"pytest",
34+
"pytest-asyncio",
35+
"pytest-cov",
36+
"black",
37+
"tox",
38+
"flake8",
39+
"flake8-bugbear",
40+
"mypy",
41+
]
42+
43+
[project.urls]
44+
homepage = "https://github.com/django/daphne"
45+
documentation = "https://channels.readthedocs.io"
46+
repository = "https://github.com/django/daphne.git"
47+
changelog = "https://github.com/django/daphne/blob/main/CHANGELOG.txt"
48+
issues = "https://github.com/django/daphne/issues"
49+
50+
[project.scripts]
51+
daphne = "daphne.cli:CommandLineInterface.entrypoint"
52+
153
[build-system]
254
requires = ["setuptools"]
355
build-backend = "setuptools.build_meta"
56+
57+
[tool.setuptools]
58+
packages = ["daphne"]
59+
60+
[tool.setuptools.dynamic]
61+
version = { attr = "daphne.__version__" }
62+
readme = { file = "README.rst", content-type = "text/x-rst" }
63+
64+
[tool.isort]
65+
profile = "black"
66+
67+
[tool.pytest]
68+
testpaths = ["tests"]
69+
asyncio_mode = "strict"
70+
filterwarnings = ["ignore::pytest.PytestDeprecationWarning"]
71+
72+
[tool.coverage.run]
73+
omit = ["tests/*"]
74+
concurrency = ["multiprocessing"]
75+
76+
[tool.coverage.report]
77+
show_missing = "true"
78+
skip_covered = "true"
79+
80+
[tool.coverage.html]
81+
directory = "reports/coverage_html_report"

setup.cfg

-59
This file was deleted.

0 commit comments

Comments
 (0)