File: .travis-tox.ini

package info (click to toggle)
python-biopython 1.73%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 57,852 kB
  • sloc: python: 169,977; xml: 97,539; ansic: 15,653; sql: 1,208; makefile: 159; sh: 63
file content (159 lines) | stat: -rw-r--r-- 5,251 bytes parent folder | download
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
# This is a configuration file for tox, used to test
# Biopython on various versions of Python etc under
# the Travis Continous Integration service which is
# configured in the file .travis.yml
#
# By default tox will look for tox.ini, so this file
# will not conflict with any personal tox setup.
#
# You can explicitly use this tox configuration on your
# own machine (via the -c setting), PROVIDED you have
# all the relevant versions of Python installed. e.g.
# specifying a specific target envronment (via -e):
#
# $ pip install tox
# $ tox -c .travis-tox.ini -e py35-nocov
#
# Or with test coverage:
#
# $ pip install tox coverage
# $ tox -c .travis-tox.ini -e py35-cover
#
# Or to run the pep8/flake8 etc Python coding style checks:
#
# $ pip install tox flake8 pydocstyle restructuredtext_lint
# $ tox -c .travis-tox.ini -e style
#
# See the envlist setting for other valid arguments.

[tox]
minversion = 2.0
skipsdist = True
envlist =
    style
    sdist
    bdist_wheel
    api
    {py27,py34,py35,py36,pypy,pypy3}-cover
    {py27,py34,py35,py36,pypy,pypy3}-nocov

[testenv]
# TODO: Try tox default sdist based install instead:
skip_install = True
sitepackages = True
passenv =
    CI
    TRAVIS
    TRAVIS_*
    TOXENV
    CODECOV_*
    HOME_4_TCOFFEE
whitelist_externals =
    bash
    echo
# Want to avoid overhead of compiling numpy or scipy:
# (But must compile numpy for PyPy right now)
install_command = pip install --only-binary=scipy {opts} {packages}
deps =
    #Lines startings xxx: are filtered by the environment.
    #Leaving py34 without any soft dependencies (just numpy)
    cover: coverage
    cover: codecov
    py27: unittest2
    py27: mysql-python
    py27,py36: mmtf-python
    py27,py35: reportlab
    py27,py34,py35,py36: psycopg2-binary
    py27,py34,py35,py35: mysql-connector-python-rf
    py27,py35,pypy: rdflib
    pypy,pypy3: numpy==1.12.1
    py27,py34,py36: numpy
    py36: scipy
    py27: networkx
    py36: matplotlib
commands =
    #The bash call is a work around for special characters
    #The /dev/null is to hide the verbose output but leave warnings
    bash -c \'python setup.py install > /dev/null\'
    #The bash call is a work around for the cd command
    nocov: bash -c \'cd Tests && python run_tests.py --offline\'
    #See https://codecov.io/ and https://github.com/codecov/example-python
    cover: bash -c \'rm -rf Tests/coverage.xml\'
    cover: bash -c \'cd Tests && coverage run run_tests.py --offline && coverage xml\'
    cover: codecov --file Tests/coverage.xml -X pycov -X gcov

[testenv:style]
# This does not need to install Biopython or any of its dependencies
skip_install = True
whitelist_externals =
    flake8
    doc8
    rst-lint
    bash
deps =
    flake8
    flake8-docstrings
    flake8-blind-except
    flake8-rst-docstrings
    py34,py35,py36: flake8-bugbear
    restructuredtext_lint
    doc8
commands =
    flake8 --max-line-length 82 setup.py
    # These folders each have their own .flake8 file:
    flake8 BioSQL/
    flake8 Scripts/
    flake8 Doc/examples/
    flake8 Bio/
    flake8 Tests/
    # Now do various checks on our RST files:
    # Calling via bash to get it to expand the wildcard for us
    bash -c \'rst-lint --level warning *.rst\'
    # Check sort order (bash call work around for pipe character)
    bash -c \'grep "^- " CONTRIB.rst | LC_ALL=C sort -u -c -f\'
    # Check copyright date
    bash -c \'grep "1999-`date +'%Y'`" LICENSE.rst\'
    # Would like to tell doc8 to just check *.rst but does *.txt too:
    bash -c "doc8 --ignore-path 'Doc/examples/ec_*.txt' *.rst Doc/"
    # Check no __docformat__ lines
    bash -c "if grep --include '*.py' -rn '^__docformat__ ' Bio BioSQL Tests Scripts Doc ; then echo 'Remove __docformat__ line(s), we assume restructuredtext.'; false; fi"
    # Check DOI link style, see https://www.crossref.org/display-guidelines/
    bash -c "if grep --include '*.py' --include '*.rst' --include '*.tex' -rni 'doi:' Bio BioSQL Scripts Doc ; then echo 'Please use https://doi.org/... not the doi: or DOI: style.'; false; fi"
    bash -c "if grep --include '*.py' --include '*.rst' --include '*.tex' -rn 'dx\.doi\.org' Bio BioSQL Tests Scripts Doc ; then echo 'Please use https://doi.org/... not the dx.doi.org style.'; false; fi"
    bash -c "if grep --include '*.py' --include '*.rst' --include '*.tex' -rn 'http://doi\.org' Bio BioSQL Tests Scripts Doc ; then echo 'Please use https://doi.org/... not http://doi.org/...'; false; fi"

[testenv:sdist]
# This does not need to install Biopython or any of its dependencies
skip_install = True
deps =
commands =
    python setup.py sdist --formats=gztar,zip

[testenv:bdist_wheel]
# This should use NumPy while compiling our C code...
skip_install = True
deps =
    numpy
commands =
    python setup.py bdist_wheel

[testenv:api]
# Note Sphinx likes to have the code installed so can import it
skip_install = False
whitelist_externals =
    bash
    sphinx-apidoc
    make
deps =
    mmtf-python
    mysql-connector-python-rf
    numpy
    rdflib
    reportlab
    scipy
    sphinx>=1.8.0
    numpydoc
commands =
    bash -c \'python setup.py install > /dev/null\'
    bash -c \'mkdir -p Doc/api/_templates Doc/api/_static Doc/api/_build\'
    make -C Doc/api/ html