-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
50 lines (42 loc) · 1.35 KB
/
tox.ini
File metadata and controls
50 lines (42 loc) · 1.35 KB
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
[base]
# set the python package name for use in other sections
name = argo_metadata_loader
[tox]
# 3.1.0 required for ignore_basepython_conflict
minversion = 3.1.0
# always use the python version specified in the environment name
ignore_basepython_conflict = true
# set which envs are run when tox is used with no args (e.g. from PyCharm)
envlist = py311, build, lint
[testenv]
basepython=3.11
extras = test
skip_install = true # Poetry handling dep installation, can skip tox doing it
allowlist_externals = poetry
commands_pre =
poetry install --no-root --with lint,test
commands =
coverage run -m --source {[base]name} --data-file=coverage_reports/.coverage --omit tests/* pytest
coverage xml --data-file=coverage_reports/.coverage -o coverage_reports/coverage.xml
coverage report --data-file=coverage_reports/.coverage -m
[testenv:lint]
allowlist_externals = poetry
commands_pre =
poetry install --no-root --with lint
commands =
ruff format --diff {[base]name} tests
ruff check {[base]name} tests
[testenv:build]
allowlist_externals = poetry
commands_pre =
poetry install --no-root --with build
commands =
poetry build
twine check dist/*
[testenv:format]
allowlist_externals = poetry
commands_pre =
poetry install --no-root --with lint
commands =
ruff format {[base]name} tests
ruff check --fix {[base]name} tests