-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernise tooling and fix CI failing (#335)
* Move from setup.py to pyproject.toml Co-authored-by: Patrick Cloke <[email protected]> * Ensure unit tests run IDK we sometimes have to invoke trial explicitly like this * Use ruff instead of flake8 And remove py2-style type annotations, which ruff doesn't recognise Co-authored-by: Patrick Cloke <[email protected]> * Bump GHA actions part of matrix-org/synapse#14203 * Run black Presumably this fixes complaints from #333 and #334 * Move isort config to pyproject * Also lint stubs * Bump GHA actions part of matrix-org/synapse#14203 * Fix an unintended rename in #333 Needed for unit tests to be happy * Changelog --------- Co-authored-by: Patrick Cloke <[email protected]>
- Loading branch information
Showing
17 changed files
with
132 additions
and
204 deletions.
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
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Move from setup.py to pyproject.toml. |
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 |
---|---|---|
|
@@ -33,3 +33,83 @@ | |
directory = "misc" | ||
name = "Internal Changes" | ||
showcontent = true | ||
|
||
[tool.isort] | ||
line_length = 88 | ||
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,TESTS,LOCALFOLDER" | ||
default_section = "THIRDPARTY" | ||
known_first_party = "sygnal" | ||
known_tests = "tests" | ||
multi_line_output = 3 | ||
include_trailing_comma = true | ||
combine_as_imports = true | ||
|
||
|
||
[tool.ruff] | ||
line-length = 88 | ||
ignore = [ | ||
"E501", # https://beta.ruff.rs/docs/rules/line-too-long/. Black enforces this for us. | ||
] | ||
|
||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
# Setuptools 64 adds support for PEP 660, which makes `pip install -e .` work. | ||
requires = ["setuptools>=64", "setuptools_scm[toml]>=6.2"] | ||
|
||
[tool.setuptools_scm] | ||
# Note: including this section without any keys still has meaning, see | ||
# https://github.com/pypa/setuptools_scm/blob/51b3566170be25582b5c3216a54b024caf3d431f/README.rst?plain=1#L63-L71 | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["tests", "tests.*"] | ||
|
||
[project] | ||
name = "matrix-sygnal" | ||
dynamic = ["version"] | ||
description = "Reference Push Gateway for Matrix Notifications" | ||
readme = {file = "README.md", content-type = "text/markdown"} | ||
requires-python = "~=3.7" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{name = "Matrix.org Team and contributors", email = "[email protected]"} | ||
] | ||
dependencies = [ | ||
"aioapns>=1.10,<2.1", | ||
"attrs>=19.2.0", | ||
"cryptography>=2.6.1", | ||
"idna>=2.8", | ||
'importlib_metadata;python_version<"3.8"', | ||
"jaeger-client>=4.0.0", | ||
"matrix-common==1.0.0", | ||
"opentracing>=2.2.0", | ||
"prometheus_client>=0.7.0,<0.8", | ||
"py-vapid>=1.7.0", | ||
"pyOpenSSL>=17.5.0", | ||
"pywebpush>=1.13.0", | ||
"pyyaml>=5.1.1", | ||
"sentry-sdk>=0.10.2", | ||
"service_identity>=18.1.0", | ||
"Twisted>=19.7", | ||
'typing-extensions>=3.7.4;python_version<"3.8"', | ||
"zope.interface>=4.6.0", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black==22.3.0", | ||
"coverage~=5.5", | ||
"ruff==0.0.262", | ||
"isort~=5.0", | ||
"mypy==0.812", | ||
"mypy-zope==0.3.0", | ||
"towncrier", | ||
"tox", | ||
"types-opentracing>=2.4.2", | ||
"typing-extensions>=3.7.4", | ||
] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/matrix-org/sygnal" | ||
documentation = "https://github.com/matrix-org/sygnal/tree/main/docs" | ||
repository = "https://github.com/matrix-org/sygnal.git" | ||
changelog = "https://github.com/matrix-org/sygnal/blob/main/CHANGELOG.md" |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.