forked from ni/nimi-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox-travis.ini
177 lines (168 loc) · 7.37 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
# 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 = py38-build_test,py38-codegen,py38-installers,py{35,36,37,38}-test,py38-flake8,py38-docs,py38-pkg
# Uncomment this line for tox-travis.ini
envlist = py38-clean,py38-build_test,py38-codegen,py{35,36,37,38}-installers,py{35,36,37,38}-test,py38-flake8,py38-docs,py38-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
build_test: coverage run --rcfile=tools/coverage_unit_tests.rc --source build.helper -m py.test --pyargs build.helper
# 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 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 py.test 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 nidigital -m py.test 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 py.test 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 py.test 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 py.test 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 . ../generated/docs/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: coverage
test: mock
test: mako
test: numpy
test: hightime
build_test: pytest
build_test: coverage
build_test: mako
build_test: flake8
build_test: hacking
build_test: pep8-naming
codegen: mako
codegen: packaging
installers: wheel
installers: setuptools
installers: packaging
flake8: flake8
flake8: hacking
flake8: pep8-naming
docs: sphinx
docs: sphinx-rtd-theme
pkg: check-manifest
pkg: docutils
pkg: pygments
pkg: twine
depends =
codegen: py38-clean
installers: py38-codegen
flake8: py38-codegen
docs: py38-codegen
test: py38-installers
pkg: py38-installers
whitelist_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
# 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