Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/milestones.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python

# stdlib
import os
import sys

# 3rd party
from github3 import GitHub
from github3.repos import Repository
from packaging.version import InvalidVersion, Version

latest_tag = os.environ["GITHUB_REF_NAME"]

try:
current_version = Version(latest_tag)
except InvalidVersion:
sys.exit()

gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"])
repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1))

for milestone in repo.milestones(state="open"):
try:
milestone_version = Version(milestone.title)
except InvalidVersion:
continue
if milestone_version == current_version:
sys.exit(not milestone.update(state="closed"))
14 changes: 0 additions & 14 deletions .github/workflows/cleanup.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

permissions:
actions: write
issues: write
contents: read

jobs:
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

permissions:
actions: write
issues: write
contents: read

jobs:
Expand Down Expand Up @@ -102,21 +103,26 @@ jobs:
path: coverage

- name: Display structure of downloaded files
id: show
run: ls -R
working-directory: coverage
continue-on-error: true

- name: Combine Coverage 👷
if: ${{ steps.show.outcome != 'failure' }}
run: |
shopt -s globstar
python -m coverage combine coverage/**/.coverage

- name: "Upload Combined Coverage Artefact 🚀"
if: ${{ steps.show.outcome != 'failure' }}
uses: actions/upload-artifact@v2
with:
name: "combined-coverage"
path: .coverage

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

- name: Setup Python 🐍
uses: "actions/setup-python@v2"
if: startsWith(github.ref, 'refs/tags/')
with:
python-version: 3.8
if: startsWith(github.ref, 'refs/tags/')

- name: Install dependencies 🔧
if: startsWith(github.ref, 'refs/tags/')
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
if: startsWith(github.ref, 'refs/tags/')

- name: Build distributions 📦
if: startsWith(github.ref, 'refs/tags/')
run: |
tox -e build

if: startsWith(github.ref, 'refs/tags/')

- name: Upload distribution to PyPI 🚀
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -156,3 +162,11 @@ jobs:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true

- name: Close milestone 🚪
if: startsWith(github.ref, 'refs/tags/')
run: |
python -m pip install --upgrade github3.py packaging
python .github/milestones.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

permissions:
actions: write
issues: write
contents: read

jobs:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
- id: end-of-file-fixer

- repo: https://github.com/domdfcoding/pre-commit-hooks
rev: v0.2.1
rev: v0.3.0
hooks:
- id: requirements-txt-sorter
args:
Expand All @@ -40,7 +40,7 @@ repos:
- id: bind-requirements

- repo: https://github.com/domdfcoding/flake8-dunder-all
rev: v0.1.7
rev: v0.1.8
hooks:
- id: ensure-dunder-all
files: ^sphinx_debuginfo/.*\.py$
Expand All @@ -67,13 +67,13 @@ repos:
- --keep-runtime-typing

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
rev: v1.1.11
hooks:
- id: remove-crlf
- id: forbid-crlf

- repo: https://github.com/python-formate/snippet-fmt
rev: v0.1.3
rev: v0.1.4
hooks:
- id: snippet-fmt

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ sphinx-debuginfo
:target: https://github.com/sphinx-toolbox/sphinx-debuginfo/commit/master
:alt: GitHub last commit

.. |maintained| image:: https://img.shields.io/maintenance/yes/2021
.. |maintained| image:: https://img.shields.io/maintenance/yes/2022
:alt: Maintenance

.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/sphinx-debuginfo
Expand Down
16 changes: 0 additions & 16 deletions __pkginfo__.py

This file was deleted.

14 changes: 10 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ envlist =
skip_missing_interpreters = True
isolated_build = True
requires =
pip>=20.3.3
pip>=21
tox-envlist>=0.2.1
tox-pip-version>=0.0.7

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

[testenv]
setenv = PYTHONDEVMODE = 1
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
deps = -r{toxinidir}/tests/requirements.txt
commands =
python --version
Expand Down Expand Up @@ -74,13 +75,14 @@ deps =
flake8-noqa>=1.1.0
flake8-pyi>=20.10.0
flake8-pytest-style>=1.3.0
flake8-quotes>=3.3.0
flake8-slots>=0.1.0
flake8-sphinx-links>=0.0.4
flake8-strftime>=0.1.1
flake8-typing-imports>=1.10.0
git+https://github.com/domdfcoding/flake8-quotes.git
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods
pydocstyle>=6.0.0
pygments>=2.7.1
importlib_metadata<4.5.0; python_version<'3.8'
Expand Down Expand Up @@ -142,6 +144,10 @@ multiline-quotes = """
docstring-quotes = """
count = True
min_python_version = 3.6.1
unused-arguments-ignore-abstract-functions = True
unused-arguments-ignore-overload-functions = True
unused-arguments-ignore-magic-methods = True
unused-arguments-ignore-variadic-names = True

[coverage:run]
plugins = coverage_pyver_pragma
Expand Down