-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
executable file
·81 lines (72 loc) · 2.13 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
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
# Tox (http://tox.testrun.org/) is a tool for running tests in multiple virtualenvs.
# This configuration file will run the test suite on all supported Python versions.
# To use it, "pip install tox" and then run "tox" from this directory.
[tox]
envlist =
# Basic configurations: Run the tests for each python version.
py{39, 310, 311}-prod
# Build and test the docs with sphinx.
docs
# Run the linters.
lint
# Pre distribution checks for the package
twine
requires =
setuptools
tox-conda
skip_missing_interpreters = False
[testenv]
conda_env = {toxinidir}/environment.yml
deps =
prod: osml-imagery-toolkit
dev: ../osml-imagery-toolkit
pytest>=7.2.0
pytest-cov>=4.0.0
pytest-xdist>=3.2.0
pytest-asyncio>=0.20.3
mock>=5.0.0
moto[all]>=5.0.0
defusedxml>=0.7.1
setenv =
# ModelRunner
AWS_DEFAULT_REGION=us-west-2
WORKERS=4
WORKERS_PER_CPU=1
JOB_TABLE=TEST-JOB-TABLE
ENDPOINT_TABLE=TEST-ENDPOINT-STATS-TABLE
FEATURE_TABLE=TEST-FEATURE-TABLE
REGION_REQUEST_TABLE=TEST-REGION-REQUEST-TABLE
IMAGE_QUEUE=TEST-IMAGE-QUEUE
REGION_QUEUE=TEST-REGION-QUEUE
IMAGE_STATUS_TOPIC=TEST-IMAGE-STATUS-TOPIC
REGION_STATUS_TOPIC=TEST-REGION-STATUS-TOPIC
SM_SELF_THROTTLING=true
# MOTO/BOTO
AWS_ACCESS_KEY_ID=testing
AWS_SECRET_ACCESS_KEY=testing
AWS_SECURITY_TOKEN=testing
AWS_SESSION_TOKEN=testing
# {posargs} can be passed in by additional arguments specified when invoking tox.
# Can be used to specify which tests to run, e.g.: tox -- -s
commands =
pytest --durations=10 --cov-config .coveragerc --cov aws.osml.model_runner --cov-report term-missing {posargs}
{env:IGNORE_COVERAGE:} coverage html --rcfile .coveragerc
[testenv:twine]
conda_env =
deps =
twine>=1.12.0
commands =
python setup.py sdist
twine check dist/*.tar.gz
[testenv:lint]
skip_install = true
conda_env =
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:docs]
changedir = doc
deps =
sphinx>=6.2.1
sphinx-rtd-theme>=1.2.2
sphinx-autoapi>=2.1.1
commands = sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html