forked from linkml/linkml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
49 lines (45 loc) · 1.14 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[tox]
requires =
tox>=4
envlist =
lint
py
[testenv]
# Running tests via poetry within the tox environment is not the ideal
# situation, but without it you don't get dev dependencies in the
# tox environment. There are other workaround, but most involve using
# extraneous dependency extras or maintaining a duplicate list of test
# dependencies. See:
# - https://github.com/python-poetry/poetry/issues/1941
# - https://python-poetry.org/docs/faq/#is-tox-supported
allowlist_externals = poetry
deps =
pytest
commands =
poetry install --no-root --sync
poetry run pytest {posargs}
[testenv:codespell]
description = Run spell checker.
skip_install = true
deps =
codespell
tomli # required for getting config from pyproject.toml
commands = codespell {posargs}
[testenv:format]
description = Run code formatters.
skip_install = true
deps =
black
ruff
commands =
black {posargs:linkml tests}
ruff --fix {posargs:linkml tests}
[testenv:lint]
description = Run code linters.
skip_install = true
deps =
black
ruff
commands =
ruff check {posargs:linkml tests}
black --check --diff {posargs:linkml tests}