Skip to content

Commit

Permalink
FIX: add tox job definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Oct 16, 2024
1 parent dfd322c commit f29783b
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 0 deletions.
106 changes: 106 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dev = [
"gluex-nstar[jupyter]",
"gluex-nstar[sty]",
"pre-commit-uv",
"tox",
]
doc = [
"sphinx-autobuild",
Expand Down Expand Up @@ -155,3 +156,108 @@ sort_first = [
]
spaces_indent_inline_array = 4
trailing_comma_inline_array = true

[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
cov,
docnb-force,
linkcheck,
sty,
skip_install = True
skip_missing_interpreters = True
skipsdist = True
[testenv]
passenv = *
setenv =
PYTHONHASHSEED = 0
[testenv:doc]
allowlist_externals =
sphinx-build
commands =
sphinx-build \
--builder=html \
--fail-on-warning \
--keep-going \
--show-traceback \
docs/ docs/_build/html
description = Build documentation and API through Sphinx
setenv =
{[testenv]setenv}
PYTHONWARNINGS =
[testenv:docnb]
base = doc
description = {[testenv:doc]description} with cached notebook execution
setenv =
{[testenv:doc]setenv}
EXECUTE_NB = yes
[testenv:docnb-force]
base = doc
description = {[testenv:doc]description} with notebook execution (no cache)
setenv =
{[testenv:doc]setenv}
FORCE_EXECUTE_NB = yes
[testenv:doclive]
allowlist_externals =
sphinx-autobuild
commands =
sphinx-autobuild \
--builder=html \
--ignore=docs/_build/ \
--ignore=docs/_images/ \
--ignore=docs/api/ \
--open-browser \
--port=0 \
--re-ignore='.*/__pycache__/.*' \
--re-ignore='.*/.ipynb_checkpoints/.*' \
--re-ignore='.*/.virtual_documents/.*' \
--re-ignore='.*\\.csv' \
--re-ignore='.*\\.gif' \
--re-ignore='.*\\.gitignore' \
--re-ignore='.*\\.gv' \
--re-ignore='.*\\.inv' \
--re-ignore='.*\\.json' \
--re-ignore='.*\\.pickle' \
--re-ignore='.*\\.png' \
--re-ignore='.*\\.svg' \
--re-ignore='.*\\.tmp' \
--re-ignore='.*\\.ya?ml' \
--watch=docs \
--watch=src \
docs/ docs/_build/html
description = Set up a server to directly preview changes to the HTML pages
setenv =
{[testenv:doc]setenv}
[testenv:docnblive]
base = doclive
description = {[testenv:doclive]description} with cached notebook execution
setenv =
{[testenv:doclive]setenv}
EXECUTE_NB = yes
[testenv:linkcheck]
allowlist_externals =
sphinx-build
commands =
sphinx-build \
--builder=linkcheck \
--show-traceback \
docs/ docs/_build/linkcheck
description = Check external links in the documentation (requires internet connection)
setenv =
{[testenv:doclive]setenv}
[testenv:sty]
allowlist_externals =
pre-commit
commands =
pre-commit run {posargs} --all-files
description = Perform all linting, formatting, and spelling checks
"""
52 changes: 52 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f29783b

Please sign in to comment.