Skip to content

Commit

Permalink
Updated files with 'repo_helper'. (#47)
Browse files Browse the repository at this point in the history
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
  • Loading branch information
repo-helper[bot] committed Jun 2, 2022
1 parent 8d3c3d8 commit 3391c05
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 70 deletions.
22 changes: 0 additions & 22 deletions .github/actions_build_conda.sh

This file was deleted.

23 changes: 0 additions & 23 deletions .github/actions_deploy_conda.sh

This file was deleted.

10 changes: 5 additions & 5 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ daysUntilStale: 180

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 180
daysUntilClose: false

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
Expand All @@ -31,10 +31,10 @@ exemptAssignees: false
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
markComment: false
# This issue has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.

# Comment to post when removing the stale label.
# unmarkComment: >
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/conda_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade "whey-conda" "flit-core<4,>=3.2"
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda update -n base conda
$CONDA/bin/conda config --add channels conda-forge
$CONDA/bin/conda config --add channels domdfcoding
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,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.5,pypy-3.6,pypy-3.7,pypy-3.8'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3,pypy-3.6,pypy-3.7,pypy-3.8'

strategy:
fail-fast: False
Expand All @@ -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.5", testenvs: "py311-dev,build", experimental: True}
- {python-version: "3.11.0-beta.3", 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}
Expand Down
44 changes: 34 additions & 10 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,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.5,pypy-3.6,pypy-3.7,pypy-3.8'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3,pypy-3.6,pypy-3.7,pypy-3.8'

strategy:
fail-fast: False
Expand All @@ -34,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.5", testenvs: "py311-dev,build", experimental: True}
- {python-version: "3.11.0-beta.3", 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}
Expand Down Expand Up @@ -187,22 +187,46 @@ 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 "mkrecipe" "flit-core<4,>=3.2"
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda config --set always_yes yes --set changeps1 no
$CONDA/bin/conda update -n base conda
$CONDA/bin/conda info -a
$CONDA/bin/conda config --add channels conda-forge
$CONDA/bin/conda config --add channels domdfcoding
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
$CONDA/bin/conda config --remove channels defaults
- name: Build Conda 📦
- name: Build Conda Package 📦
run: |
chmod +x .github/actions_build_conda.sh
bash .github/actions_build_conda.sh
python -m mkrecipe --type wheel || exit 1
$CONDA/bin/conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist
- name: Deploy Conda 🚀
- name: Deploy Conda Package 🚀
if: startsWith(github.ref, 'refs/tags/')
run: |
chmod +x .github/actions_deploy_conda.sh
bash .github/actions_deploy_conda.sh
$CONDA/bin/conda config --set always_yes yes --set changeps1 no
$CONDA/bin/conda install anaconda-client
$CONDA/bin/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..."
$CONDA/bin/anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1
echo "Successfully deployed to Anaconda.org."
done
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,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.5,pypy-3.7,pypy-3.8'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3,pypy-3.7,pypy-3.8'

strategy:
fail-fast: False
Expand All @@ -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.5", testenvs: "py311-dev,build", experimental: True}
- {python-version: "3.11.0-beta.3", 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}

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exclude: ^$

repos:
- repo: https://github.com/repo-helper/pyproject-parser
rev: v0.4.2
rev: v0.6.1
hooks:
- id: reformat-pyproject

Expand Down Expand Up @@ -40,7 +40,7 @@ repos:
- id: bind-requirements

- repo: https://github.com/domdfcoding/flake8-dunder-all
rev: v0.1.8
rev: v0.2.1
hooks:
- id: ensure-dunder-all
files: ^apeye/.*\.py$
Expand All @@ -67,7 +67,7 @@ repos:
- --keep-runtime-typing

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.11
rev: v1.2.0
hooks:
- id: remove-crlf
- id: forbid-crlf
Expand All @@ -78,7 +78,7 @@ repos:
- id: snippet-fmt

- repo: https://github.com/python-formate/formate
rev: v0.4.9
rev: v0.4.10
hooks:
- id: formate
exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$
Expand Down
22 changes: 22 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
default: lint

pdf-docs: latex-docs
make -C doc-source/build/latex/

latex-docs:
SPHINX_BUILDER=latex tox -e docs

unused-imports:
tox -e lint -- --select F401

incomplete-defs:
tox -e lint -- --select MAN

vdiff:
git diff $(repo-helper show version -q)..HEAD

bare-ignore:
greppy '# type:? *ignore(?!\[|\w)' -s

lint: unused-imports incomplete-defs bare-ignore
tox -n qa
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ extensions = [
"sphinx_toolbox.more_autosummary",
"sphinx_toolbox.documentation_summary",
"sphinx_toolbox.tweaks.param_dash",
"sphinxcontrib.toctree_plus",
"sphinx_toolbox.tweaks.latex_layout",
"sphinx_toolbox.tweaks.latex_toc",
"sphinx.ext.intersphinx",
Expand All @@ -77,7 +78,6 @@ extensions = [
"notfound.extension",
"sphinx_copybutton",
"sphinxcontrib.default_values",
"sphinxcontrib.toctree_plus",
"sphinx_debuginfo",
"sphinx_licenseinfo",
"seed_intersphinx_mapping",
Expand Down
12 changes: 11 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * testenv:docs
# * testenv:build
# * testenv:lint
# * testenv:perflint
# * testenv:mypy
# * testenv:pyup
# * testenv:coverage
Expand Down Expand Up @@ -82,18 +83,27 @@ deps =
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods
git+https://github.com/python-formate/flake8-missing-annotations.git
pydocstyle>=6.0.0
pygments>=2.7.1
importlib_metadata<4.5.0; python_version<'3.8'
commands = python3 -m flake8_rst_docstrings_sphinx apeye tests --allow-toolbox {posargs}

[testenv:perflint]
basepython = python3.6
changedir = {toxinidir}
ignore_errors = True
skip_install = True
deps = perflint
commands = python3 -m perflint apeye {posargs}

[testenv:mypy]
basepython = python3.6
ignore_errors = True
changedir = {toxinidir}
extras = limiter
deps =
mypy==0.931
mypy==0.942
-r{toxinidir}/tests/requirements.txt
-r{toxinidir}/stubs.txt
commands = mypy apeye tests {posargs}
Expand Down

0 comments on commit 3391c05

Please sign in to comment.