Skip to content

Commit 388411e

Browse files
committed
Merge tag 'v0.11.0' into debian
Version 0.11 * tag 'v0.11.0': (75 commits) RLS: Version 0.11 BUG: respect passed chunksize in read_csv when using get_chunk function. close pandas-dev#3406 DOC: Adding parameters to frequencies, offsets (issue pandas-dev#2916) BUG: fix broken validators again Revert "BUG: config.is_one_of_factory is broken" DOC: minor indexing.rst doc updates BUG: config.is_one_of_factory is broken TST: add test for config.is_one_of_factory DOC: RELEASE.rst mention new options disp.height/width and deprecated line_width BUG: fix validators for config options ENH: default dimensions for ip zmq frontends derive from disp.height/width defaults ENH: let display.notebook_repr_html control HTML repr in qtconsole again. ENH: fix df.repr() for scripts (keep GH1611 away), accept None for max_cols/rows BUG: rework get_console_size to handle cases properly ENH: optimize _repr_fits_horizontal_, to_string only on slice of interest BUG: for numerical option, sentry should be another Type, not 0 TST: fix test_repr_non_interactive passing by accident TST: adjust tests to accommodate new defaults for display options ENH: Adjust height/width/max_rows defaults to match informal survey results CLN: convert test utilizing disp.line_width to disp.width ...
2 parents f2ff2f7 + f9eea30 commit 388411e

Some content is hidden

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

53 files changed

+1717
-893
lines changed

.travis.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,29 @@ language: python
22

33
python:
44
- 2.6
5-
- 3.3
65

76
env:
87
global:
9-
- NOSE_ARGS="not slow" # need at least this so travis page will show env column
8+
- secure: "O04RU5QRKEDL/SrIWEsVe8O+1TxZqZQSa28Sd+Fz48NW/XddhefYyxzqcUXh\nk/NjWMqknJRQhApLolBianVpsE577OTllzlcyKn3nUL6hjOXcoszGaYray7S\niNGKGyO8xrtB/ZQDtmupz0ksK8sLoCTscdiGotFulczbx0zt+4g="
9+
- secure: "PUJ9nC1/v2vpFUtELSoSjI53OHCVXfFTb8+t5lIGIqHtjUBkhiJSNPfCv8Bx\ndsdrx30qP8KsSceYzaa/bog6p8YNU1iih23S0KbjucutvA0LNHBTNvnxmjBR\nSJfKd5FmwnXvizRyghYBzmQ3NmGO7ADw2DBwKOhgGMqCHZ8Tlc8="
10+
- secure: "IDcMrCCW+6pgJtsI3Q163OPc0iec1ogpitaqiRhHcrEBUCXZgVeclOeiZBlw\n/u+uGyW/O0NhHMaFXKB8BdDVwlQEEHv48syN6npS/A5+O6jriWKL4ozttOhE\npOlu+yLhHnEwx6wZVIHRTVn+t1GkOrjlBcjaQi+Z13G3XmDaSG8="
11+
- secure: "Zu9aj0dTGpvMqT/HqBGQgDYl/v5ubC7lFwfE8Fqb0N1UVXqbpjXnNH/7oal1\nUsIT7klO++LWm+LxsP/A1FWENTSgdYe99JQtNyauW+0x5YR1JTuDJ8atDgx9\nSq66CaVpS5t+ov7UVm2bKSUX+1S8+8zGbIDADrMxEzYEMF7WoGM="
12+
- secure: "AfIvLxvCxj22zrqg3ejGf/VePKT2AyGT9erYzlKpBS0H8yi5Pp1MfmJjhaR4\n51zBtzqHPHiIEY6ZdE06o9PioMWkXS+BqJNrxGSbt1ltxgOFrxW5zOpwiFGZ\nZOv1YeFkuPf8PEsWT7615mdydqTQT7B0pqUKK/d6aka4TQ/tg5Q="
13+
- secure: "EM4ySBUusReNu7H1QHXvjnP/J1QowvfpwEBmjysYxJuq7KcG8HhhlfpUF+Gh\nLBzLak9QBA67k4edhum3qtKuJR5cHuja3+zuV8xmx096B/m96liJFTrwZpea\n58op3W6ZULctEpQNgIkyae20bjxl4f99JhZRUlonoPfx/rBIMFc="
14+
- secure: "pgMYS/6MQqDGb58qdzTJesvAMmcJWTUEEM8gf9rVbfqfxceOL4Xpx8siR9B2\nC4U4MW1cHMPP3RFEb4Jy0uK49aHH10snwZY1S84YPPllpH5ZFXVdN68OayNj\nh4k5N/2hhaaQuJ6Uh8v8s783ye4oYTOW5RJUFqQu4QdG4IkTIMs="
15+
16+
- NOSE_ARGS="not slow" UPLOAD=true
1017

1118
matrix:
1219
include:
1320
- python: 2.7
14-
env: NOSE_ARGS="not network" LOCALE_OVERRIDE="zh_CN.GB18030"
21+
env: NOSE_ARGS="slow and not network" LOCALE_OVERRIDE="zh_CN.GB18030" FULL_DEPS=true UPLOAD=false
1522
- python: 2.7
16-
env: NOSE_ARGS="not slow" FULL_DEPS=true
23+
env: NOSE_ARGS="not slow" FULL_DEPS=true UPLOAD=true
1724
- python: 3.2
18-
env: NOSE_ARGS="not slow" FULL_DEPS=true
25+
env: NOSE_ARGS="not slow" FULL_DEPS=true UPLOAD=true
26+
- python: 3.3
27+
env: NOSE_ARGS="not slow" UPLOAD=true
1928

2029
# allow importing from site-packages,
2130
# so apt-get python-x works for system pythons
@@ -26,11 +35,14 @@ virtualenv:
2635
before_install:
2736
- echo "Waldo1"
2837
- echo $VIRTUAL_ENV
38+
- df
2939
- date
30-
- export PIP_ARGS=-q # comment this this to debug travis install issues
31-
- export APT_ARGS=-qq # comment this to debug travis install issues
40+
# - export PIP_ARGS=-q # comment this this to debug travis install issues
41+
# - export APT_ARGS=-qq # comment this to debug travis install issues
3242
# - set -x # enable this to see bash commands
33-
- source ci/before_install.sh # we need to source this to bring in the env
43+
- export ZIP_FLAGS=-q # comment this to debug travis install issues
44+
- source ci/envars.sh # we need to source this to bring in the envars
45+
- ci/before_install.sh
3446
- python -V
3547

3648
install:
@@ -43,3 +55,4 @@ script:
4355

4456
after_script:
4557
- ci/print_versions.py
58+
- ci/after_script.sh

CONTRIBUTING.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ your contribution or address the issue you're having.
1818

1919
- When submitting a Pull Request
2020
- **Make sure the test suite passes**., and that means on python3 as well.
21-
You can use "test_fast.sh", or tox locally and/or enable Travis-CI on your fork.
21+
You can use "test_fast.sh", or tox locally and/or [enable Travis-CI](http://about.travis-ci.org/docs/user/getting-started/) on your fork.
2222
- We suggest you enable Travis-CI on your fork, to make it easier for the team
2323
to see that the PR does indeed pass all the tests.
2424
- Back-compatiblitiy **really** matters. Pandas already has a large user-base and
@@ -47,6 +47,16 @@ your contribution or address the issue you're having.
4747
and finally a commit message body if there's a need for one.
4848
- Please reference the GH issue number in your commit message using GH1234
4949
or #1234, either style is fine.
50+
- Use "raise AssertionError" rather then plain `assert` in library code (using assert is fine
51+
for test code). python -o strips assertions. better safe then sorry.
52+
- When writing tests, don't use "new" assertion methods added to the unittest module
53+
in 2.7 since pandas currently supports 2.6. The most common pitfall is:
54+
55+
with self.assertRaises(ValueError):
56+
foo
57+
58+
which fails on python 2.6, use `self.assertRaises(TheException,func,args)` instead.
59+
5060
- RELEASE.rst and doc/source/vx.y.z.txt contain an on-going changelog for each
5161
release as it is worked on. Add entries to these files as needed in
5262
a separate commit in your PR, documenting the fix, enhancement or (unavoidable)
@@ -63,6 +73,7 @@ your contribution or address the issue you're having.
6373
- If your code changes are intermixed with style fixes, they are harder to review
6474
before merging. Keep style fixes in separate commits.
6575
- it's fine to clean-up a little around an area you just worked on.
76+
- Generally its a BAD idea to PEP8 on documentation.
6677

6778
Having said that, if you still feel a PEP8 storm is in order, go for it.
6879

RELEASE.rst

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Where to get it
2626
pandas 0.11.0
2727
=============
2828

29-
**Release date:** 2013-??-??
29+
**Release date:** 2013-04-22
3030

3131
**New features**
3232

@@ -173,13 +173,23 @@ pandas 0.11.0
173173
when invalid shapes are passed
174174
- Don't suppress TypeError in GroupBy.agg (GH3238_)
175175
- Methods return None when inplace=True (GH1893_)
176-
176+
- HTML repr output for dataframs is once again controlled by the option
177+
`display.notebook_repr_html`, and on by default.
177178
- ``HDFStore``
178179

179180
- added the method ``select_column`` to select a single column from a table as a Series.
180181
- deprecated the ``unique`` method, can be replicated by ``select_column(key,column).unique()``
182+
- ``min_itemsize`` parameter will now automatically create data_columns for passed keys
181183

182184
- Downcast on pivot if possible (GH3283_), adds argument ``downcast`` to ``fillna``
185+
- Introduced options `display.height/width` for explicitly specifying terminal
186+
height/width in characters. Deprecated display.line_width, now replaced by display.width.
187+
These defaults are in effect for scripts as well, so unless disabled, previously
188+
very wide output will now be output as "expand_repr" style wrapped output.
189+
- Various defaults for options (including display.max_rows) have been revised,
190+
after a brief survey concluded they were wrong for everyone. Now at w=80,h=60.
191+
- HTML repr output for dataframes is once again controlled by the option
192+
`display.notebook_repr_html`, and on by default.
183193

184194
**Bug Fixes**
185195

@@ -296,12 +306,21 @@ pandas 0.11.0
296306
- Ensure index casts work even in Int64Index
297307
- Fix set_index segfault when passing MultiIndex (GH3308_)
298308
- Ensure pickles created in py2 can be read in py3
309+
- Insert ellipsis in MultiIndex summary repr (GH3348_)
310+
- Groupby will handle mutation among an input groups columns (and fallback
311+
to non-fast apply) (GH3380_)
312+
- Eliminated unicode errors on FreeBSD when using MPL GTK backend (GH3360_)
313+
- Period.strftime should return unicode strings always (GH3363_)
314+
- Respect passed read_* chunksize in get_chunk function (GH3406_)
299315

300316
.. _GH3294: https://github.com/pydata/pandas/issues/3294
301317
.. _GH622: https://github.com/pydata/pandas/issues/622
318+
.. _GH3348: https://github.com/pydata/pandas/issues/3348
302319
.. _GH797: https://github.com/pydata/pandas/issues/797
303320
.. _GH1893: https://github.com/pydata/pandas/issues/1893
304321
.. _GH1978: https://github.com/pydata/pandas/issues/1978
322+
.. _GH3360: https://github.com/pydata/pandas/issues/3360
323+
.. _GH3363: https://github.com/pydata/pandas/issues/3363
305324
.. _GH2758: https://github.com/pydata/pandas/issues/2758
306325
.. _GH3275: https://github.com/pydata/pandas/issues/3275
307326
.. _GH2121: https://github.com/pydata/pandas/issues/2121
@@ -406,6 +425,8 @@ pandas 0.11.0
406425
.. _GH2919: https://github.com/pydata/pandas/issues/2919
407426
.. _GH3308: https://github.com/pydata/pandas/issues/3308
408427
.. _GH3311: https://github.com/pydata/pandas/issues/3311
428+
.. _GH3380: https://github.com/pydata/pandas/issues/3380
429+
.. _GH3406: https://github.com/pydata/pandas/issues/3406
409430

410431
pandas 0.10.1
411432
=============

ci/before_install.sh

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
#!/bin/bash
22

3+
# If envars.sh determined we're running in an authorized fork
4+
# and the user opted in to the network cache,and that cached versions
5+
# are available on the cache server, download and deploy the cached
6+
# files to the local filesystem
7+
38
echo "inside $0"
49

510
# overview
6-
if [ ${TRAVIS_PYTHON_VERSION} == "3.3" ]; then
7-
sudo add-apt-repository -y ppa:doko/ppa # we get the py3.3 debs from here
8-
fi
9-
1011
sudo apt-get update $APT_ARGS # run apt-get update for all versions
1112

12-
# # hack for broken 3.3 env
13-
# if [ x"$VIRTUAL_ENV" == x"" ]; then
14-
# VIRTUAL_ENV=~/virtualenv/python$TRAVIS_PYTHON_VERSION_with_system_site_packages;
15-
# fi
13+
if $PLEASE_TRAVIS_FASTER ; then
14+
echo "Faster? well... I'll try."
15+
16+
if $CACHE_FILE_AVAILABLE ; then
17+
echo retrieving "$CACHE_FILE_URL";
18+
19+
wget -q "$CACHE_FILE_URL" -O "/tmp/_$CYTHON_HASH.zip";
20+
unzip $ZIP_FLAGS /tmp/_"$CYTHON_HASH.zip" -d "$BUILD_CACHE_DIR";
21+
rm -f /tmp/_"$CYTHON_HASH.zip"
22+
# copy cythonized c files over
23+
cp -R "$BUILD_CACHE_DIR"/pandas/*.c pandas/
24+
cp -R "$BUILD_CACHE_DIR"/pandas/src/*.c pandas/src/
25+
fi;
26+
echo "VENV_FILE_AVAILABLE=$VENV_FILE_AVAILABLE"
27+
if $VENV_FILE_AVAILABLE ; then
28+
echo "getting venv"
29+
wget -q $VENV_FILE_URL -O "/tmp/venv.zip";
30+
sudo unzip $ZIP_FLAGS -o /tmp/venv.zip -d "/";
31+
sudo chown travis -R "$VIRTUAL_ENV"
32+
rm -f /tmp/_"$CYTHON_HASH.zip"
33+
fi;
34+
fi
1635

17-
# # we only recreate the virtualenv for 3.x
18-
# # since the "Detach bug" only affects python3
19-
# # and travis has numpy preinstalled on 2.x which is quicker
20-
# _VENV=$VIRTUAL_ENV # save it
21-
# if [ ${TRAVIS_PYTHON_VERSION:0:1} == "3" ] ; then
22-
# deactivate # pop out of any venv
23-
# sudo pip install virtualenv==1.8.4 --upgrade
24-
# sudo apt-get install $APT_ARGS python3.3 python3.3-dev
25-
# sudo rm -Rf $_VENV
26-
# virtualenv -p python$TRAVIS_PYTHON_VERSION $_VENV --system-site-packages;
27-
# source $_VENV/bin/activate
28-
# fi
36+
true # never fail because bad things happened here

ci/envars.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/bash
2+
3+
# This must be sourced by .travis.yml, so any envars exported here will
4+
# be available to the rest of the build stages
5+
6+
# - computes a hash based on the cython files in the codebade
7+
# - retrieves the decrypted key if any for all whitelisted forks
8+
# - checks whether the user optd int to use the cache
9+
# - if so, check for availablity of cache files on the server, based on hash
10+
# - set envars to control what the following scripts do
11+
12+
# at most one of these will decrypt, so the end result is that $STORE_KEY
13+
# either holds a single key or does not
14+
export STORE_KEY="$STORE_KEY0""$STORE_KEY1""$STORE_KEY2""$STORE_KEY3""$STORE_KEY4"
15+
export STORE_KEY="$STORE_KEY""$STORE_KEY5""$STORE_KEY6""$STORE_KEY7"
16+
17+
export CYTHON_HASH=$(find pandas | grep -P '\.(pyx|pxd)$' | sort \
18+
| while read N; do echo $(tail -n+1 $N | md5sum ) ;done | md5sum| cut -d ' ' -f 1)
19+
20+
export CYTHON_HASH=$CYTHON_HASH-$TRAVIS_PYTHON_VERSION
21+
22+
# where the cache files live on the server
23+
export CACHE_FILE_URL="https://cache27-pypandas.rhcloud.com/static/$STORE_KEY/$CYTHON_HASH.zip"
24+
export VENV_FILE_URL="https://cache27-pypandas.rhcloud.com/static/$STORE_KEY/venv-$TRAVIS_PYTHON_VERSION.zip"
25+
export CACHE_FILE_STORE_URL="https://cache27-pypandas.rhcloud.com/store/$STORE_KEY"
26+
27+
echo "Hashing:"
28+
find pandas | grep -P '\.(pyx|pxd)$'
29+
echo "Key: $CYTHON_HASH"
30+
31+
export CACHE_FILE_AVAILABLE=false
32+
export VENV_FILE_AVAILABLE=false
33+
export PLEASE_TRAVIS_FASTER=false
34+
35+
# check whether the user opted in to use the cache via commit message
36+
if [ x"$(git log --format='%B' -n 1 | grep PLEASE_TRAVIS_FASTER | wc -l)" != x"0" ]; then
37+
export PLEASE_TRAVIS_FASTER=true
38+
fi;
39+
if [ x"$(git log --format='%B' -n 1 | grep PTF | wc -l)" != x"0" ]; then
40+
export PLEASE_TRAVIS_FASTER=true
41+
fi;
42+
43+
if $PLEASE_TRAVIS_FASTER; then
44+
45+
# check whether the files exists on the server
46+
curl -s -f -I "$CACHE_FILE_URL" # silent, don;t expose key
47+
if [ x"$?" == x"0" ] ; then
48+
export CACHE_FILE_AVAILABLE=true;
49+
fi
50+
51+
52+
curl -s -f -I "$VENV_FILE_URL" # silent, don;t expose key
53+
if [ x"$?" == x"0" ] ; then
54+
export VENV_FILE_AVAILABLE=true;
55+
fi
56+
57+
# the pandas build cache machinery needs this set, and the directory created
58+
export BUILD_CACHE_DIR="/tmp/build_cache"
59+
mkdir "$BUILD_CACHE_DIR"
60+
fi;
61+
62+
# debug
63+
echo "PLEASE_TRAVIS_FASTER=$PLEASE_TRAVIS_FASTER"
64+
echo "CACHE_FILE_AVAILABLE=$CACHE_FILE_AVAILABLE"
65+
echo "VENV_FILE_AVAILABLE=$VENV_FILE_AVAILABLE"
66+
67+
true

0 commit comments

Comments
 (0)