From 61fb08b051256ef0735b94549e1a0931f9452a9e Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 22:30:35 +0000 Subject: [PATCH 1/2] Updated files with 'repo_helper'. --- .github/workflows/conda_ci.yml | 19 +++++++++++++------ .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 6 +++--- .github/workflows/python_ci_macos.yml | 4 ++-- .pre-commit-config.yaml | 2 +- tox.ini | 4 +--- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml index 130bf40..2873375 100644 --- a/.github/workflows/conda_ci.yml +++ b/.github/workflows/conda_ci.yml @@ -13,6 +13,9 @@ jobs: tests: name: "Conda" runs-on: ubuntu-18.04 + defaults: + run: + shell: bash -l {0} steps: - name: Checkout 🛎️ @@ -23,16 +26,19 @@ jobs: with: python-version: "3.8" + - name: Setup Conda + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: env + conda-build-version: 3.21.0 + - name: Install dependencies 🔧 run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade whey-conda + python -m pip install --upgrade "whey-conda" "setuptools>=40.6.0" "wheel>=0.34.2" # $CONDA is an environment variable pointing to the root of the miniconda directory - $CONDA/bin/conda update -q conda - $CONDA/bin/conda install conda-build=3.21.0 - $CONDA/bin/conda config --add channels conda-forge $CONDA/bin/conda config --add channels domdfcoding @@ -53,5 +59,6 @@ jobs: - name: "Run Tests" run: | rm -rf pyproject_parser - $CONDA/bin/pip install -r tests/requirements.txt - $CONDA/bin/pytest tests/ + $CONDA/bin/conda install pytest coincidence || exit 1 + pip install -r tests/requirements.txt + pytest tests/ diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 3c9d8af..1895fd0 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3,pypy-3.6,pypy-3.7,pypy-3.8' + 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' strategy: fail-fast: False @@ -32,7 +32,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 17ef2fe..a2bcb12 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -22,7 +22,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3,pypy-3.6,pypy-3.7,pypy-3.8' + 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' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} @@ -180,7 +180,7 @@ jobs: - name: Install dependencies 🔧 run: | python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade mkrecipe + python -m pip install --upgrade "mkrecipe" "setuptools>=40.6.0" "wheel>=0.34.2" wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh -O miniconda.sh bash miniconda.sh -b -p $HOME/miniconda diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 66d826a..457fd2f 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -21,7 +21,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.4,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -32,7 +32,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d9a2780..6c14eab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: ^pyproject_parser/.*\.py$ diff --git a/tox.ini b/tox.ini index c18d295..ae8b4f3 100644 --- a/tox.ini +++ b/tox.ini @@ -31,9 +31,8 @@ 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, pypy38 @@ -53,7 +52,6 @@ commands = [testenv:docs] setenv = SHOW_TODOS = 1 basepython = python3.8 -pip_version = pip>=21 changedir = {toxinidir}/doc-source extras = readme deps = -r{toxinidir}/doc-source/requirements.txt From d08063a3425e5a1a1601cc24375ccf77ebe9cc96 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 21:38:31 +0000 Subject: [PATCH 2/2] Updated files with 'repo_helper'. --- .github/milestones.py | 28 +++++++++++++++++++++++++++ .github/workflows/python_ci.yml | 5 +++-- .github/workflows/python_ci_linux.yml | 20 ++++++++++++++----- .github/workflows/python_ci_macos.yml | 5 +++-- .pre-commit-config.yaml | 2 +- 5 files changed, 50 insertions(+), 10 deletions(-) create mode 100755 .github/milestones.py diff --git a/.github/milestones.py b/.github/milestones.py new file mode 100755 index 0000000..5e868dc --- /dev/null +++ b/.github/milestones.py @@ -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")) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 1895fd0..bb2372c 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -13,6 +13,7 @@ on: permissions: actions: write + issues: write contents: read jobs: @@ -21,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - 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' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5,pypy-3.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -32,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index a2bcb12..abc6bb7 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -14,6 +14,7 @@ on: permissions: actions: write + issues: write contents: read jobs: @@ -22,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - 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' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5,pypy-3.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -33,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} @@ -139,21 +140,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/') @@ -163,6 +164,15 @@ jobs: 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 }} + + Conda: needs: deploy diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 457fd2f..c72ebe9 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -13,6 +13,7 @@ on: permissions: actions: write + issues: write contents: read jobs: @@ -21,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.4,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -32,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.4", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c14eab..9ef925d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,7 +67,7 @@ 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