From 25296276b4f6cf59bfb6c60751b0a3deff23cd84 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Wed, 25 Nov 2020 10:58:05 +0000 Subject: [PATCH] Updated config files. --- .ci/actions_build_conda.sh | 26 -------------------- .ci/actions_deploy_conda.sh | 26 -------------------- .github/actions_build_conda.sh | 28 ++++++++++------------ .github/actions_deploy_conda.sh | 34 +++++++++++++-------------- .github/workflows/cleanup.yml | 14 +++++++++++ .github/workflows/conda_ci.yml | 2 -- .github/workflows/python_ci_linux.yml | 8 +++---- .isort.cfg | 16 ++++++------- doc-source/requirements.txt | 2 +- setup.cfg | 4 ++-- tox.ini | 4 +--- 11 files changed, 59 insertions(+), 105 deletions(-) delete mode 100755 .ci/actions_build_conda.sh delete mode 100755 .ci/actions_deploy_conda.sh create mode 100644 .github/workflows/cleanup.yml diff --git a/.ci/actions_build_conda.sh b/.ci/actions_build_conda.sh deleted file mode 100755 index bd025dc..0000000 --- a/.ci/actions_build_conda.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# This file is managed by 'repo_helper'. Don't edit it directly. - -set -e -x - - python -m repo_helper make-recipe || exit 1 - - # Switch to miniconda - source "/home/runner/miniconda/etc/profile.d/conda.sh" - hash -r - conda activate base - conda config --set always_yes yes --set changeps1 no - conda update -q conda - 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 build conda -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing - -fi - -exit 0 diff --git a/.ci/actions_deploy_conda.sh b/.ci/actions_deploy_conda.sh deleted file mode 100755 index b30eafb..0000000 --- a/.ci/actions_deploy_conda.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# This file is managed by 'repo_helper'. Don't edit it directly. - -set -e -x - - # Switch to miniconda - source "/home/runner/miniconda/etc/profile.d/conda.sh" - hash -r - conda activate base - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda install anaconda-client - conda info -a - - for f in conda/dist/noarch/apeye-*.tar.bz2; do - [ -e "$f" ] || continue - echo "$f" - conda install "$f" || exit 1 - echo "Deploying to Anaconda.org..." - anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1 - echo "Successfully deployed to Anaconda.org." - done - -fi - -exit 0 diff --git a/.github/actions_build_conda.sh b/.github/actions_build_conda.sh index bd025dc..ea36ff2 100755 --- a/.github/actions_build_conda.sh +++ b/.github/actions_build_conda.sh @@ -3,24 +3,22 @@ set -e -x - python -m repo_helper make-recipe || exit 1 +python -m repo_helper make-recipe || exit 1 - # Switch to miniconda - source "/home/runner/miniconda/etc/profile.d/conda.sh" - hash -r - conda activate base - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda install conda-build - conda install anaconda-client - conda info -a +# Switch to miniconda +source "/home/runner/miniconda/etc/profile.d/conda.sh" +hash -r +conda activate base +conda config --set always_yes yes --set changeps1 no +conda update -q conda +conda install conda-build +conda install anaconda-client +conda info -a - conda config --add channels domdfcoding || exit 1 +conda config --add channels domdfcoding || exit 1 - conda config --add channels conda-forge || exit 1 +conda config --add channels conda-forge || exit 1 - conda build conda -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing - -fi +conda build conda -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing exit 0 diff --git a/.github/actions_deploy_conda.sh b/.github/actions_deploy_conda.sh index b30eafb..80a658a 100755 --- a/.github/actions_deploy_conda.sh +++ b/.github/actions_deploy_conda.sh @@ -3,24 +3,22 @@ set -e -x - # Switch to miniconda - source "/home/runner/miniconda/etc/profile.d/conda.sh" - hash -r - conda activate base - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda install anaconda-client - conda info -a +# Switch to miniconda +source "/home/runner/miniconda/etc/profile.d/conda.sh" +hash -r +conda activate base +conda config --set always_yes yes --set changeps1 no +conda update -q conda +conda install anaconda-client +conda info -a - for f in conda/dist/noarch/apeye-*.tar.bz2; do - [ -e "$f" ] || continue - echo "$f" - conda install "$f" || exit 1 - echo "Deploying to Anaconda.org..." - anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1 - echo "Successfully deployed to Anaconda.org." - done - -fi +for f in conda/dist/noarch/apeye-*.tar.bz2; do + [ -e "$f" ] || continue + echo "$f" + conda install "$f" || exit 1 + echo "Deploying to Anaconda.org..." + anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1 + echo "Successfully deployed to Anaconda.org." +done exit 0 diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 0000000..741c0bd --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,14 @@ +# This file is managed by 'repo_helper'. Don't edit it directly. +--- +name: Artefact Cleaner +on: + schedule: + - cron: 0 9 1 * * +jobs: + Clean: + runs-on: ubuntu-latest + steps: + - name: cleanup + uses: glassechidna/artifact-cleaner@v2 + with: + minimumAge: 1000000.0 diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml index d9ceac4..8e49773 100644 --- a/.github/workflows/conda_ci.yml +++ b/.github/workflows/conda_ci.yml @@ -12,8 +12,6 @@ jobs: name: "Conda" runs-on: ubuntu-latest - strategy: - steps: - name: Checkout 🛎️ uses: "actions/checkout@v2" diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index e95a518..c0bab05 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -143,13 +143,13 @@ jobs: - name: Build Conda 📦 run: | - chmod +x .ci/actions_build_conda.sh - bash .ci/actions_build_conda.sh + chmod +x .github/actions_build_conda.sh + bash .github/actions_build_conda.sh - name: Deploy Conda 🚀 if: startsWith(github.ref, 'refs/tags/') run: | - chmod +x .ci/actions_deploy_conda.sh - bash .ci/actions_deploy_conda.sh + chmod +x .github/actions_deploy_conda.sh + bash .github/actions_deploy_conda.sh env: ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} diff --git a/.isort.cfg b/.isort.cfg index 09accd2..c74971b 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -14,20 +14,20 @@ remove_redundant_aliases = True default_section = THIRDPARTY known_third_party = appdirs - backports-datetime-fromisoformat + backports_datetime_fromisoformat cachecontrol cherrypy coverage - coverage-pyver-pragma - domdf-python-tools + coverage_pyver_pragma + domdf_python_tools github lockfile pytest - pytest-cov - pytest-httpserver - pytest-randomly - pytest-rerunfailures - pytest-timeout + pytest_cov + pytest_httpserver + pytest_randomly + pytest_rerunfailures + pytest_timeout pyyaml requests slumber diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index d51048e..8946477 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -10,7 +10,7 @@ sphinx-copybutton>=0.2.12 sphinx-notfound-page>=0.5 sphinx-prompt>=1.1.0 sphinx-tabs>=1.1.13 -sphinx-toolbox>=1.7.3 +sphinx-toolbox>=1.7.5 sphinxcontrib-httpdomain>=1.7.0 sphinxemoji>=0.1.6 tabulate>=0.8.7 diff --git a/setup.cfg b/setup.cfg index 84fa38b..937ed4e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,11 +26,11 @@ classifiers = Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.6 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 Topic :: Software Development :: Libraries :: Python Modules Typing :: Typed @@ -43,9 +43,9 @@ packages = find: [options.packages.find] exclude = + doc-source tests tests.* - doc-source [mypy] python_version = 3.6 diff --git a/tox.ini b/tox.ini index 62c4b10..8cea688 100644 --- a/tox.ini +++ b/tox.ini @@ -45,9 +45,7 @@ commands = python -m pytest --cov=apeye -r aR tests/ {posargs} [testenv:docs] -setenv = - SHOW_TODOS = 1 - PIP_USE_FEATURE = 2020-resolver +setenv = SHOW_TODOS = 1 basepython = python3.8 changedir = {toxinidir}/doc-source deps =