1
0

Compare commits

...

8 Commits

Author SHA1 Message Date
David Robertson
079a68d223 Merge branch 'dmr/isort-config' into dmr/poetry-pieces 2022-02-22 10:37:23 +00:00
David Robertson
c9366d3500 Let isort find pyproject.toml by itself 2022-02-22 10:14:42 +00:00
David Robertson
e5ae59e5f5 Changelog 2022-02-21 20:56:13 +00:00
David Robertson
a4c35a4ecf Changelog 2022-02-21 18:23:13 +00:00
David Robertson
8f74470309 Use backend-meta workflow for packaging 2022-02-21 18:15:03 +00:00
David Robertson
ea481eac02 Run release-artifacts on release branches 2022-02-21 18:14:43 +00:00
David Robertson
df53aec6b5 Don't build distribution pkgs in tests.yml 2022-02-21 18:09:53 +00:00
David Robertson
4b26e8bf5f Move isort config to pyproject.toml 2022-02-18 17:27:38 +00:00
7 changed files with 18 additions and 40 deletions

View File

@@ -7,7 +7,7 @@ on:
# of things breaking (but only build one set of debs)
pull_request:
push:
branches: ["develop"]
branches: ["develop", "release-*"]
# we do the full build on tags.
tags: ["v*"]
@@ -91,17 +91,7 @@ jobs:
build-sdist:
name: "Build pypi distribution files"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install wheel
- run: |
python setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v2
with:
name: python-dist
path: dist/*
uses: "matrix-org/backend-meta/.github/workflows/packaging.yml@v1"
# if it's a tag, create a release and attach the artifacts to it
attach-assets:

View File

@@ -48,24 +48,10 @@ jobs:
env:
PULL_REQUEST_NUMBER: ${{ github.event.number }}
lint-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- run: pip install wheel
- run: python setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v2
with:
name: Python Distributions
path: dist/*
# Dummy step to gate other tests on without repeating the whole list
linting-done:
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
needs: [lint, lint-crlf, lint-newsfile, lint-sdist]
needs: [lint, lint-crlf, lint-newsfile]
runs-on: ubuntu-latest
steps:
- run: "true"
@@ -397,7 +383,6 @@ jobs:
- lint
- lint-crlf
- lint-newsfile
- lint-sdist
- trial
- trial-olddeps
- sytest

1
changelog.d/12051.misc Normal file
View File

@@ -0,0 +1 @@
Tidy up GitHub Actions config which builds distributions for PyPI.

1
changelog.d/12052.misc Normal file
View File

@@ -0,0 +1 @@
Move `isort` configuration to `pyproject.toml`.

View File

@@ -54,3 +54,15 @@ exclude = '''
)/
)
'''
[tool.isort]
line_length = 88
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "TWISTED", "FIRSTPARTY", "TESTS", "LOCALFOLDER"]
default_section = "THIRDPARTY"
known_first_party = ["synapse"]
known_tests = ["tests"]
known_twisted = ["twisted", "OpenSSL"]
multi_line_output = 3
include_trailing_comma = true
combine_as_imports = true

View File

@@ -19,14 +19,3 @@ ignore =
# E731: do not assign a lambda expression, use a def
# E501: Line too long (black enforces this for us)
ignore=W503,W504,E203,E731,E501
[isort]
line_length = 88
sections=FUTURE,STDLIB,THIRDPARTY,TWISTED,FIRSTPARTY,TESTS,LOCALFOLDER
default_section=THIRDPARTY
known_first_party = synapse
known_tests=tests
known_twisted=twisted,OpenSSL
multi_line_output=3
include_trailing_comma=true
combine_as_imports=true

View File

@@ -166,7 +166,7 @@ commands =
[testenv:check_isort]
extras = lint
commands = isort -c --df --sp setup.cfg {[base]lint_targets}
commands = isort -c --df {[base]lint_targets}
[testenv:check-newsfragment]
skip_install = true