-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox-conda.ini
151 lines (140 loc) · 5.56 KB
/
tox-conda.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
;Environment, package and testing specifications for tox, using tox-conda.
;See tox.ini for documentation on how to run tox correctly for this repo.
[tox]
envlist =
; c-py{36,37,38,39,310}-current
; c-py{36,37,38,39,310}-oldest-supported
; c-py{36,37,38,39,310}-newest-supported
; c-py{36,37,38,39,310}-cutting-edge
c-py{38,39,310}-current
c-py{38,39,310}-oldest-supported
c-py{38,39,310}-newest-supported
c-py{38,39,310}-cutting-edge
;Load the tox-conda plugging, that makes all the conda setup below work
requires = tox-conda
;Use the editable install for testing, as that's the one most/all of the packages uses will be done with too
usedevelop = true
[c-common-deps]
deps =
--upgrade
--no-cache-dir
tox
tox-conda
; pytest
; pytest-mpi==0.6
# make sure the corresponding extras of the scan package are installed
extras = mpi
[c-common-conda-deps]
;note that pytest-mpi only exists in conda-forge (or pip, of course)
conda_deps =
; tox
; tox-conda
pytest
pytest-mpi==0.6
; conda-forge::pytest-mpi==0.6
; mpich
; mpi
; pkgs/main::mpich
; pkgs/main::mpi
; conda-forge::mpich
; conda-forge::mpi
[c-requirements-current]
conda_channels =
; defaults
conda-forge
;For conda mpi to work with mpiexec both mpich and mpi need to be installed from the same channel it seems. Even the
;same version numbers from base and conda-forge are not always compatible. To not screw with the rest of the channel
;installation stuff we explicitly specify the channel for those two packages as base, which in the weird "::" syntax is
;pkgs/main. See e.g. (https://carpentries-incubator.github.io/introduction-to-conda-for-data-scientists/03-using-packages-and-channels/index.html)
;or (https://stackoverflow.com/questions/47887224/anaconda-install-specific-packages-from-specific-channels-using-environment-yml/47887331#47887331)
;conda_deps =
; pkgs/main::mpich
; pkgs/main::mpi
conda_spec =
{toxinidir}{/}requirements.txt
[c-requirements-newest-supported]
conda_channels =
; defaults
conda-forge
;For conda mpi to work with mpiexec both mpich and mpi need to be installed from the same channel it seems.
;conda_deps =
; pkgs/main::mpich
; pkgs/main::mpi
conda_spec =
{toxinidir}{/}tox_requirements{/}requirements_newest_supported.txt
[c-requirements-oldest-supported]
;Note that the order of channels matters. The top one is prioritized.
;For conda mpi to work with mpiexec both mpich/openmpi as well as mpi need to be installed from the same channel it
;seems. For the oldest supported environemnts, not all the pacakges are available on the defaults channel, and some of
;them work better with mpich and some others with openmpi, it seems hence we just get everything from conda-forge to
;ensure those packages, as well as the mpi stuff, work correctly.
;For some reason, one that I do not understand, not only does everything mpi work out fine in py39 if you prioritize the
;default channel, you also must do so, but not for anything mpi related, but instead due to, seemingly(?) some other math
;library being linked which in some math operations flips the last bit of floats, compared to what you expect in e.g.
;test_create_network_random(). I have no clue why..
conda_channels =
; py36,py37,py38: conda-forge
;; py36,py37,py38: defaults
;; py39: defaults
; py39: conda-forge
conda-forge
;conda_deps =
; py39: pkgs/main::mpich
; py39: pkgs/main::mpi
;; pkgs/main::mpich
;; pkgs/main::mpi
;; conda-forge::mpich
;; conda-forge::mpi
conda_spec =
py36: {toxinidir}{/}tox_requirements{/}requirements_oldest_supported_py36.txt
py37: {toxinidir}{/}tox_requirements{/}requirements_oldest_supported_py37.txt
py38: {toxinidir}{/}tox_requirements{/}requirements_oldest_supported_py38.txt
py39: {toxinidir}{/}tox_requirements{/}requirements_oldest_supported_py39.txt
py310: {toxinidir}{/}tox_requirements{/}requirements_oldest_supported_py310.txt
; py311: {toxinidir}{/}tox_requirements{/}requirements_oldest_supported_py311.txt
[c-requirements-cutting-edge]
conda_channels =
; defaults
conda-forge
;For conda mpi to work with mpiexec both mpich and mpi need to be installed from the same channel it seems.
;conda_deps =
; pkgs/main::mpich
; pkgs/main::mpi
conda_spec =
{toxinidir}{/}tox_requirements{/}requirements_cutting_edge.txt
[testenv:c-{py36,py37,py38,py39,py310,py311}-{current,oldest-supported,newest-supported,cutting-edge}]
;Specify the conda channels, and override the external user channels, so that they don't influence the test results
;conda-forge slows down the installation but is needed for scipy 1.4.0 in requirements_oldest_supported
conda_channels =
current: {[c-requirements-current]conda_channels}
oldest-supported: {[c-requirements-oldest-supported]conda_channels}
newest-supported: {[c-requirements-newest-supported]conda_channels}
cutting-edge: {[c-requirements-cutting-edge]conda_channels}
conda_install_args =
--override-channels
deps =
{[c-common-deps]deps}
extras =
{[c-common-deps]extras}
conda_deps =
{[c-common-conda-deps]conda_deps}
conda_spec =
current: {[c-requirements-current]conda_spec}
oldest-supported: {[c-requirements-oldest-supported]conda_spec}
newest-supported: {[c-requirements-newest-supported]conda_spec}
cutting-edge: {[c-requirements-cutting-edge]conda_spec}
[testenv]
allowlist_externals =
which
type
conda
echo
mpiexec
mpiexec.hydra
commands =
python --version
conda list
which mpiexec
mpiexec --version
pytest
mpiexec -n 3 pytest tests/test_mpi.py --with-mpi