-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtox.ini
More file actions
74 lines (67 loc) · 2.28 KB
/
tox.ini
File metadata and controls
74 lines (67 loc) · 2.28 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.
[tox]
skipsdist = True
skip_missing_interpreters = True
envlist = {kfp-api,kfp-metadata-writer,kfp-persistence,kfp-profile-controller,kfp-schedwf,kfp-ui,kfp-viewer,kfp-viz}-{lint,unit,integration,integration-ambient},bundle-integration
[vars]
tst_path = {toxinidir}/tests/
[testenv]
allowlist_externals = tox
setenv =
api: CHARM = api
metadata-writer: CHARM = metadata-writer
persistence: CHARM = persistence
profile-controller: CHARM = profile-controller
schedwf: CHARM = schedwf
ui: CHARM = ui
viewer: CHARM = viewer
viz: CHARM = viz
fmt: TYPE = fmt
lint: TYPE = lint
unit: TYPE = unit
integration: TYPE = integration
integration-ambient: TYPE = integration-ambient
commands =
tox -c charms/kfp-{env:CHARM} -e {env:TYPE} -- {posargs}
deps =
poetry>=2.1.3
[testenv:fmt]
commands =
isort {[vars]tst_path}
black {[vars]tst_path}
description = Apply coding style standards to code
commands_pre =
poetry install --only fmt
skip_install = true
[testenv:lint]
commands =
# pflake8 wrapper supports config from pyproject.toml
pflake8 {[vars]tst_path}
isort --check-only --diff {[vars]tst_path}
black --check --diff {[vars]tst_path}
description = Check code against coding style standards
commands_pre =
poetry install --only lint
skip_install = true
[testenv:update-requirements]
commands =
# updating all groups' locked dependencies:
poetry lock --regenerate
# updating all groups' locked dependencies for every charm subfolder:
find charms/ -maxdepth 1 -mindepth 1 -type d -exec bash -c "cd {} && poetry lock --regenerate" \;
description = Update requirements, including those in charm subfolders
allowlist_externals = find
skip_install = true
[testenv:bundle-integration]
commands = pytest -vv --tb=native -s {posargs} {[vars]tst_path}integration/test_kfp_functional.py
description = Run integration tests against the kfp bundle deployment
commands_pre =
poetry install --only integration
skip_install = true
[testenv:bundle-integration-ambient]
commands = pytest -vv --tb=native -s {posargs} {[vars]tst_path}integration/test_kfp_functional_ambient.py
description = Run integration ambient tests against the kfp bundle deployment with ambient mesh integration
commands_pre =
poetry install --only integration
skip_install = true