-
Notifications
You must be signed in to change notification settings - Fork 273
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
Upgrade to pyproject, bump pyupgrade #542
Merged
Merged
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
891fbdd
pyproject upgrade
asears 8e331ef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9e201ed
add flake8-pyproject for pyproject toml upgrade
asears 54351df
add flake8 pyproject for pyproject upgrade
asears 850afcd
Merge branch 'main' into upgrade-to-pyproject
asears bef172a
Update .pre-commit-config.yaml
asears cf2406a
add back tox
asears ed1e2bd
update to remove flake8 settings
asears f245e7f
revert
asears 571603a
update flake8
asears aab4b5a
Merge branch 'main' into upgrade-to-pyproject
asears 84aa671
Added final linebreak to .flake8
carltongibson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,10 @@ on: | |
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,35 @@ | ||
# Intellij | ||
.idea/ | ||
*.egg-info | ||
|
||
# Python binary files | ||
*.pyc | ||
__pycache__ | ||
|
||
# Wheel builds | ||
dist/ | ||
build/ | ||
.eggs | ||
|
||
# Tox | ||
/.tox | ||
|
||
# Hypothesis | ||
.hypothesis | ||
|
||
# Cache | ||
.cache | ||
.eggs | ||
.pytest_cache/ | ||
|
||
# Tests | ||
test_layer* | ||
test_consumer* | ||
|
||
.python-version | ||
.pytest_cache/ | ||
|
||
# Vscode | ||
.vscode | ||
|
||
# pytest-cov code coverage | ||
.coverage | ||
.coverage.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,96 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
[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" | ||
|
||
[tool.setuptools] | ||
packages = ["daphne"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "daphne.__version__" } | ||
readme = { file = "README.rst", content-type = "text/x-rst" } | ||
|
||
[tool.flake8] | ||
exclude = [ | ||
"venv/*", | ||
"tox/*", | ||
"docs/*", | ||
"testproject/*", | ||
"js_client/*", | ||
".eggs/*", | ||
] | ||
extend-ignore = ["E123", "E128", "E266", "E402", "W503", "E731", "W601", "B036"] | ||
max-line-length = 120 | ||
|
||
[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" | ||
|
||
[tool.tox] | ||
envlist = ["py39", "py310", "py311", "py312", "py313"] | ||
|
||
[tool.tox.testenv] | ||
extras = ["tests"] | ||
commands = ["pytest -v {posargs}"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing the value of the changes to this file.
e.g. this adds nothing:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I would lean towards commenting the gitignores so if and when you switch tooling you can update.
Github's template provides this example comment for tox though I don't think that's quite accurate.
# Unit test / coverage reports
https://github.com/github/gitignore/blob/main/Python.gitignore
I'll remove them though, feel free to edit the PR.