From 24e1e5e61a6a8d47bd288f113414cd5d3a529cd6 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Sat, 26 Dec 2020 15:22:42 +0000 Subject: [PATCH] Updated files with 'repo_helper'. --- .github/actions_build_conda.sh | 4 ++-- .github/workflows/conda_ci.yml | 2 +- .github/workflows/mypy.yml | 2 +- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 20 ++++++++++++-------- .github/workflows/python_ci_macos.yml | 4 ++-- README.rst | 24 +++++++++++++++++------- tox.ini | 13 ++++++------- 8 files changed, 43 insertions(+), 30 deletions(-) mode change 100644 => 100755 .github/actions_build_conda.sh diff --git a/.github/actions_build_conda.sh b/.github/actions_build_conda.sh old mode 100644 new mode 100755 index c60b927..1acebbe --- a/.github/actions_build_conda.sh +++ b/.github/actions_build_conda.sh @@ -15,9 +15,9 @@ conda install conda-build conda install anaconda-client conda info -a -conda config --add channels domdfcoding || exit 1 conda config --add channels conda-forge || exit 1 +conda config --add channels domdfcoding || exit 1 -conda build conda -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing --numpy 1.16 +conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist --skip-existing exit 0 diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml index 99da510..de0f2a6 100644 --- a/.github/workflows/conda_ci.yml +++ b/.github/workflows/conda_ci.yml @@ -31,8 +31,8 @@ jobs: $CONDA/bin/conda update -q conda $CONDA/bin/conda install conda-build - $CONDA/bin/conda config --add channels domdfcoding $CONDA/bin/conda config --add channels conda-forge + $CONDA/bin/conda config --add channels domdfcoding - name: "Build and install package" run: | diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index ab12def..6be64e3 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -9,7 +9,7 @@ on: jobs: Run: - name: "mypy" + name: "mypy / ${{ matrix.os }}" runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 4b63410..2313ff4 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -9,7 +9,7 @@ on: jobs: tests: - name: "Python ${{ matrix.config.python-version }}" + name: "windows-2019 / Python ${{ matrix.config.python-version }}" runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: @@ -40,4 +40,4 @@ jobs: python -m pip install --upgrade tox virtualenv - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: "python -m tox -e ${{ matrix.config.testenvs }}" + run: python -m tox -e "${{ matrix.config.testenvs }}" diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 25a47cb..df82c00 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -9,7 +9,7 @@ on: jobs: tests: - name: "Python ${{ matrix.config.python-version }}" + name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}" runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: @@ -41,10 +41,10 @@ jobs: python -m pip install --upgrade coverage_pyver_pragma - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: "python -m tox -e ${{ matrix.config.testenvs }}" + run: python -m tox -e "${{ matrix.config.testenvs }}" - - name: "Upload Coverage" + - name: "Upload Coverage 🚀" uses: actions/upload-artifact@v2 with: name: "coverage-${{ matrix.config.python-version }}" @@ -68,7 +68,7 @@ jobs: python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade coveralls coverage_pyver_pragma - - name: "Download Coverage" + - name: "Download Coverage 🪂" uses: actions/download-artifact@v2 with: path: coverage @@ -77,12 +77,12 @@ jobs: run: ls -R working-directory: coverage - - name: Combine Coverage + - name: Combine Coverage 👷 run: | shopt -s globstar python -m coverage combine coverage/**/.coverage - - name: "Upload Combined Coverage Artefact" + - name: "Upload Combined Coverage Artefact 🚀" uses: actions/upload-artifact@v2 with: name: "combined-coverage" @@ -101,23 +101,27 @@ jobs: steps: - name: Checkout 🛎️ uses: "actions/checkout@v2" + if: startsWith(github.ref, 'refs/tags/') - name: Setup Python 🐍 uses: "actions/setup-python@v2" with: python-version: 3.8 + if: startsWith(github.ref, 'refs/tags/') - name: Install dependencies 🔧 run: | python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox + if: startsWith(github.ref, 'refs/tags/') - name: Build distributions 📦 run: | tox -e build + if: startsWith(github.ref, 'refs/tags/') - - name: Upload distribution 📦 to PyPI + - name: Upload distribution to PyPI 🚀 if: startsWith(github.ref, 'refs/tags/') uses: pypa/gh-action-pypi-publish@master with: @@ -130,7 +134,7 @@ jobs: Conda: needs: deploy runs-on: "ubuntu-20.04" - if: startsWith(github.ref, 'refs/tags/') || ${{ startsWith(github.event.head_commit.message, 'Bump version') != true }} + if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true) steps: - name: Checkout 🛎️ uses: "actions/checkout@v2" diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 369f5b7..86f1480 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -9,7 +9,7 @@ on: jobs: tests: - name: "Python ${{ matrix.config.python-version }}" + name: "macos-latest / Python ${{ matrix.config.python-version }}" runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: @@ -40,4 +40,4 @@ jobs: python -m pip install --upgrade tox virtualenv - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: "python -m tox -e ${{ matrix.config.testenvs }}" + run: python -m tox -e "${{ matrix.config.testenvs }}" diff --git a/README.rst b/README.rst index 3bd72c1..1935860 100644 --- a/README.rst +++ b/README.rst @@ -20,15 +20,17 @@ together for formatting Python source files. :widths: 10 90 * - Tests - - |actions_linux| |actions_windows| |actions_macos| |coveralls| |codefactor| |pre_commit_ci| + - |actions_linux| |actions_windows| |actions_macos| |coveralls| * - PyPI - |pypi-version| |supported-versions| |supported-implementations| |wheel| * - Anaconda - |conda-version| |conda-platform| * - Activity - - |commits-latest| |commits-since| |maintained| + - |commits-latest| |commits-since| |maintained| |pypi-downloads| + * - QA + - |codefactor| |actions_flake8| |actions_mypy| |pre_commit_ci| * - Other - - |license| |language| |requires| |pre_commit| + - |license| |language| |requires| .. |actions_linux| image:: https://github.com/domdfcoding/yapf-isort/workflows/Linux/badge.svg :target: https://github.com/domdfcoding/yapf-isort/actions?query=workflow%3A%22Linux%22 @@ -42,6 +44,14 @@ together for formatting Python source files. :target: https://github.com/domdfcoding/yapf-isort/actions?query=workflow%3A%22macOS%22 :alt: macOS Test Status +.. |actions_flake8| image:: https://github.com/domdfcoding/yapf-isort/workflows/Flake8/badge.svg + :target: https://github.com/domdfcoding/yapf-isort/actions?query=workflow%3A%22Flake8%22 + :alt: Flake8 Status + +.. |actions_mypy| image:: https://github.com/domdfcoding/yapf-isort/workflows/mypy/badge.svg + :target: https://github.com/domdfcoding/yapf-isort/actions?query=workflow%3A%22mypy%22 + :alt: mypy status + .. |requires| image:: https://requires.io/github/domdfcoding/yapf-isort/requirements.svg?branch=master :target: https://requires.io/github/domdfcoding/yapf-isort/requirements/?branch=master :alt: Requirements Status @@ -96,9 +106,9 @@ together for formatting Python source files. .. |maintained| image:: https://img.shields.io/maintenance/yes/2020 :alt: Maintenance -.. |pre_commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white - :target: https://github.com/pre-commit/pre-commit - :alt: pre-commit +.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/yapf-isort + :target: https://pypi.org/project/yapf-isort/ + :alt: PyPI - Downloads .. |pre_commit_ci| image:: https://results.pre-commit.ci/badge/github/domdfcoding/yapf-isort/master.svg :target: https://results.pre-commit.ci/latest/github/domdfcoding/yapf-isort/master @@ -127,8 +137,8 @@ To install with ``conda``: .. code-block:: bash - $ conda config --add channels http://conda.anaconda.org/domdfcoding $ conda config --add channels http://conda.anaconda.org/conda-forge + $ conda config --add channels http://conda.anaconda.org/domdfcoding * Then install diff --git a/tox.ini b/tox.ini index 7057439..4d97d0e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,6 @@ # You may add new sections, but any changes made to the following sections will be lost: # * tox # * envlists -# * gh-actions # * testenv # * testenv:docs # * testenv:build @@ -29,12 +28,6 @@ test = py36, py37, py38 qa = mypy, lint cov = py36, coverage -[gh-actions] -python = - 3.6: py36, build - 3.7: py37, build - 3.8: py38, build - [testenv] setenv = PYTHONDEVMODE = 1 deps = -r{toxinidir}/tests/requirements.txt @@ -149,3 +142,9 @@ package = yapf_isort [pytest] addopts = --color yes --durations 25 timeout = 300 + +[gh-actions] +python = + 3.6: py36, build + 3.7: py37, build + 3.8: py38, build