diff --git a/.github/actions_build_conda.sh b/.github/actions_build_conda.sh index ea36ff2..1acebbe 100755 --- a/.github/actions_build_conda.sh +++ b/.github/actions_build_conda.sh @@ -15,10 +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 +conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist --skip-existing exit 0 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e769ad3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +# This file is managed by 'repo_helper'. Don't edit it directly. +--- +version: 2 +updates: +- package-ecosystem: pip + directory: / + schedule: + interval: weekly + reviewers: + - domdfcoding diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml index 1bb4cc2..0589897 100644 --- a/.github/workflows/conda_ci.yml +++ b/.github/workflows/conda_ci.yml @@ -29,11 +29,10 @@ jobs: python -m pip install --upgrade repo_helper # $CONDA is an environment variable pointing to the root of the miniconda directory $CONDA/bin/conda update -q conda - - $CONDA/bin/conda config --add channels domdfcoding + $CONDA/bin/conda install conda-build $CONDA/bin/conda config --add channels conda-forge - + $CONDA/bin/conda config --add channels domdfcoding - name: "Build and install package" run: | @@ -41,4 +40,5 @@ jobs: # https://github.com/conda/conda/issues/1884 python -m repo_helper build --conda --out-dir conda-bld/noarch - $CONDA/bin/conda install consolekit -c local -y || exit 1 + $CONDA/bin/conda index ./conda-bld || exit 1 + $CONDA/bin/conda install -c file://$(pwd)/conda-bld consolekit -y || exit 1 diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index dc9bb91..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: @@ -24,7 +24,7 @@ jobs: - name: Setup Python 🐍 uses: "actions/setup-python@v2" with: - python-version: "3.8" + python-version: "3.6" - name: Install dependencies 🔧 run: | diff --git a/.github/workflows/octocheese.yml b/.github/workflows/octocheese.yml index b323444..c70ce84 100644 --- a/.github/workflows/octocheese.yml +++ b/.github/workflows/octocheese.yml @@ -4,6 +4,7 @@ name: "GitHub Releases" on: push: + branches: ["master"] schedule: - cron: 0 12 * * 2,4,6 diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 452f820..34fe25c 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -1,6 +1,6 @@ # This file is managed by 'repo_helper'. Don't edit it directly. --- -name: Windows Tests +name: Windows on: push: @@ -9,19 +9,21 @@ 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: - USING_COVERAGE: '3.6,3.7,3.8,3.9' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.3' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36,build"} - - {python-version: "3.7", testenvs: "py37,build"} - - {python-version: "3.8", testenvs: "py38,build"} - - {python-version: "3.9", testenvs: "py39,build"} + - {python-version: "3.6", testenvs: "py36,build", experimental: False} + - {python-version: "3.7", testenvs: "py37,build", experimental: False} + - {python-version: "3.8", testenvs: "py38,build", experimental: False} + - {python-version: "3.9", testenvs: "py39,build", experimental: False} + - {python-version: "3.10.0-alpha.3", testenvs: "py310-dev,build", experimental: True} steps: - name: Checkout 🛎️ @@ -40,4 +42,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 053977b..0e5c5be 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -1,6 +1,6 @@ # This file is managed by 'repo_helper'. Don't edit it directly. --- -name: Linux Tests +name: Linux on: push: @@ -9,20 +9,22 @@ on: jobs: tests: - name: "Python ${{ matrix.config.python-version }}" - runs-on: "ubuntu-18.04" + name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}" + runs-on: "ubuntu-20.04" + continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.3,pypy-3.6' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36,build"} - - {python-version: "3.7", testenvs: "py37,build"} - - {python-version: "3.8", testenvs: "py38,build"} - - {python-version: "3.9", testenvs: "py39,build"} - - {python-version: "pypy3", testenvs: "pypy3,build"} + - {python-version: "3.6", testenvs: "py36,build", experimental: False} + - {python-version: "3.7", testenvs: "py37,build", experimental: False} + - {python-version: "3.8", testenvs: "py38,build", experimental: False} + - {python-version: "3.9", testenvs: "py39,build", experimental: False} + - {python-version: "3.10.0-alpha.3", testenvs: "py310-dev,build", experimental: True} + - {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False} steps: - name: Checkout 🛎️ @@ -42,10 +44,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 }}" @@ -54,7 +56,7 @@ jobs: Coverage: needs: tests - runs-on: "ubuntu-18.04" + runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ uses: "actions/checkout@v2" @@ -69,7 +71,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 @@ -78,12 +80,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" @@ -98,27 +100,31 @@ jobs: Deploy: needs: tests - runs-on: "ubuntu-18.04" + runs-on: "ubuntu-20.04" 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 +136,8 @@ jobs: Conda: needs: deploy - runs-on: "ubuntu-18.04" + runs-on: "ubuntu-20.04" + if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true) steps: - name: Checkout 🛎️ uses: "actions/checkout@v2" @@ -154,7 +161,6 @@ jobs: bash .github/actions_build_conda.sh - name: Deploy Conda 🚀 - if: startsWith(github.ref, 'refs/tags/') run: | chmod +x .github/actions_deploy_conda.sh bash .github/actions_deploy_conda.sh diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index a0d7da6..b4380a9 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -1,6 +1,6 @@ # This file is managed by 'repo_helper'. Don't edit it directly. --- -name: macOS Tests +name: macOS on: push: @@ -9,20 +9,22 @@ 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: - USING_COVERAGE: '3.6,3.7,3.8,3.9,pypy3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.3,pypy-3.6' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36,build"} - - {python-version: "3.7", testenvs: "py37,build"} - - {python-version: "3.8", testenvs: "py38,build"} - - {python-version: "3.9", testenvs: "py39,build"} - - {python-version: "pypy3", testenvs: "pypy3,build"} + - {python-version: "3.6", testenvs: "py36,build", experimental: False} + - {python-version: "3.7", testenvs: "py37,build", experimental: False} + - {python-version: "3.8", testenvs: "py38,build", experimental: False} + - {python-version: "3.9", testenvs: "py39,build", experimental: False} + - {python-version: "3.10.0-alpha.3", testenvs: "py310-dev,build", experimental: True} + - {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False} steps: - name: Checkout 🛎️ @@ -41,4 +43,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 34165dd..7c4e4ca 100644 --- a/README.rst +++ b/README.rst @@ -19,15 +19,17 @@ Spun out from `repo_helper `_. Needs * - Docs - |docs| |docs_check| * - Tests - - |travis| |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| .. |docs| image:: https://img.shields.io/readthedocs/consolekit/latest?logo=read-the-docs :target: https://consolekit.readthedocs.io/en/latest @@ -37,18 +39,26 @@ Spun out from `repo_helper `_. Needs :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22Docs+Check%22 :alt: Docs Check Status -.. |travis| image:: https://github.com/domdfcoding/consolekit/workflows/Linux%20Tests/badge.svg - :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22Linux+Tests%22 +.. |actions_linux| image:: https://github.com/domdfcoding/consolekit/workflows/Linux/badge.svg + :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22Linux%22 :alt: Linux Test Status -.. |actions_windows| image:: https://github.com/domdfcoding/consolekit/workflows/Windows%20Tests/badge.svg - :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22Windows+Tests%22 +.. |actions_windows| image:: https://github.com/domdfcoding/consolekit/workflows/Windows/badge.svg + :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22Windows%22 :alt: Windows Test Status -.. |actions_macos| image:: https://github.com/domdfcoding/consolekit/workflows/macOS%20Tests/badge.svg - :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22macOS+Tests%22 +.. |actions_macos| image:: https://github.com/domdfcoding/consolekit/workflows/macOS/badge.svg + :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22macOS%22 :alt: macOS Test Status +.. |actions_flake8| image:: https://github.com/domdfcoding/consolekit/workflows/Flake8/badge.svg + :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22Flake8%22 + :alt: Flake8 Status + +.. |actions_mypy| image:: https://github.com/domdfcoding/consolekit/workflows/mypy/badge.svg + :target: https://github.com/domdfcoding/consolekit/actions?query=workflow%3A%22mypy%22 + :alt: mypy status + .. |requires| image:: https://requires.io/github/domdfcoding/consolekit/requirements.svg?branch=master :target: https://requires.io/github/domdfcoding/consolekit/requirements/?branch=master :alt: Requirements Status @@ -103,9 +113,9 @@ Spun out from `repo_helper `_. Needs .. |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/consolekit + :target: https://pypi.org/project/consolekit/ + :alt: PyPI - Downloads .. |pre_commit_ci| image:: https://results.pre-commit.ci/badge/github/domdfcoding/consolekit/master.svg :target: https://results.pre-commit.ci/latest/github/domdfcoding/consolekit/master @@ -132,8 +142,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/doc-source/index.rst b/doc-source/index.rst index 9454b0d..68b8fcc 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -17,15 +17,17 @@ consolekit * - Docs - |docs| |docs_check| * - Tests - - |travis| |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| .. |docs| rtfd-shield:: :project: consolekit @@ -35,18 +37,26 @@ consolekit :workflow: Docs Check :alt: Docs Check Status -.. |travis| actions-shield:: - :workflow: Linux Tests +.. |actions_linux| actions-shield:: + :workflow: Linux :alt: Linux Test Status .. |actions_windows| actions-shield:: - :workflow: Windows Tests + :workflow: Windows :alt: Windows Test Status .. |actions_macos| actions-shield:: - :workflow: macOS Tests + :workflow: macOS :alt: macOS Test Status +.. |actions_flake8| actions-shield:: + :workflow: Flake8 + :alt: Flake8 Status + +.. |actions_mypy| actions-shield:: + :workflow: mypy + :alt: mypy status + .. |requires| requires-io-shield:: :alt: Requirements Status @@ -103,8 +113,10 @@ consolekit .. |maintained| maintained-shield:: 2020 :alt: Maintenance -.. |pre_commit| pre-commit-shield:: - :alt: pre-commit +.. |pypi-downloads| pypi-shield:: + :project: consolekit + :downloads: month + :alt: PyPI - Downloads .. |pre_commit_ci| pre-commit-ci-shield:: :alt: pre-commit.ci status @@ -120,7 +132,7 @@ Installation :pypi: :github: :anaconda: - :conda-channels: domdfcoding, conda-forge + :conda-channels: conda-forge, domdfcoding .. end installation diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 3a45730..596e398 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -1,9 +1,9 @@ autodocsumm>=0.2.0 default-values>=0.2.0 -domdf-sphinx-theme>=0.1.0 +domdf-sphinx-theme>=0.3.0 extras-require>=0.2.0 seed-intersphinx-mapping>=0.1.1 -sphinx>=3.0.3 +sphinx<3.4.0,>=3.0.3 sphinx-copybutton>=0.2.12 sphinx-notfound-page>=0.5 sphinx-prompt>=1.1.0 diff --git a/setup.cfg b/setup.cfg index 557f714..305e184 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,6 @@ classifiers = Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Topic :: Software Development :: Libraries :: Python Modules diff --git a/tox.ini b/tox.ini index 68cc662..33b7581 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 @@ -19,7 +18,9 @@ [tox] envlist = py36, py37, py38, py39, py310-dev, pypy3, mypy, build skip_missing_interpreters = True -requires = pip>=20.3.1 +requires = + pip>=20.3.3 + tox-envlist>=0.1.0 isolated_build = True [envlists] @@ -27,15 +28,6 @@ test = py36, py37, py38, py39, py310-dev, pypy3 qa = mypy, lint cov = py36, coverage -[gh-actions] -python = - 3.6: py36, build - 3.7: py37, build - 3.8: py38, build - 3.9: py39, build - 3.10-dev: py310-dev, build - pypy3: pypy3, build - [testenv] setenv = PYTHONDEVMODE = 1 deps = -r{toxinidir}/tests/requirements.txt @@ -159,3 +151,12 @@ package = consolekit [pytest] addopts = --color yes --durations 25 timeout = 300 + +[gh-actions] +python = + 3.6: py36, build + 3.7: py37, build + 3.8: py38, build + 3.9: py39, build + 3.10-dev: py310-dev, build + pypy3: pypy3, build