Skip to content

Commit 7b558fd

Browse files
authored
Merge branch 'sphinx-toolbox:master' into feature/query_homepage
2 parents 29e7da0 + ad3f6fb commit 7b558fd

15 files changed

+103
-78
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.0.0
2+
current_version = 1.0.1
33
commit = True
44
tag = True
55

.github/actions_build_conda.sh

-22
This file was deleted.

.github/actions_deploy_conda.sh

-23
This file was deleted.

.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/conda_ci.yml

+14-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,20 @@ 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
3140
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-
42+
$CONDA/bin/conda update -n base conda
3643
$CONDA/bin/conda config --add channels conda-forge
3744
$CONDA/bin/conda config --add channels domdfcoding
3845
@@ -48,10 +55,11 @@ jobs:
4855
4956
- name: "Install package"
5057
run: |
51-
$CONDA/bin/conda install -c file://$(pwd)/conda-bld seed_intersphinx_mapping=1.0.0=py_1 -y || exit 1
58+
$CONDA/bin/conda install -c file://$(pwd)/conda-bld seed_intersphinx_mapping=1.0.1=py_1 -y || exit 1
5259
5360
- name: "Run Tests"
5461
run: |
5562
rm -rf seed_intersphinx_mapping
56-
$CONDA/bin/pip install -r tests/requirements.txt
57-
$CONDA/bin/pytest tests/
63+
$CONDA/bin/conda install pytest coincidence || exit 1
64+
pip install -r tests/requirements.txt
65+
pytest tests/

.github/workflows/python_ci.yml

+3-2
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:
@@ -21,7 +22,7 @@ jobs:
2122
runs-on: "windows-2019"
2223
continue-on-error: ${{ matrix.config.experimental }}
2324
env:
24-
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.4,pypy-3.6,pypy-3.7,pypy-3.8'
25+
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6,pypy-3.6,pypy-3.7,pypy-3.8'
2526

2627
strategy:
2728
fail-fast: False
@@ -32,7 +33,7 @@ jobs:
3233
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3334
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
3435
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
35-
- {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True}
36+
- {python-version: "3.11.0-alpha.6", testenvs: "py311-dev,build", experimental: True}
3637
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
3738
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3839
- {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True}

.github/workflows/python_ci_linux.yml

+47-13
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:
@@ -22,7 +23,7 @@ jobs:
2223
runs-on: "ubuntu-20.04"
2324
continue-on-error: ${{ matrix.config.experimental }}
2425
env:
25-
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.4,pypy-3.6,pypy-3.7,pypy-3.8'
26+
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6,pypy-3.6,pypy-3.7,pypy-3.8'
2627

2728
strategy:
2829
fail-fast: False
@@ -33,7 +34,7 @@ jobs:
3334
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3435
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
3536
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
36-
- {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True}
37+
- {python-version: "3.11.0-alpha.6", testenvs: "py311-dev,build", experimental: True}
3738
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
3839
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3940
- {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True}
@@ -139,21 +140,21 @@ jobs:
139140

140141
- name: Setup Python 🐍
141142
uses: "actions/setup-python@v2"
143+
if: startsWith(github.ref, 'refs/tags/')
142144
with:
143145
python-version: 3.8
144-
if: startsWith(github.ref, 'refs/tags/')
145146

146147
- name: Install dependencies 🔧
148+
if: startsWith(github.ref, 'refs/tags/')
147149
run: |
148150
python -m pip install --upgrade pip setuptools wheel
149151
python -m pip install --upgrade tox
150-
if: startsWith(github.ref, 'refs/tags/')
151152
152153
- name: Build distributions 📦
154+
if: startsWith(github.ref, 'refs/tags/')
153155
run: |
154156
tox -e build
155157
156-
if: startsWith(github.ref, 'refs/tags/')
157158
158159
- name: Upload distribution to PyPI 🚀
159160
if: startsWith(github.ref, 'refs/tags/')
@@ -163,6 +164,15 @@ jobs:
163164
password: ${{ secrets.PYPI_TOKEN }}
164165
skip_existing: true
165166

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

167177
Conda:
168178
needs: deploy
@@ -177,22 +187,46 @@ jobs:
177187
with:
178188
python-version: 3.8
179189

190+
- name: Setup Conda
191+
uses: conda-incubator/setup-miniconda@v2
192+
with:
193+
activate-environment: env
194+
conda-build-version: 3.21.0
195+
180196
- name: Install dependencies 🔧
181197
run: |
198+
python -VV
199+
python -m site
182200
python -m pip install --upgrade pip setuptools wheel
183201
python -m pip install --upgrade "mkrecipe" "whey"
202+
# $CONDA is an environment variable pointing to the root of the miniconda directory
203+
$CONDA/bin/conda config --set always_yes yes --set changeps1 no
204+
$CONDA/bin/conda update -n base conda
205+
$CONDA/bin/conda info -a
206+
$CONDA/bin/conda config --add channels conda-forge
207+
$CONDA/bin/conda config --add channels domdfcoding
184208
185-
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh -O miniconda.sh
186-
bash miniconda.sh -b -p $HOME/miniconda
209+
$CONDA/bin/conda config --remove channels defaults
187210
188-
- name: Build Conda 📦
211+
- name: Build Conda Package 📦
189212
run: |
190-
chmod +x .github/actions_build_conda.sh
191-
bash .github/actions_build_conda.sh
213+
python -m mkrecipe --type wheel || exit 1
214+
$CONDA/bin/conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist
192215
193-
- name: Deploy Conda 🚀
216+
- name: Deploy Conda Package 🚀
217+
if: startsWith(github.ref, 'refs/tags/')
194218
run: |
195-
chmod +x .github/actions_deploy_conda.sh
196-
bash .github/actions_deploy_conda.sh
219+
$CONDA/bin/conda config --set always_yes yes --set changeps1 no
220+
$CONDA/bin/conda install anaconda-client
221+
$CONDA/bin/conda info -a
222+
223+
for f in conda/dist/noarch/seed_intersphinx_mapping-*.tar.bz2; do
224+
[ -e "$f" ] || continue
225+
echo "$f"
226+
conda install "$f" || exit 1
227+
echo "Deploying to Anaconda.org..."
228+
$CONDA/bin/anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1
229+
echo "Successfully deployed to Anaconda.org."
230+
done
197231
env:
198232
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}

.github/workflows/python_ci_macos.yml

+3-2
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:
@@ -21,7 +22,7 @@ jobs:
2122
runs-on: "macos-latest"
2223
continue-on-error: ${{ matrix.config.experimental }}
2324
env:
24-
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.4,pypy-3.7,pypy-3.8'
25+
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6,pypy-3.7,pypy-3.8'
2526

2627
strategy:
2728
fail-fast: False
@@ -32,7 +33,7 @@ jobs:
3233
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3334
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
3435
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
35-
- {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True}
36+
- {python-version: "3.11.0-alpha.6", testenvs: "py311-dev,build", experimental: True}
3637
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3738
- {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True}
3839

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ 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

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ seed_intersphinx_mapping
101101
.. |language| image:: https://img.shields.io/github/languages/top/sphinx-toolbox/seed_intersphinx_mapping
102102
:alt: GitHub top language
103103

104-
.. |commits-since| image:: https://img.shields.io/github/commits-since/sphinx-toolbox/seed_intersphinx_mapping/v1.0.0
104+
.. |commits-since| image:: https://img.shields.io/github/commits-since/sphinx-toolbox/seed_intersphinx_mapping/v1.0.1
105105
:target: https://github.com/sphinx-toolbox/seed_intersphinx_mapping/pulse
106106
:alt: GitHub commits since tagged version
107107

doc-source/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ seed_intersphinx_mapping
107107
:alt: GitHub top language
108108

109109
.. |commits-since| github-shield::
110-
:commits-since: v1.0.0
110+
:commits-since: v1.0.1
111111
:alt: GitHub commits since tagged version
112112

113113
.. |commits-latest| github-shield::

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "whey"
44

55
[project]
66
name = "seed_intersphinx_mapping"
7-
version = "1.0.0"
7+
version = "1.0.1"
88
description = "Populate the Sphinx 'intersphinx_mapping' dictionary from the project's requirements."
99
readme = "README.rst"
1010
keywords = [ "documentation", "intersphinx", "sphinx",]

repo_helper.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ email: '[email protected]'
77
username: 'sphinx-toolbox'
88
assignee: 'domdfcoding'
99
primary_conda_channel: 'domdfcoding'
10-
version: '1.0.0'
10+
version: '1.0.1'
1111
license: 'MIT'
1212
short_desc: "Populate the Sphinx 'intersphinx_mapping' dictionary from the project's requirements."
1313

seed_intersphinx_mapping/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
__author__: str = "Dominic Davis-Foster"
5454
__copyright__: str = "2020 Dominic Davis-Foster"
5555
__license__: str = "MIT License"
56-
__version__: str = "1.0.0"
56+
__version__: str = "1.0.1"
5757
__email__: str = "[email protected]"
5858

5959
__all__ = ["get_sphinx_doc_url", "fallback_mapping", "seed_intersphinx_mapping"]

tox.ini

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ 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, pypy38
@@ -42,7 +41,6 @@ cov = py36, coverage
4241
[testenv:docs]
4342
setenv = SHOW_TODOS = 1
4443
basepython = python3.8
45-
pip_version = pip>=21
4644
changedir = {toxinidir}/doc-source
4745
deps = -r{toxinidir}/doc-source/requirements.txt
4846
commands = sphinx-build -M {env:SPHINX_BUILDER:html} . ./build {posargs}

0 commit comments

Comments
 (0)