File: tox.ini

package info (click to toggle)
python-media-type-version 0.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 500 kB
  • sloc: python: 584; sh: 66; makefile: 10
file content (130 lines) | stat: -rw-r--r-- 2,248 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause

[tox]
minversion = 4.22
envlist =
  ruff
  format
  reuse
  uvoxen-sync-check
  ty
  mypy
  unit-tests
  unit-tests-cli
  docs
isolated_build = True

[defs]
pyfiles =
  python/src/media_type_version \
  python/tests/unit

[testenv:ruff]
skip_install = True
tags =
  check
  quick
dependency_groups =
  testenv-ruff
commands =
  ruff check -- {[defs]pyfiles}

[testenv:format]
skip_install = True
tags =
  check
  quick
dependency_groups =
  testenv-ruff
commands =
  ruff check --config python/ruff-base.toml --select=D,I --diff -- {[defs]pyfiles}
  ruff format --config python/ruff-base.toml --check --diff -- {[defs]pyfiles}

[testenv:reformat]
skip_install = True
tags =
  format
  manual
dependency_groups =
  testenv-ruff
commands =
  ruff check --config python/ruff-base.toml --select=D,I --fix -- {[defs]pyfiles}
  ruff format --config python/ruff-base.toml -- {[defs]pyfiles}

[testenv:docs]
skip_install = True
tags =
  docs
dependency_groups =
  docs
commands =
  mkdocs build

[testenv:mypy]
tags =
  check
dependency_groups =
  testenv-mypy
commands =
  mypy {[defs]pyfiles}

[testenv:pyupgrade]
skip_install = True
tags =
  check
  manual
dependency_groups =
  testenv-pyupgrade
allowlist_externals =
  sh
commands =
  sh -c 'pyupgrade --py311-plus python/src/media_type_version/*.py python/tests/unit/*.py'

[testenv:reuse]
skip_install = True
tags =
  check
  quick
dependency_groups =
  testenv-reuse
commands =
  reuse lint

[testenv:ty]
tags =
  check
  quick
dependency_groups =
  testenv-ty
commands =
  ty check -- {[defs]pyfiles}

[testenv:unit-tests]
tags =
  tests
dependency_groups =
  testenv-unit-tests
commands =
  pytest --strict --ignore python/tests/unit/test_prog.py {posargs} python/tests/unit

[testenv:unit-tests-cli]
tags =
  tests
dependency_groups =
  testenv-unit-tests-cli
passenv =
  RUST_LOG
  TEST_MTV_EXTRACT_PROG
commands =
  pytest --strict -k 'test_prog.py' {posargs} python/tests/unit

[testenv:uvoxen-sync-check]
tags =
  check
  quick
dependency_groups =
  testenv-uvoxen
commands =
  uvoxen req generate -o python/requirements/docs.txt --check --diff -g docs
  uvoxen tox generate --check --diff