Skip to content

Commit a929602

Browse files
committed
Merge remote-tracking branch 'repo_org/master' into fix_import_format_pr4
* repo_org/master: TST: Fix test assertion (pandas-dev#23357) BUG: Handle Period in combine (pandas-dev#23350) REF: SparseArray imports (pandas-dev#23329) CI: Migrate some CircleCI jobs to Azure (pandas-dev#22992) DOC: update the is_month_start/is_month_end docstring (pandas-dev#23051)
2 parents a244a17 + caea25a commit a929602

23 files changed

+198
-215
lines changed

.circleci/config.yml

+3-108
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,6 @@
11
version: 2
22
jobs:
33

4-
# --------------------------------------------------------------------------
5-
# 0. py27_compat
6-
# --------------------------------------------------------------------------
7-
py27_compat:
8-
docker:
9-
- image: continuumio/miniconda:latest
10-
# databases configuration
11-
- image: circleci/postgres:9.6.5-alpine-ram
12-
environment:
13-
POSTGRES_USER: postgres
14-
POSTGRES_DB: pandas_nosetest
15-
- image: circleci/mysql:8-ram
16-
environment:
17-
MYSQL_USER: "root"
18-
MYSQL_HOST: "localhost"
19-
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
20-
MYSQL_DATABASE: "pandas_nosetest"
21-
environment:
22-
JOB: "2.7_COMPAT"
23-
ENV_FILE: "ci/circle-27-compat.yaml"
24-
LOCALE_OVERRIDE: "it_IT.UTF-8"
25-
MINICONDA_DIR: /home/ubuntu/miniconda3
26-
steps:
27-
- checkout
28-
- run:
29-
name: build
30-
command: |
31-
./ci/install_circle.sh
32-
./ci/show_circle.sh
33-
- run:
34-
name: test
35-
command: ./ci/run_circle.sh --skip-slow --skip-network
36-
374
# --------------------------------------------------------------------------
385
# 1. py36_locale
396
# --------------------------------------------------------------------------
@@ -62,86 +29,14 @@ jobs:
6229
- run:
6330
name: build
6431
command: |
65-
./ci/install_circle.sh
66-
./ci/show_circle.sh
32+
./ci/circle/install_circle.sh
33+
./ci/circle/show_circle.sh
6734
- run:
6835
name: test
69-
command: ./ci/run_circle.sh --skip-slow --skip-network
70-
71-
# --------------------------------------------------------------------------
72-
# 2. py36_locale_slow
73-
# --------------------------------------------------------------------------
74-
py36_locale_slow:
75-
docker:
76-
- image: continuumio/miniconda:latest
77-
# databases configuration
78-
- image: circleci/postgres:9.6.5-alpine-ram
79-
environment:
80-
POSTGRES_USER: postgres
81-
POSTGRES_DB: pandas_nosetest
82-
- image: circleci/mysql:8-ram
83-
environment:
84-
MYSQL_USER: "root"
85-
MYSQL_HOST: "localhost"
86-
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
87-
MYSQL_DATABASE: "pandas_nosetest"
88-
89-
environment:
90-
JOB: "3.6_LOCALE_SLOW"
91-
ENV_FILE: "ci/circle-36-locale_slow.yaml"
92-
LOCALE_OVERRIDE: "zh_CN.UTF-8"
93-
MINICONDA_DIR: /home/ubuntu/miniconda3
94-
steps:
95-
- checkout
96-
- run:
97-
name: build
98-
command: |
99-
./ci/install_circle.sh
100-
./ci/show_circle.sh
101-
- run:
102-
name: test
103-
command: ./ci/run_circle.sh --only-slow --skip-network
104-
105-
# --------------------------------------------------------------------------
106-
# 3. py35_ascii
107-
# --------------------------------------------------------------------------
108-
py35_ascii:
109-
docker:
110-
- image: continuumio/miniconda:latest
111-
# databases configuration
112-
- image: circleci/postgres:9.6.5-alpine-ram
113-
environment:
114-
POSTGRES_USER: postgres
115-
POSTGRES_DB: pandas_nosetest
116-
- image: circleci/mysql:8-ram
117-
environment:
118-
MYSQL_USER: "root"
119-
MYSQL_HOST: "localhost"
120-
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
121-
MYSQL_DATABASE: "pandas_nosetest"
122-
123-
environment:
124-
JOB: "3.5_ASCII"
125-
ENV_FILE: "ci/circle-35-ascii.yaml"
126-
LOCALE_OVERRIDE: "C"
127-
MINICONDA_DIR: /home/ubuntu/miniconda3
128-
steps:
129-
- checkout
130-
- run:
131-
name: build
132-
command: |
133-
./ci/install_circle.sh
134-
./ci/show_circle.sh
135-
- run:
136-
name: test
137-
command: ./ci/run_circle.sh --skip-slow --skip-network
138-
36+
command: ./ci/circle/run_circle.sh --skip-slow --skip-network
13937

14038
workflows:
14139
version: 2
14240
build_and_test:
14341
jobs:
144-
- py27_compat
14542
- py36_locale
146-
- py36_locale_slow
147-
- py35_ascii

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ after_success:
116116
after_script:
117117
- echo "after_script start"
118118
- source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
119-
- if [ -e /tmp/single.xml ]; then
120-
ci/print_skipped.py /tmp/single.xml;
119+
- if [ -e test-data-single.xml ]; then
120+
ci/print_skipped.py test-data-single.xml;
121121
fi
122-
- if [ -e /tmp/multiple.xml ]; then
123-
ci/print_skipped.py /tmp/multiple.xml;
122+
- if [ -e test-data-multiple.xml ]; then
123+
ci/print_skipped.py test-data-multiple.xml;
124124
fi
125125
- echo "after_script done"

azure-pipelines.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
parameters:
88
name: macOS
99
vmImage: xcode9-macos10.13
10-
# - template: ci/azure/linux.yml
11-
# parameters:
12-
# name: Linux
13-
# vmImage: ubuntu-16.04
10+
- template: ci/azure/linux.yml
11+
parameters:
12+
name: Linux
13+
vmImage: ubuntu-16.04
1414

1515
# Windows Python 2.7 needs VC 9.0 installed, and not sure
1616
# how to make that a conditional task, so for now these are
File renamed without changes.
File renamed without changes.

ci/azure-37-locale.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- beautifulsoup4
7+
- cython>=0.28.2
8+
- html5lib
9+
- ipython
10+
- jinja2
11+
- lxml
12+
- matplotlib
13+
- nomkl
14+
- numexpr
15+
- numpy
16+
- openpyxl=2.5.5
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
34+
- pip:
35+
- hypothesis>=3.58.0

ci/azure/linux.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
parameters:
2+
name: ''
3+
vmImage: ''
4+
5+
jobs:
6+
- job: ${{ parameters.name }}
7+
pool:
8+
vmImage: ${{ parameters.vmImage }}
9+
strategy:
10+
maxParallel: 11
11+
matrix:
12+
py27_np_19:
13+
ENV_FILE: ci/azure-27-compat.yaml
14+
CONDA_PY: "27"
15+
CONDA_ENV: pandas
16+
TEST_ARGS: "--skip-slow --skip-network"
17+
18+
py36_locale:
19+
ENV_FILE: ci/azure-37-locale.yaml
20+
CONDA_PY: "37"
21+
CONDA_ENV: pandas
22+
TEST_ARGS: "--skip-slow --skip-network"
23+
LOCALE_OVERRIDE: "zh_CN.UTF-8"
24+
25+
py36_locale_slow:
26+
ENV_FILE: ci/azure-36-locale_slow.yaml
27+
CONDA_PY: "36"
28+
CONDA_ENV: pandas
29+
TEST_ARGS: "--only-slow --skip-network"
30+
31+
steps:
32+
- script: |
33+
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386; fi
34+
echo "Installing Miniconda"{
35+
ci/incremental/install_miniconda.sh
36+
export PATH=$HOME/miniconda3/bin:$PATH
37+
echo "Setting up Conda environment"
38+
ci/incremental/setup_conda_environment.sh
39+
displayName: 'Before Install'
40+
- script: |
41+
export PATH=$HOME/miniconda3/bin:$PATH
42+
ci/incremental/build.sh
43+
displayName: 'Build'
44+
- script: |
45+
export PATH=$HOME/miniconda3/bin:$PATH
46+
ci/script_single.sh
47+
ci/script_multi.sh
48+
echo "[Test done]"
49+
displayName: 'Test'
50+
- script: |
51+
export PATH=$HOME/miniconda3/bin:$PATH
52+
source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
53+
- task: PublishTestResults@2
54+
inputs:
55+
testResultsFiles: 'test-data-*.xml'
56+
testRunTitle: 'Linux'

ci/azure/macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ jobs:
3939
source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
4040
- task: PublishTestResults@2
4141
inputs:
42-
testResultsFiles: '/tmp/*.xml'
42+
testResultsFiles: 'test-data-*.xml'
4343
testRunTitle: 'MacOS-35'

ci/circle-35-ascii.yaml

-15
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ci/incremental/setup_conda_environment.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ set -v
2727
# w/o removing anything else
2828
echo
2929
echo "[removing installed pandas]"
30-
conda remove pandas -y --force
31-
pip uninstall -y pandas
30+
conda remove pandas -y --force || true
31+
pip uninstall -y pandas || true
3232

3333
echo
3434
echo "[no installed pandas]"
3535
conda list pandas
3636

37+
if [ -n "$LOCALE_OVERRIDE" ]; then
38+
sudo locale-gen "$LOCALE_OVERRIDE"
39+
fi
40+
3741
# # Install the compiler toolchain
3842
# if [[ $(uname) == Linux ]]; then
3943
# if [[ "$CONDA_SUBDIR" == "linux-32" || "$BITS32" == "yes" ]] ; then

ci/script_multi.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ if [ "$DOC" ]; then
2727
echo "We are not running pytest as this is a doc-build"
2828

2929
elif [ "$COVERAGE" ]; then
30-
echo pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
31-
pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
30+
echo pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
31+
pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
3232

3333
elif [ "$SLOW" ]; then
3434
TEST_ARGS="--only-slow --skip-network"
35-
echo pytest -m "not single and slow" -v --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
36-
pytest -m "not single and slow" -v --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
35+
echo pytest -m "not single and slow" -v --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
36+
pytest -m "not single and slow" -v --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
3737

3838
else
39-
echo pytest -n 2 -m "not single" --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
40-
pytest -n 2 -m "not single" --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas # TODO: doctest
39+
echo pytest -n 2 -m "not single" --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
40+
pytest -n 2 -m "not single" --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas # TODO: doctest
4141

4242
fi
4343

ci/script_single.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ echo "[script_single]"
55
source activate pandas
66

77
if [ -n "$LOCALE_OVERRIDE" ]; then
8+
echo "Setting LC_ALL and LANG to $LOCALE_OVERRIDE"
89
export LC_ALL="$LOCALE_OVERRIDE";
9-
echo "Setting LC_ALL to $LOCALE_OVERRIDE"
10+
export LANG="$LOCALE_OVERRIDE";
1011

1112
pycmd='import pandas; print("pandas detected console encoding: %s" % pandas.get_option("display.encoding"))'
1213
python -c "$pycmd"
@@ -25,14 +26,13 @@ if [ "$DOC" ]; then
2526
echo "We are not running pytest as this is a doc-build"
2627

2728
elif [ "$COVERAGE" ]; then
28-
echo pytest -s -m "single" --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=/tmp/single.xml $TEST_ARGS pandas
29-
pytest -s -m "single" --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=/tmp/single.xml $TEST_ARGS pandas
30-
29+
echo pytest -s -m "single" --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=test-data-single.xml $TEST_ARGS pandas
30+
pytest -s -m "single" --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=test-data-single.xml $TEST_ARGS pandas
3131
echo pytest -s --strict scripts
3232
pytest -s --strict scripts
3333
else
34-
echo pytest -m "single" --junitxml=/tmp/single.xml --strict $TEST_ARGS pandas
35-
pytest -m "single" --junitxml=/tmp/single.xml --strict $TEST_ARGS pandas # TODO: doctest
34+
echo pytest -m "single" --junitxml=test-data-single.xml --strict $TEST_ARGS pandas
35+
pytest -m "single" --junitxml=test-data-single.xml --strict $TEST_ARGS pandas
3636

3737
fi
3838

doc/source/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ Test-driven development/code writing
684684
------------------------------------
685685

686686
*pandas* is serious about testing and strongly encourages contributors to embrace
687-
`test-driven development (TDD) <http://en.wikipedia.org/wiki/Test-driven_development>`_.
687+
`test-driven development (TDD) <https://en.wikipedia.org/wiki/Test-driven_development>`_.
688688
This development process "relies on the repetition of a very short development cycle:
689689
first the developer writes an (initially failing) automated test case that defines a desired
690690
improvement or new function, then produces the minimum amount of code to pass that test."

0 commit comments

Comments
 (0)