Migrate to copier-based swh-py-template
This commit is contained in:
parent
553884fa56
commit
c2402f405f
11 changed files with 144 additions and 179 deletions
51
tox.ini
51
tox.ini
|
@ -1,22 +1,27 @@
|
|||
[tox]
|
||||
requires =
|
||||
tox>4
|
||||
envlist=black,flake8,mypy,py3
|
||||
minversion = 4
|
||||
envlist =
|
||||
black
|
||||
flake8
|
||||
mypy
|
||||
py3
|
||||
|
||||
[testenv]
|
||||
extras =
|
||||
testing
|
||||
deps =
|
||||
swh.core[http] >= 0.0.61
|
||||
swh.scheduler[testing] >= 0.5.0
|
||||
amqp != 5.0.4
|
||||
pytest-cov
|
||||
dev: ipdb
|
||||
commands =
|
||||
pytest \
|
||||
!dev: --cov={envsitepackagesdir}/swh/lister/ --cov-branch \
|
||||
--doctest-modules \
|
||||
{envsitepackagesdir}/swh/lister/ {posargs}
|
||||
pytest --doctest-modules \
|
||||
--import-mode importlib \
|
||||
--rootdir {envsitepackagesdir} \
|
||||
--cov={envsitepackagesdir}/swh/lister \
|
||||
--cov-branch \
|
||||
{envsitepackagesdir}/swh/lister \
|
||||
{posargs}
|
||||
# --rootdir and --import-mode are required to make tests that depends
|
||||
# on the test file to be a proper submodule of the swh namespace after
|
||||
# migration to PEP420 (implicit namespace).
|
||||
|
||||
[testenv:black]
|
||||
skip_install = true
|
||||
|
@ -47,32 +52,14 @@ commands =
|
|||
# breaking doc build
|
||||
[testenv:sphinx]
|
||||
allowlist_externals = make
|
||||
usedevelop = true
|
||||
extras =
|
||||
testing
|
||||
deps =
|
||||
# fetch and install swh-docs in develop mode
|
||||
-e git+https://gitlab.softwareheritage.org/swh/devel/swh-docs.git\#egg=swh.docs
|
||||
# fetch and install swh-docs
|
||||
git+https://gitlab.softwareheritage.org/swh/devel/swh-docs.git\#egg=swh.docs
|
||||
setenv =
|
||||
SWH_PACKAGE_DOC_TOX_BUILD = 1
|
||||
# turn warnings into errors
|
||||
SPHINXOPTS = -W
|
||||
commands =
|
||||
make -I ../.tox/sphinx/src/swh-docs/swh/ -C docs
|
||||
|
||||
# build documentation only inside swh-environment using local state
|
||||
# of swh-docs package
|
||||
[testenv:sphinx-dev]
|
||||
allowlist_externals = make
|
||||
usedevelop = true
|
||||
extras =
|
||||
testing
|
||||
deps =
|
||||
# install swh-docs in develop mode
|
||||
-e ../swh-docs
|
||||
setenv =
|
||||
SWH_PACKAGE_DOC_TOX_BUILD = 1
|
||||
# turn warnings into errors
|
||||
SPHINXOPTS = -W
|
||||
commands =
|
||||
make -I ../.tox/sphinx-dev/src/swh-docs/swh/ -C docs
|
||||
make -I {env_dir}/share/ -C docs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue