Skip to content

Commit 6ab7832

Browse files
Updated files with 'repo_helper'. (#15)
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
1 parent f3be5ea commit 6ab7832

File tree

9 files changed

+62
-42
lines changed

9 files changed

+62
-42
lines changed

.github/milestones.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python
2+
3+
# stdlib
4+
import os
5+
import sys
6+
7+
# 3rd party
8+
from github3 import GitHub
9+
from github3.repos import Repository
10+
from packaging.version import InvalidVersion, Version
11+
12+
latest_tag = os.environ["GITHUB_REF_NAME"]
13+
14+
try:
15+
current_version = Version(latest_tag)
16+
except InvalidVersion:
17+
sys.exit()
18+
19+
gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"])
20+
repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1))
21+
22+
for milestone in repo.milestones(state="open"):
23+
try:
24+
milestone_version = Version(milestone.title)
25+
except InvalidVersion:
26+
continue
27+
if milestone_version == current_version:
28+
sys.exit(not milestone.update(state="closed"))

.github/workflows/cleanup.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/python_ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313

1414
permissions:
1515
actions: write
16+
issues: write
1617
contents: read
1718

1819
jobs:

.github/workflows/python_ci_linux.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414

1515
permissions:
1616
actions: write
17+
issues: write
1718
contents: read
1819

1920
jobs:
@@ -102,21 +103,26 @@ jobs:
102103
path: coverage
103104

104105
- name: Display structure of downloaded files
106+
id: show
105107
run: ls -R
106108
working-directory: coverage
109+
continue-on-error: true
107110

108111
- name: Combine Coverage 👷
112+
if: ${{ steps.show.outcome != 'failure' }}
109113
run: |
110114
shopt -s globstar
111115
python -m coverage combine coverage/**/.coverage
112116
113117
- name: "Upload Combined Coverage Artefact 🚀"
118+
if: ${{ steps.show.outcome != 'failure' }}
114119
uses: actions/upload-artifact@v2
115120
with:
116121
name: "combined-coverage"
117122
path: .coverage
118123

119124
- name: "Upload Combined Coverage to Coveralls"
125+
if: ${{ steps.show.outcome != 'failure' }}
120126
env:
121127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122128
run: |
@@ -133,21 +139,21 @@ jobs:
133139

134140
- name: Setup Python 🐍
135141
uses: "actions/setup-python@v2"
142+
if: startsWith(github.ref, 'refs/tags/')
136143
with:
137144
python-version: 3.8
138-
if: startsWith(github.ref, 'refs/tags/')
139145

140146
- name: Install dependencies 🔧
147+
if: startsWith(github.ref, 'refs/tags/')
141148
run: |
142149
python -m pip install --upgrade pip setuptools wheel
143150
python -m pip install --upgrade tox
144-
if: startsWith(github.ref, 'refs/tags/')
145151
146152
- name: Build distributions 📦
153+
if: startsWith(github.ref, 'refs/tags/')
147154
run: |
148155
tox -e build
149156
150-
if: startsWith(github.ref, 'refs/tags/')
151157
152158
- name: Upload distribution to PyPI 🚀
153159
if: startsWith(github.ref, 'refs/tags/')
@@ -156,3 +162,11 @@ jobs:
156162
user: __token__
157163
password: ${{ secrets.PYPI_TOKEN }}
158164
skip_existing: true
165+
166+
- name: Close milestone 🚪
167+
if: startsWith(github.ref, 'refs/tags/')
168+
run: |
169+
python -m pip install --upgrade github3.py packaging
170+
python .github/milestones.py
171+
env:
172+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/python_ci_macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313

1414
permissions:
1515
actions: write
16+
issues: write
1617
contents: read
1718

1819
jobs:

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
- id: end-of-file-fixer
3131

3232
- repo: https://github.com/domdfcoding/pre-commit-hooks
33-
rev: v0.2.1
33+
rev: v0.3.0
3434
hooks:
3535
- id: requirements-txt-sorter
3636
args:
@@ -40,7 +40,7 @@ repos:
4040
- id: bind-requirements
4141

4242
- repo: https://github.com/domdfcoding/flake8-dunder-all
43-
rev: v0.1.7
43+
rev: v0.1.8
4444
hooks:
4545
- id: ensure-dunder-all
4646
files: ^sphinx_debuginfo/.*\.py$
@@ -67,13 +67,13 @@ repos:
6767
- --keep-runtime-typing
6868

6969
- repo: https://github.com/Lucas-C/pre-commit-hooks
70-
rev: v1.1.10
70+
rev: v1.1.11
7171
hooks:
7272
- id: remove-crlf
7373
- id: forbid-crlf
7474

7575
- repo: https://github.com/python-formate/snippet-fmt
76-
rev: v0.1.3
76+
rev: v0.1.4
7777
hooks:
7878
- id: snippet-fmt
7979

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ sphinx-debuginfo
8989
:target: https://github.com/sphinx-toolbox/sphinx-debuginfo/commit/master
9090
:alt: GitHub last commit
9191

92-
.. |maintained| image:: https://img.shields.io/maintenance/yes/2021
92+
.. |maintained| image:: https://img.shields.io/maintenance/yes/2022
9393
:alt: Maintenance
9494

9595
.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/sphinx-debuginfo

__pkginfo__.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

tox.ini

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,18 @@ envlist =
3030
skip_missing_interpreters = True
3131
isolated_build = True
3232
requires =
33-
pip>=20.3.3
33+
pip>=21
3434
tox-envlist>=0.2.1
35-
tox-pip-version>=0.0.7
3635

3736
[envlists]
3837
test = py36, py37, py38, py39, py310, py311-dev, pypy36, pypy37
3938
qa = mypy, lint
4039
cov = py36, coverage
4140

4241
[testenv]
43-
setenv = PYTHONDEVMODE = 1
42+
setenv =
43+
PYTHONDEVMODE=1
44+
PIP_DISABLE_PIP_VERSION_CHECK=1
4445
deps = -r{toxinidir}/tests/requirements.txt
4546
commands =
4647
python --version
@@ -74,13 +75,14 @@ deps =
7475
flake8-noqa>=1.1.0
7576
flake8-pyi>=20.10.0
7677
flake8-pytest-style>=1.3.0
78+
flake8-quotes>=3.3.0
7779
flake8-slots>=0.1.0
7880
flake8-sphinx-links>=0.0.4
7981
flake8-strftime>=0.1.1
8082
flake8-typing-imports>=1.10.0
81-
git+https://github.com/domdfcoding/flake8-quotes.git
8283
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
8384
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
85+
git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods
8486
pydocstyle>=6.0.0
8587
pygments>=2.7.1
8688
importlib_metadata<4.5.0; python_version<'3.8'
@@ -142,6 +144,10 @@ multiline-quotes = """
142144
docstring-quotes = """
143145
count = True
144146
min_python_version = 3.6.1
147+
unused-arguments-ignore-abstract-functions = True
148+
unused-arguments-ignore-overload-functions = True
149+
unused-arguments-ignore-magic-methods = True
150+
unused-arguments-ignore-variadic-names = True
145151
146152
[coverage:run]
147153
plugins = coverage_pyver_pragma

0 commit comments

Comments
 (0)