Skip to content

Commit

Permalink
Merge pull request #310 from rmartin16/config-dep-bump
Browse files Browse the repository at this point in the history
 Add CI workflow to bump config file dependencies
  • Loading branch information
freakboy3742 committed Mar 7, 2024
2 parents 0387836 + 565d0ba commit 72f25bb
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 46 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/config-file-deps-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Bump Config File Dependencies

on:
schedule:
- cron: "0 20 * * SUN" # Sunday @ 2000 UTC
workflow_dispatch:

jobs:
dep-bump-versions:
name: Bump Config File Dependencies
uses: beeware/.github/.github/workflows/dep-version-bump.yml@main
secrets: inherit
with:
create-changenote: false
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools==69.0.0",
"setuptools==69.1.1",
"setuptools_scm==8.0.4",
]
build-backend = "setuptools.build_meta"
Expand Down
87 changes: 42 additions & 45 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,64 @@ extend-ignore =
E203,

[tox]
envlist = package,docs
envlist = pre-commit,package,docs-lint,docs-all

[testenv]
extras =
dev
commands =
pytest {posargs:-vv --color yes}
[testenv:pre-commit]
package = wheel
wheel_build_env = .pkg
extras = dev
commands = pre-commit run --all-files --show-diff-on-failure --color=always

# [testenv:towncrier{,-check}]
# skip_install = True
# deps =
# towncrier ~= 22.8
# commands =
# check : python -m towncrier.check --compare-with origin/main
# !check : python -m towncrier {posargs}
[testenv:py]
package = wheel
wheel_build_env = .pkg
extras = dev
commands = python -m pytest {posargs:-vv --color yes}

[docs]
build_dir = _build
# -W: make warnings into errors
# --keep-going: continue on errors
# -j: run with multiple processes
# -n: nitpick mode
sphinx_args = -W --keep-going -j auto -n
# -v: verbose logging
# -E: force rebuild of environment
# -T: print traceback on error
# -a: read/parse all files
# -d: use tox's temp dir for caching
sphinx_args_extra = {[docs]sphinx_args} -v -E -T -a -d {envtmpdir}/doctrees
docs_dir = {tox_root}{/}docs
build_dir = {[docs]docs_dir}{/}_build
# replace when Sphinx>=7.3 and Python 3.8 is dropped:
# -T => --show-traceback
# -W => --fail-on-warning
# -b => --builder
# -v => --verbose
# -a => --write-all
# -E => --fresh-env
sphinx_args = -T -W --keep-going --jobs auto

[testenv:docs{,-lint,-translate,-all}]
change_dir = docs
extras =
docs
[testenv:docs{,-lint,-translate,-all,-live}]
package = wheel
wheel_build_env = .pkg
extras = docs
passenv =
# On macOS M1, you need to manually set the location of the PyEnchant
# library:
# export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.2.dylib
PYENCHANT_LIBRARY_PATH
commands =
!lint-!all-!translate : python -m sphinx {[docs]sphinx_args} -b html . {[docs]build_dir}/html/en
lint : python -m sphinx {[docs]sphinx_args_extra} -b linkcheck . {[docs]build_dir}/links
lint : python -m sphinx {[docs]sphinx_args_extra} -b spelling . {[docs]build_dir}/spell
translate : python -m sphinx {[docs]sphinx_args_extra} -b gettext . {[docs]build_dir}/gettext
translate : python -m sphinx_intl update -p {[docs]build_dir}/gettext -w 0 -l de,es,fr,it,pt,zh_CN
all : python -m sphinx {[docs]sphinx_args_extra} -b html . {[docs]build_dir}/html/en
!lint-!all-!translate-!live : python -m sphinx {[docs]sphinx_args} {posargs} -b html {[docs]docs_dir} {[docs]build_dir}{/}html{/}en
lint : python -m sphinx {[docs]sphinx_args} {posargs} -b linkcheck {[docs]docs_dir} {[docs]build_dir}{/}links
lint : python -m sphinx {[docs]sphinx_args} {posargs} -b spelling {[docs]docs_dir} {[docs]build_dir}{/}spell
live : sphinx-autobuild {[docs]sphinx_args} {posargs} -b html {[docs]docs_dir} {[docs]build_dir}{/}live
translate : python -m sphinx {[docs]sphinx_args} {posargs} -b gettext {[docs]docs_dir} {[docs]build_dir}{/}gettext
translate : python -m sphinx_intl update -p {[docs]build_dir}{/}gettext -w 0 -l de,es,fr,it,pt,zh_CN
all : python -m sphinx {[docs]sphinx_args} {posargs} -v -a -E -b html {[docs]docs_dir} {[docs]build_dir}{/}html{/}en
# Replace `-t machine_translation` with `-t human_translation` if/when a translation
# has been audited by a human. The ReadTheDocs environment variable should also be
# updated to read `TRANSLATION=human`.
all : python -m sphinx {[docs]sphinx_args_extra} -b html -D language=de -t machine_translation . {[docs]build_dir}/html/de
all : python -m sphinx {[docs]sphinx_args_extra} -b html -D language=es -t machine_translation . {[docs]build_dir}/html/es
all : python -m sphinx {[docs]sphinx_args_extra} -b html -D language=fr -t machine_translation . {[docs]build_dir}/html/fr
all : python -m sphinx {[docs]sphinx_args_extra} -b html -D language=it -t machine_translation . {[docs]build_dir}/html/it
all : python -m sphinx {[docs]sphinx_args_extra} -b html -D language=pt -t machine_translation . {[docs]build_dir}/html/pt
all : python -m sphinx {[docs]sphinx_args_extra} -b html -D language=zh_CN -t machine_translation . {[docs]build_dir}/html/zh-cn
all : python -m sphinx {[docs]sphinx_args} {posargs} -v -a -E -b html -D language=de -t machine_translation {[docs]docs_dir} {[docs]build_dir}{/}html{/}de
all : python -m sphinx {[docs]sphinx_args} {posargs} -v -a -E -b html -D language=es -t machine_translation {[docs]docs_dir} {[docs]build_dir}{/}html{/}es
all : python -m sphinx {[docs]sphinx_args} {posargs} -v -a -E -b html -D language=fr -t machine_translation {[docs]docs_dir} {[docs]build_dir}{/}html{/}fr
all : python -m sphinx {[docs]sphinx_args} {posargs} -v -a -E -b html -D language=it -t machine_translation {[docs]docs_dir} {[docs]build_dir}{/}html{/}it
all : python -m sphinx {[docs]sphinx_args} {posargs} -v -a -E -b html -D language=pt -t machine_translation {[docs]docs_dir} {[docs]build_dir}{/}html{/}pt
all : python -m sphinx {[docs]sphinx_args} {posargs} -v -a -E -b html -D language=zh_CN -t machine_translation {[docs]docs_dir} {[docs]build_dir}{/}html{/}zh-cn

[testenv:package]
skip_install = True
deps =
build==1.0.3
twine==4.0.2
build==1.1.1
twine==5.0.0
commands =
python -m build --outdir dist/ .
python -m twine check dist/*
python -m build . --outdir dist{/}
python -m twine check dist{/}*

0 comments on commit 72f25bb

Please sign in to comment.