forked from qucontrol/krotov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (65 loc) · 2.55 KB
/
.travis.yml
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
# Config file for automatic testing at travis-ci.org
dist: xenial
language: python
matrix:
include:
- name: Check codestyle
python: 3.7
env: TOTEST=formatting
- name: Python 3.5
python: 3.5
env: TOTEST="src tests README.rst docs/*.rst"
- name: Python 3.6
python: 3.6
env: TOTEST="src tests README.rst docs/*.rst"
- name: Python 3.7
python: 3.7
env: TOTEST="src tests README.rst docs/*.rst"
- name: Notebook 1 (State-to-State)
python: 3.7
env: TOTEST=docs/notebooks/01_example_simple_state_to_state.ipynb
- name: Notebook 2 (RWA)
python: 3.7
env: TOTEST=docs/notebooks/02_example_lambda_system_rwa_complex_pulse.ipynb
- name: Notebook 3 (Non-Hermitian)
python: 3.7
env: TOTEST=docs/notebooks/03_example_lambda_system_rwa_non_hermitian.ipynb
- name: Notebook 4 (Density Matrix)
python: 3.7
env: TOTEST=docs/notebooks/04_example_dissipative_qubit_reset.ipynb
- name: Notebook 5 (Quantum Gate)
python: 3.7
env: TOTEST=docs/notebooks/05_example_transmon_xgate.ipynb
- name: Notebook 6 (3 States)
python: 3.7
env: TOTEST=docs/notebooks/06_example_3states.ipynb
- name: Notebook 7 (Perfect Entanglers)
python: 3.7
env: TOTEST=docs/notebooks/07_example_PE.ipynb
- name: Notebook 8 (Ensemble Optimization)
python: 3.7
env: TOTEST=docs/notebooks/08_example_ensemble.ipynb TRAVISCMD=travis_wait
- name: Notebook 9 (NumPy)
python: 3.7
env: TOTEST=docs/notebooks/09_example_numpy.ipynb
install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda3.sh;
- bash miniconda3.sh -b -p $HOME/miniconda3
- source $HOME/miniconda3/etc/profile.d/conda.sh
- conda activate
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda create -q -n test_env python=$TRAVIS_PYTHON_VERSION cython numpy scipy jupyter matplotlib flake8
- conda activate test_env
- conda config --append channels conda-forge
- conda install qutip
# we must use an editable install, otherwise coveralls/codecov won't work
- PIP_USE_PEP517=false pip install -e .[dev]
- pip install codecov
- pip freeze
script:
- set -e
- if [[ $TOTEST == 'formatting' ]]; then isort --recursive --check-only src tests; black --skip-string-normalization --line-length 79 --check src tests; fi
- if [[ $TOTEST != 'formatting' ]]; then $TRAVISCMD py.test --doctest-modules --cov=krotov --nbval --sanitize-with docs/nbval_sanitize.cfg --durations=10 $TOTEST; fi
after_success:
- codecov