-
Notifications
You must be signed in to change notification settings - Fork 87
/
tox-travis.ini
190 lines (182 loc) · 8.9 KB
/
tox-travis.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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# 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]
# tox.ini and tox-travis.ini are copies of the same content with different envlist commented out
# tox-travis.ini will have pyXX-clean and all pyXX-installers in the default envlist, while the developer tox.ini
# does not have clean and only has one pyXX-installers
# Uncomment this line for tox.ini
# envlist = py312-build_test,py312-codegen,py312-installers,py{38,39,310,311,312}-test,py312-flake8,py312-docs,py312-pkg
# Uncomment this line for tox-travis.ini
envlist = py312-clean,py312-build_test,py312-codegen,py{38,39,310,311,312}-installers,py{38,39,310,311,312}-test,py312-flake8,py312-docs,py312-pkg
skip_missing_interpreters=True
ignore_basepython_conflict=True
skipsdist = true
toxworkdir = .tox/{env:BITNESS:64}
[testenv]
description =
test: Run tests
build_test: Test the build scripts
clean: Clean code generated files
codegen: Run code generation step
installers: Build the installers (wheels and sdists)
flake8: Run static analysis
docs: Generate documentation
pkg: Verify the package
changedir =
build_test: .
test: .
codegen: .
installers: .
clean: .
docs: docs
flake8: .
pkg: .
commands =
build_test: python --version
build_test: python -c "import platform; print(platform.architecture())"
build_test: python -m pip install --disable-pip-version-check --upgrade pip
build_test: python -m pip list
# doctest validation of code docstrings
build_test: coverage run --rcfile=tools/coverage_unit_tests.rc --source build.helper -m pytest --pyargs build.helper
# actual unit tests
build_test: coverage run --append --rcfile=tools/coverage_unit_tests.rc --source build.helper -m pytest build/unit_tests {posargs} -s
# Display the report on console
build_test: coverage report
# Create the report to upload
build_test: coverage xml -o codegen.xml
# Save the report
build_test: coverage html --directory=generated/htmlcov/unit_tests/codegen
build_test: flake8 --config=./tox.ini --per-file-ignores=build/unit_tests/*.py:F403,F405 build/
test: python --version
test: python -c "import platform; print(platform.architecture())"
test: python -m pip install --disable-pip-version-check --upgrade pip
test: python tools/install_local_wheel.py --driver nitclk
test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nifake -m pytest generated/nifake/nifake {posargs} -s
test: coverage report
test: coverage xml -o nifakeunittest.xml
test: coverage html --directory=generated/htmlcov/unit_tests/nifake
test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nidcpower -m pytest generated/nidcpower/nidcpower {posargs} -s
test: coverage report
test: coverage xml -o nidcpowerunittest.xml
test: coverage html --directory=generated/htmlcov/unit_tests/nidcpower
test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nidigital -m pytest generated/nidigital/nidigital {posargs} -s
test: coverage report
test: coverage xml -o nidigitalunittest.xml
test: coverage html --directory=generated/htmlcov/unit_tests/nidigital
test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nimodinst -m pytest generated/nimodinst/nimodinst {posargs} -s
test: coverage report
test: coverage xml -o nimodinstunittest.xml
test: coverage html --directory=generated/htmlcov/unit_tests/nimodinst
test: coverage run --rcfile=tools/coverage_unit_tests.rc --source niscope -m pytest generated/niscope/niscope {posargs} -s
test: coverage report
test: coverage xml -o niscopeunittest.xml
test: coverage html --directory=generated/htmlcov/unit_tests/niscope
test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nitclk -m pytest generated/nitclk/nitclk {posargs} -s
test: coverage report
test: coverage xml -o nitclkunittest.xml
test: coverage html --directory=generated/htmlcov/unit_tests/nitclk
clean: python --version
clean: python -c "import platform; print(platform.architecture())"
clean: make clean {posargs}
codegen: python --version
codegen: python -c "import platform; print(platform.architecture())"
codegen: python -m pip install --disable-pip-version-check --upgrade pip
codegen: make {posargs}
installers: python --version
installers: python -c "import platform; print(platform.architecture())"
installers: python -m pip install --disable-pip-version-check --upgrade pip
installers: make installers {posargs}
flake8: python --version
flake8: python -c "import platform; print(platform.architecture())"
flake8: python -m pip install --disable-pip-version-check --upgrade pip
flake8: flake8 --config=./tox.ini generated/
flake8: flake8 --config=./tox.ini tools/
flake8: flake8 --config=./tox.ini src/nidcpower/system_tests/ src/nidcpower/examples/
flake8: flake8 --config=./tox.ini src/nidigital/system_tests/ src/nidigital/examples/
flake8: flake8 --config=./tox.ini src/nidmm/system_tests/ src/nidmm/examples/
flake8: flake8 --config=./tox.ini src/nifgen/system_tests/ src/nifgen/examples/
flake8: flake8 --config=./tox.ini src/nimodinst/system_tests/ src/nimodinst/examples/
flake8: flake8 --config=./tox.ini src/niscope/system_tests/ src/niscope/examples/
flake8: flake8 --config=./tox.ini src/nise/system_tests/ src/nise/examples/
flake8: flake8 --config=./tox.ini src/niswitch/system_tests/ src/niswitch/examples/
flake8: flake8 --config=./tox.ini src/nitclk/system_tests/ src/nitclk/examples/
docs: python --version
docs: python -c "import platform; print(platform.architecture())"
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidcpower ../generated/docs/nidcpower/html {posargs}
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidigital ../generated/docs/nidigital/html {posargs}
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidmm ../generated/docs/nidmm/html {posargs}
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nifgen ../generated/docs/nifgen/html {posargs}
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nimodinst ../generated/docs/nimodinst/html {posargs}
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./niscope ../generated/docs/niscope/html {posargs}
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nise ../generated/docs/nise/html {posargs}
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./niswitch ../generated/docs/niswitch/html {posargs}
docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nitclk ../generated/docs/nitclk/html {posargs}
pkg: python --version
pkg: python -c "import platform; print(platform.architecture())"
pkg: python -m twine --version
pkg: python -m twine check generated/nifake/dist/*
pkg: python -m twine check generated/nidcpower/dist/*
pkg: python -m twine check generated/nidigital/dist/*
pkg: python -m twine check generated/nidmm/dist/*
pkg: python -m twine check generated/nifgen/dist/*
pkg: python -m twine check generated/niscope/dist/*
pkg: python -m twine check generated/nise/dist/*
pkg: python -m twine check generated/niswitch/dist/*
# pkg: check-manifest --ignore tox.ini,tests*,.github,.github/*,CONTRIBUTING.rst,docs,docs/*
deps =
test: pytest
test: pytest-timeout
test: coverage
test: mako
test: numpy
test: hightime
test: grpcio == 1.59.0 # Compatible with grpcio-tools 1.59.0
test: protobuf == 4.21.6 # Compatible with grpcio-tools 1.59.0
build_test: pytest
build_test: coverage
build_test: mako
build_test: hacking
build_test: pep8-naming
codegen: mako
codegen: packaging
codegen: grpcio-tools == 1.59.0 # First version to support Python 3.12
installers: build
flake8: hacking
flake8: pep8-naming
docs: sphinx
docs: sphinx-rtd-theme
pkg: check-manifest
pkg: docutils
pkg: pygments
pkg: twine
depends =
codegen: py312-clean
installers: py312-codegen
flake8: py312-codegen
docs: py312-codegen
test: py312-installers
pkg: py312-installers
allowlist_externals =
build_test: mv
test: mv
codegen: make
installers: make
clean: make
[flake8]
show_source = true
# We recommend setting your editor's visual guide to 79 but allow overflow to
# 160 for readability in certain cases due to generated code
# max_line_length = 160
exclude = build,docs,.tox,__pycache__,processed_metadata,.eggs,*_pb2*.py
# H903: Windows style line endings not allowed in code
# E501: Line length
# W391: Blank line at end of file
ignore = H903,E501,W391
[pytest]
addopts = --verbose --doctest-modules --ignore=setup.py
norecursedirs = system_tests examples .* build dist CVS _darcs {arch} *.egg venv
junit_suite_name = nimi-python
python_files = *.py
junit_family = xunit1