Skip to content

Commit 41db527

Browse files
[CI]: Use conda-env for CI environments (#20767)
1 parent add3fbf commit 41db527

File tree

64 files changed

+437
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+437
-485
lines changed

.travis.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -34,55 +34,54 @@ matrix:
3434
- os: osx
3535
language: generic
3636
env:
37-
- JOB="3.5_OSX" TEST_ARGS="--skip-slow --skip-network"
37+
- JOB="3.5, OSX" ENV_FILE="ci/travis-35-osx.yaml" TEST_ARGS="--skip-slow --skip-network"
3838
- dist: trusty
3939
env:
40-
- JOB="2.7_LOCALE" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true
40+
- JOB="2.7, locale, slow, old NumPy" ENV_FILE="ci/travis-27-locale.yaml" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true
4141
addons:
4242
apt:
4343
packages:
4444
- language-pack-zh-hans
4545
- dist: trusty
4646
env:
47-
- JOB="2.7" TEST_ARGS="--skip-slow" LINT=true
47+
- JOB="2.7, lint" ENV_FILE="ci/travis-27.yaml" TEST_ARGS="--skip-slow" LINT=true
4848
addons:
4949
apt:
5050
packages:
5151
- python-gtk2
52-
# In allow_failures
5352
- dist: trusty
5453
env:
55-
- JOB="3.6" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" CONDA_FORGE=true COVERAGE=true
54+
- JOB="3.6, coverage" ENV_FILE="ci/travis-36.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true
5655
# In allow_failures
5756
- dist: trusty
5857
env:
59-
- JOB="3.6_SLOW" SLOW=true
58+
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
6059
# In allow_failures
6160
- dist: trusty
6261
env:
63-
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
62+
- JOB="3.6, NumPy dev" ENV_FILE="ci/travis-36-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
6463
addons:
6564
apt:
6665
packages:
6766
- xsel
6867
# In allow_failures
6968
- dist: trusty
7069
env:
71-
- JOB="3.6_DOC" DOC=true
70+
- JOB="3.6, doc" ENV_FILE="ci/travis-36-doc.yaml" DOC=true
7271
allow_failures:
7372
- dist: trusty
7473
env:
75-
- JOB="3.6_SLOW" SLOW=true
74+
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
7675
- dist: trusty
7776
env:
78-
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
77+
- JOB="3.6, NumPy dev" ENV_FILE="ci/travis-36-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
7978
addons:
8079
apt:
8180
packages:
8281
- xsel
8382
- dist: trusty
8483
env:
85-
- JOB="3.6_DOC" DOC=true
84+
- JOB="3.6, doc" ENV_FILE="ci/travis-36-doc.yaml" DOC=true
8685

8786
before_install:
8887
- echo "before_install"

appveyor.yml

+4-11
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,12 @@ install:
7373
- cmd: conda info -a
7474

7575
# create our env
76-
- cmd: conda create -n pandas python=%PYTHON_VERSION% cython pytest>=3.1.0 pytest-xdist
76+
- cmd: conda env create -q -n pandas --file=ci\appveyor-%CONDA_PY%.yaml
7777
- cmd: activate pandas
78-
- cmd: pip install moto
79-
- SET REQ=ci\requirements-%PYTHON_VERSION%_WIN.run
80-
- cmd: echo "installing requirements from %REQ%"
81-
- cmd: conda install -n pandas --file=%REQ%
8278
- cmd: conda list -n pandas
83-
- cmd: echo "installing requirements from %REQ% - done"
84-
85-
# add some pip only reqs to the env
86-
- SET REQ=ci\requirements-%PYTHON_VERSION%_WIN.pip
87-
- cmd: echo "installing requirements from %REQ%"
88-
- cmd: pip install -Ur %REQ%
79+
# uninstall pandas if it's present
80+
- cmd: conda remove pandas -y --force & exit 0
81+
- cmd: pip uninstall -y pandas & exit 0
8982

9083
# build em using the local source checkout in the correct windows env
9184
- cmd: '%CMD_IN_ENV% python setup.py build_ext --inplace'

ci/appveyor-27.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- beautifulsoup4
7+
- bottleneck
8+
- dateutil
9+
- html5lib
10+
- jinja2=2.8
11+
- lxml
12+
- matplotlib
13+
- numexpr
14+
- numpy=1.10*
15+
- openpyxl
16+
- pytables==3.2.2
17+
- python=2.7.*
18+
- pytz
19+
- s3fs
20+
- scipy
21+
- sqlalchemy
22+
- xlrd
23+
- xlsxwriter
24+
- xlwt
25+
# universal
26+
- cython
27+
- pytest
28+
- pytest-xdist
29+
- moto

ci/appveyor-36.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- blosc
7+
- bottleneck
8+
- fastparquet
9+
- feather-format
10+
- matplotlib
11+
- numexpr
12+
- numpy=1.13*
13+
- openpyxl
14+
- pyarrow
15+
- pytables
16+
- python-dateutil
17+
- python=3.6.*
18+
- pytz
19+
- scipy
20+
- thrift=0.10*
21+
- xlrd
22+
- xlsxwriter
23+
- xlwt
24+
# universal
25+
- cython
26+
- pytest
27+
- pytest-xdist

ci/circle-27-compat.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- bottleneck=1.0.0
7+
- cython=0.24
8+
- jinja2=2.8
9+
- numexpr=2.4.4 # we test that we correctly don't use an unsupported numexpr
10+
- numpy=1.9.2
11+
- openpyxl
12+
- psycopg2
13+
- pytables=3.2.2
14+
- python-dateutil=2.5.0
15+
- python=2.7*
16+
- pytz=2013b
17+
- scipy=0.14.0
18+
- sqlalchemy=0.7.8
19+
- xlrd=0.9.2
20+
- xlsxwriter=0.5.2
21+
- xlwt=0.7.5
22+
# universal
23+
- pytest
24+
- pytest-xdist
25+
- pip:
26+
- html5lib==1.0b2
27+
- beautifulsoup4==4.2.1
28+
- pymysql==0.6.0

ci/circle-35-ascii.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
dependencies:
5+
- cython
6+
- nomkl
7+
- numpy
8+
- python-dateutil
9+
- python=3.5*
10+
- pytz
11+
# universal
12+
- pytest
13+
- pytest-xdist

ci/circle-36-locale.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- beautifulsoup4
7+
- cython
8+
- html5lib
9+
- ipython
10+
- jinja2
11+
- lxml
12+
- matplotlib
13+
- nomkl
14+
- numexpr
15+
- numpy
16+
- openpyxl
17+
- psycopg2
18+
- pymysql
19+
- pytables
20+
- python-dateutil
21+
- python=3.6*
22+
- pytz
23+
- s3fs
24+
- scipy
25+
- sqlalchemy
26+
- xarray
27+
- xlrd
28+
- xlsxwriter
29+
- xlwt
30+
# universal
31+
- pytest
32+
- pytest-xdist
33+
- moto

ci/circle-36-locale_slow.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- beautifulsoup4
7+
- cython
8+
- html5lib
9+
- ipython
10+
- jinja2
11+
- lxml
12+
- matplotlib
13+
- nomkl
14+
- numexpr
15+
- numpy
16+
- openpyxl
17+
- psycopg2
18+
- pymysql
19+
- pytables
20+
- python-dateutil
21+
- python=3.6*
22+
- pytz
23+
- s3fs
24+
- scipy
25+
- sqlalchemy
26+
- xarray
27+
- xlrd
28+
- xlsxwriter
29+
- xlwt
30+
# universal
31+
- pytest
32+
- pytest-xdist
33+
- moto

ci/install_circle.sh

+12-18
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ echo "[environmental variable file]"
4646
cat $ENVS_FILE
4747
source $ENVS_FILE
4848

49-
export REQ_BUILD=ci/requirements-${JOB}.build
50-
export REQ_RUN=ci/requirements-${JOB}.run
51-
export REQ_PIP=ci/requirements-${JOB}.pip
52-
5349
# edit the locale override if needed
5450
if [ -n "$LOCALE_OVERRIDE" ]; then
5551
echo "[Adding locale to the first line of pandas/__init__.py]"
@@ -62,25 +58,23 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
6258
fi
6359

6460
# create envbuild deps
65-
echo "[create env: ${REQ_BUILD}]"
66-
time conda create -n pandas -q --file=${REQ_BUILD} || exit 1
67-
time conda install -n pandas pytest>=3.1.0 || exit 1
61+
echo "[create env]"
62+
time conda env create -q -n pandas --file="${ENV_FILE}" || exit 1
6863

6964
source activate pandas
70-
time pip install moto || exit 1
65+
66+
# remove any installed pandas package
67+
# w/o removing anything else
68+
echo
69+
echo "[removing installed pandas]"
70+
conda remove pandas -y --force
71+
pip uninstall -y pandas
7172

7273
# build but don't install
7374
echo "[build em]"
7475
time python setup.py build_ext --inplace || exit 1
7576

76-
# we may have run installations
77-
echo "[conda installs: ${REQ_RUN}]"
78-
if [ -e ${REQ_RUN} ]; then
79-
time conda install -q --file=${REQ_RUN} || exit 1
80-
fi
77+
echo
78+
echo "[show environment]"
8179

82-
# we may have additional pip installs
83-
echo "[pip installs: ${REQ_PIP}]"
84-
if [ -e ${REQ_PIP} ]; then
85-
pip install -r $REQ_PIP
86-
fi
80+
conda list

ci/install_travis.sh

+3-58
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ conda config --set ssl_verify false || exit 1
5050
conda config --set quiet true --set always_yes true --set changeps1 false || exit 1
5151
conda update -q conda
5252

53-
echo
54-
echo "[add channels]"
55-
conda config --remove channels defaults || exit 1
56-
conda config --add channels defaults || exit 1
57-
58-
if [ "$CONDA_FORGE" ]; then
59-
# add conda-forge channel as priority
60-
conda config --add channels conda-forge || exit 1
61-
fi
62-
6353
# Useful for debugging any issues with conda
6454
conda info -a || exit 1
6555

@@ -90,55 +80,10 @@ echo
9080
echo "[create env]"
9181

9282
# create our environment
93-
REQ="ci/requirements-${JOB}.build"
94-
time conda create -n pandas --file=${REQ} || exit 1
83+
time conda env create -q -n pandas --file="${ENV_FILE}" || exit 1
9584

9685
source activate pandas
9786

98-
# may have addtl installation instructions for this build
99-
echo
100-
echo "[build addtl installs]"
101-
REQ="ci/requirements-${JOB}.build.sh"
102-
if [ -e ${REQ} ]; then
103-
time bash $REQ || exit 1
104-
fi
105-
106-
time conda install -n pandas pytest>=3.1.0
107-
time pip install -q pytest-xdist moto
108-
109-
if [ "$LINT" ]; then
110-
conda install flake8=3.4.1
111-
pip install cpplint
112-
fi
113-
114-
if [ "$COVERAGE" ]; then
115-
pip install coverage pytest-cov
116-
fi
117-
118-
# we may have run installations
119-
echo
120-
echo "[conda installs]"
121-
REQ="ci/requirements-${JOB}.run"
122-
if [ -e ${REQ} ]; then
123-
time conda install -n pandas --file=${REQ} || exit 1
124-
fi
125-
126-
# we may have additional pip installs
127-
echo
128-
echo "[pip installs]"
129-
REQ="ci/requirements-${JOB}.pip"
130-
if [ -e ${REQ} ]; then
131-
pip install -r $REQ
132-
fi
133-
134-
# may have addtl installation instructions for this build
135-
echo
136-
echo "[addtl installs]"
137-
REQ="ci/requirements-${JOB}.sh"
138-
if [ -e ${REQ} ]; then
139-
time bash $REQ || exit 1
140-
fi
141-
14287
# remove any installed pandas package
14388
# w/o removing anything else
14489
echo
@@ -156,8 +101,8 @@ echo "[running setup.py develop]"
156101
python setup.py develop || exit 1
157102

158103
echo
159-
echo "[show pandas]"
160-
conda list pandas
104+
echo "[show environment]"
105+
conda list
161106

162107
echo
163108
echo "[done]"

ci/requirements-2.7.build

-6
This file was deleted.

0 commit comments

Comments
 (0)