Skip to content

Commit 2ebf64e

Browse files
[repo-helper] Configuration Update (#42)
* Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
1 parent 94dfcc1 commit 2ebf64e

16 files changed

+132
-66
lines changed

.github/milestones.py

+28
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

-14
This file was deleted.

.github/workflows/conda_ci.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
tests:
1414
name: "Conda"
1515
runs-on: ubuntu-18.04
16+
defaults:
17+
run:
18+
shell: bash -l {0}
1619

1720
steps:
1821
- name: Checkout 🛎️
@@ -23,16 +26,19 @@ jobs:
2326
with:
2427
python-version: "3.8"
2528

29+
- name: Setup Conda
30+
uses: conda-incubator/setup-miniconda@v2
31+
with:
32+
activate-environment: env
33+
conda-build-version: 3.21.0
34+
2635
- name: Install dependencies 🔧
2736
run: |
2837
python -VV
2938
python -m site
3039
python -m pip install --upgrade pip setuptools wheel
31-
python -m pip install --upgrade whey-conda
40+
python -m pip install --upgrade "whey-conda" "whey"
3241
# $CONDA is an environment variable pointing to the root of the miniconda directory
33-
$CONDA/bin/conda update -q conda
34-
$CONDA/bin/conda install conda-build=3.21.0
35-
3642
$CONDA/bin/conda config --add channels conda-forge
3743
$CONDA/bin/conda config --add channels domdfcoding
3844
@@ -53,5 +59,6 @@ jobs:
5359
- name: "Run Tests"
5460
run: |
5561
rm -rf coverage_pyver_pragma
56-
$CONDA/bin/pip install -r tests/requirements.txt
57-
$CONDA/bin/pytest tests/
62+
$CONDA/bin/conda install pytest coincidence || exit 1
63+
pip install -r tests/requirements.txt
64+
pytest tests/

.github/workflows/docs_test_action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
branches-ignore:
77
- 'repo-helper-update'
88
- 'pre-commit-ci-update-config'
9+
- 'imgbot'
910
pull_request:
1011

1112
permissions:
@@ -16,7 +17,7 @@ jobs:
1617
runs-on: ubuntu-latest
1718
steps:
1819
- name: Checkout 🛎️
19-
uses: "actions/checkout@v1"
20+
uses: "actions/checkout@v2"
2021

2122
- name: Check for changed files
2223
uses: dorny/paths-filter@v2

.github/workflows/flake8.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
pull_request:
1112

1213
permissions:

.github/workflows/mypy.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
pull_request:
1112

1213
permissions:

.github/workflows/python_ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011

1112
pull_request:
1213

1314
permissions:
1415
actions: write
16+
issues: write
1517
contents: read
1618

1719
jobs:
@@ -20,7 +22,7 @@ jobs:
2022
runs-on: "windows-2019"
2123
continue-on-error: ${{ matrix.config.experimental }}
2224
env:
23-
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.1,pypy-3.6,pypy-3.7'
25+
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,pypy-3.6,pypy-3.7'
2426

2527
strategy:
2628
fail-fast: False
@@ -30,7 +32,7 @@ jobs:
3032
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3133
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3234
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
33-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
35+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3436
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
3537
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3638

.github/workflows/python_ci_linux.yml

+22-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
tags:
1112
- '*'
1213
pull_request:
1314

1415
permissions:
1516
actions: write
17+
issues: write
1618
contents: read
1719

1820
jobs:
@@ -21,7 +23,7 @@ jobs:
2123
runs-on: "ubuntu-20.04"
2224
continue-on-error: ${{ matrix.config.experimental }}
2325
env:
24-
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.1,pypy-3.6,pypy-3.7'
26+
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,pypy-3.6,pypy-3.7'
2527

2628
strategy:
2729
fail-fast: False
@@ -31,7 +33,7 @@ jobs:
3133
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3234
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3335
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
34-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
36+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3537
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
3638
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3739

@@ -100,21 +102,26 @@ jobs:
100102
path: coverage
101103

102104
- name: Display structure of downloaded files
105+
id: show
103106
run: ls -R
104107
working-directory: coverage
108+
continue-on-error: true
105109

106110
- name: Combine Coverage 👷
111+
if: ${{ steps.show.outcome != 'failure' }}
107112
run: |
108113
shopt -s globstar
109114
python -m coverage combine coverage/**/.coverage
110115
111116
- name: "Upload Combined Coverage Artefact 🚀"
117+
if: ${{ steps.show.outcome != 'failure' }}
112118
uses: actions/upload-artifact@v2
113119
with:
114120
name: "combined-coverage"
115121
path: .coverage
116122

117123
- name: "Upload Combined Coverage to Coveralls"
124+
if: ${{ steps.show.outcome != 'failure' }}
118125
env:
119126
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120127
run: |
@@ -131,21 +138,21 @@ jobs:
131138

132139
- name: Setup Python 🐍
133140
uses: "actions/setup-python@v2"
141+
if: startsWith(github.ref, 'refs/tags/')
134142
with:
135143
python-version: 3.8
136-
if: startsWith(github.ref, 'refs/tags/')
137144

138145
- name: Install dependencies 🔧
146+
if: startsWith(github.ref, 'refs/tags/')
139147
run: |
140148
python -m pip install --upgrade pip setuptools wheel
141149
python -m pip install --upgrade tox
142-
if: startsWith(github.ref, 'refs/tags/')
143150
144151
- name: Build distributions 📦
152+
if: startsWith(github.ref, 'refs/tags/')
145153
run: |
146154
tox -e build
147155
148-
if: startsWith(github.ref, 'refs/tags/')
149156
150157
- name: Upload distribution to PyPI 🚀
151158
if: startsWith(github.ref, 'refs/tags/')
@@ -155,6 +162,15 @@ jobs:
155162
password: ${{ secrets.PYPI_TOKEN }}
156163
skip_existing: true
157164

165+
- name: Close milestone 🚪
166+
if: startsWith(github.ref, 'refs/tags/')
167+
run: |
168+
python -m pip install --upgrade github3.py packaging
169+
python .github/milestones.py
170+
env:
171+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172+
173+
158174

159175
Conda:
160176
needs: deploy
@@ -172,7 +188,7 @@ jobs:
172188
- name: Install dependencies 🔧
173189
run: |
174190
python -m pip install --upgrade pip setuptools wheel
175-
python -m pip install --upgrade mkrecipe
191+
python -m pip install --upgrade "mkrecipe" "whey"
176192
177193
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh -O miniconda.sh
178194
bash miniconda.sh -b -p $HOME/miniconda

.github/workflows/python_ci_macos.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011

1112
pull_request:
1213

1314
permissions:
1415
actions: write
16+
issues: write
1517
contents: read
1618

1719
jobs:
@@ -20,7 +22,7 @@ jobs:
2022
runs-on: "macos-latest"
2123
continue-on-error: ${{ matrix.config.experimental }}
2224
env:
23-
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.1,pypy-3.6,pypy-3.7'
25+
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,pypy-3.7'
2426

2527
strategy:
2628
fail-fast: False
@@ -30,8 +32,7 @@ jobs:
3032
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3133
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3234
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
33-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
34-
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
35+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3536
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3637

3738
steps:

.pre-commit-config.yaml

+11-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exclude: ^$
55

66
repos:
77
- repo: https://github.com/repo-helper/pyproject-parser
8-
rev: v0.4.1
8+
rev: v0.4.2
99
hooks:
1010
- id: reformat-pyproject
1111

@@ -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: ^coverage_pyver_pragma/.*\.py$
@@ -51,7 +51,7 @@ repos:
5151
- id: flake2lint
5252

5353
- repo: https://github.com/pre-commit/pygrep-hooks
54-
rev: v1.8.0
54+
rev: v1.9.0
5555
hooks:
5656
- id: python-no-eval
5757
- id: rst-backticks
@@ -67,12 +67,17 @@ 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

75-
- repo: https://github.com/repo-helper/formate
75+
- repo: https://github.com/python-formate/snippet-fmt
76+
rev: v0.1.4
77+
hooks:
78+
- id: snippet-fmt
79+
80+
- repo: https://github.com/python-formate/formate
7681
rev: v0.4.9
7782
hooks:
7883
- id: formate

README.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ coverage_pyver_pragma
5858
:target: https://github.com/python-coincidence/coverage_pyver_pragma/actions?query=workflow%3A%22mypy%22
5959
:alt: mypy status
6060

61-
.. |requires| image:: https://requires.io/github/python-coincidence/coverage_pyver_pragma/requirements.svg?branch=master
62-
:target: https://requires.io/github/python-coincidence/coverage_pyver_pragma/requirements/?branch=master
61+
.. |requires| image:: https://dependency-dash.herokuapp.com/github/python-coincidence/coverage_pyver_pragma/badge.svg
62+
:target: https://dependency-dash.herokuapp.com/github/python-coincidence/coverage_pyver_pragma/
6363
:alt: Requirements Status
6464

6565
.. |coveralls| image:: https://img.shields.io/coveralls/github/python-coincidence/coverage_pyver_pragma/master?logo=coveralls
@@ -109,7 +109,7 @@ coverage_pyver_pragma
109109
:target: https://github.com/python-coincidence/coverage_pyver_pragma/commit/master
110110
:alt: GitHub last commit
111111

112-
.. |maintained| image:: https://img.shields.io/maintenance/yes/2021
112+
.. |maintained| image:: https://img.shields.io/maintenance/yes/2022
113113
:alt: Maintenance
114114

115115
.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/coverage_pyver_pragma

__pkginfo__.py

-16
This file was deleted.

0 commit comments

Comments
 (0)