Skip to content

Commit

Permalink
merge for update
Browse files Browse the repository at this point in the history
  • Loading branch information
makbigc committed Oct 30, 2019
2 parents e4d5c38 + ee64ebc commit 765e506
Show file tree
Hide file tree
Showing 340 changed files with 9,639 additions and 9,115 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ matrix:
- python: 3.5

include:
- dist: bionic
# 18.04
python: 3.8-dev
env:
- JOB="3.8-dev" PATTERN="(not slow and not network)"

- dist: trusty
env:
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network)"
Expand Down Expand Up @@ -71,24 +77,27 @@ before_install:
# This overrides travis and tells it to look nowhere.
- export BOTO_CONFIG=/dev/null


install:
- echo "install start"
- ci/prep_cython_cache.sh
- ci/setup_env.sh
- ci/submit_cython_cache.sh
- echo "install done"


before_script:
# display server (for clipboard functionality) needs to be started here,
# does not work if done in install:setup_env.sh (GH-26103)
- export DISPLAY=":99.0"
- echo "sh -e /etc/init.d/xvfb start"
- sh -e /etc/init.d/xvfb start
- if [ "$JOB" != "3.8-dev" ]; then sh -e /etc/init.d/xvfb start; fi
- sleep 3

script:
- echo "script start"
- source activate pandas-dev
- echo "$JOB"
- if [ "$JOB" != "3.8-dev" ]; then source activate pandas-dev; fi
- ci/run_tests.sh

after_script:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="https://github.com/pandas-dev/pandas/blob/master/doc/logo/pandas_logo.png"><br>
<img src="https://dev.pandas.io/static/img/pandas.svg"><br>
</div>

-----------------
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/ctors.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class SeriesConstructors:
def setup(self, data_fmt, with_index, dtype):
if data_fmt in (gen_of_str, gen_of_tuples) and with_index:
raise NotImplementedError(
"Series constructors do not support " "using generators with indexes"
"Series constructors do not support using generators with indexes"
)
N = 10 ** 4
if dtype == "float":
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def time_add(self, engine, threads):

def time_and(self, engine, threads):
pd.eval(
"(self.df > 0) & (self.df2 > 0) & " "(self.df3 > 0) & (self.df4 > 0)",
"(self.df > 0) & (self.df2 > 0) & (self.df3 > 0) & (self.df4 > 0)",
engine=engine,
)

Expand Down
4 changes: 2 additions & 2 deletions asv_bench/benchmarks/io/hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def time_write_store_table_dc(self):

def time_query_store_table_wide(self):
self.store.select(
"table_wide", where="index > self.start_wide and " "index < self.stop_wide"
"table_wide", where="index > self.start_wide and index < self.stop_wide"
)

def time_query_store_table(self):
self.store.select("table", where="index > self.start and " "index < self.stop")
self.store.select("table", where="index > self.start and index < self.stop")

def time_store_repr(self):
repr(self.store)
Expand Down
59 changes: 46 additions & 13 deletions asv_bench/benchmarks/join_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ def time_merge_ordered(self):


class MergeAsof:
params = [["backward", "forward", "nearest"]]
param_names = ["direction"]
params = [["backward", "forward", "nearest"], [None, 5]]
param_names = ["direction", "tolerance"]

def setup(self, direction):
def setup(self, direction, tolerance):
one_count = 200000
two_count = 1000000

Expand All @@ -303,6 +303,9 @@ def setup(self, direction):
df1["time32"] = np.int32(df1.time)
df2["time32"] = np.int32(df2.time)

df1["timeu64"] = np.uint64(df1.time)
df2["timeu64"] = np.uint64(df2.time)

self.df1a = df1[["time", "value1"]]
self.df2a = df2[["time", "value2"]]
self.df1b = df1[["time", "key", "value1"]]
Expand All @@ -313,22 +316,52 @@ def setup(self, direction):
self.df2d = df2[["time32", "value2"]]
self.df1e = df1[["time", "key", "key2", "value1"]]
self.df2e = df2[["time", "key", "key2", "value2"]]
self.df1f = df1[["timeu64", "value1"]]
self.df2f = df2[["timeu64", "value2"]]

def time_on_int(self, direction, tolerance):
merge_asof(
self.df1a, self.df2a, on="time", direction=direction, tolerance=tolerance
)

def time_on_int(self, direction):
merge_asof(self.df1a, self.df2a, on="time", direction=direction)
def time_on_int32(self, direction, tolerance):
merge_asof(
self.df1d, self.df2d, on="time32", direction=direction, tolerance=tolerance
)

def time_on_int32(self, direction):
merge_asof(self.df1d, self.df2d, on="time32", direction=direction)
def time_on_uint64(self, direction, tolerance):
merge_asof(
self.df1f, self.df2f, on="timeu64", direction=direction, tolerance=tolerance
)

def time_by_object(self, direction):
merge_asof(self.df1b, self.df2b, on="time", by="key", direction=direction)
def time_by_object(self, direction, tolerance):
merge_asof(
self.df1b,
self.df2b,
on="time",
by="key",
direction=direction,
tolerance=tolerance,
)

def time_by_int(self, direction):
merge_asof(self.df1c, self.df2c, on="time", by="key2", direction=direction)
def time_by_int(self, direction, tolerance):
merge_asof(
self.df1c,
self.df2c,
on="time",
by="key2",
direction=direction,
tolerance=tolerance,
)

def time_multiby(self, direction):
def time_multiby(self, direction, tolerance):
merge_asof(
self.df1e, self.df2e, on="time", by=["key", "key2"], direction=direction
self.df1e,
self.df2e,
on="time",
by=["key", "key2"],
direction=direction,
tolerance=tolerance,
)


Expand Down
6 changes: 3 additions & 3 deletions asv_bench/benchmarks/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def peakmem_rolling(self, constructor, window, dtype, method):
class Apply:
params = (
["DataFrame", "Series"],
[10, 1000],
[3, 300],
["int", "float"],
[sum, np.sum, lambda x: np.sum(x) + 5],
[True, False],
)
param_names = ["contructor", "window", "dtype", "function", "raw"]
param_names = ["constructor", "window", "dtype", "function", "raw"]

def setup(self, constructor, window, dtype, function, raw):
N = 10 ** 5
N = 10 ** 3
arr = (100 * np.random.random(N)).astype(dtype)
self.roll = getattr(pd, constructor)(arr).rolling(window)

Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
condition: true

- script: |
sudo apt-get update
sudo apt-get install -y libc6-dev-i386
ci/setup_env.sh
displayName: 'Setup environment and build pandas'
Expand Down
19 changes: 19 additions & 0 deletions ci/build38.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash -e
# Special build for python3.8 until numpy puts its own wheels up

sudo apt-get install build-essential gcc xvfb
pip install --no-deps -U pip wheel setuptools
pip install python-dateutil pytz cython pytest pytest-xdist hypothesis

# Possible alternative for getting numpy:
pip install --pre -f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com/ numpy

python setup.py build_ext -inplace
python -m pip install -v --no-build-isolation -e .

python -c "import sys; print(sys.version_info)"
python -c "import pandas as pd"
python -c "import hypothesis"

# TODO: Is there anything else in setup_env that we really want to do?
# ci/setup_env.sh
8 changes: 2 additions & 6 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
MSG='Check for non-standard imports' ; echo $MSG
invgrep -R --include="*.py*" -E "from pandas.core.common import " pandas
invgrep -R --include="*.py*" -E "from collections.abc import " pandas
# invgrep -R --include="*.py*" -E "from numpy import nan " pandas # GH#24822 not yet implemented since the offending imports have not all been removed
invgrep -R --include="*.py*" -E "from numpy import nan " pandas
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Check for use of exec' ; echo $MSG
Expand Down Expand Up @@ -171,10 +171,6 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
invgrep -R --include="*.py" --include="*.pyx" --include="*.rst" -E "\.\. (autosummary|contents|currentmodule|deprecated|function|image|important|include|ipython|literalinclude|math|module|note|raw|seealso|toctree|versionadded|versionchanged|warning):[^:]" ./pandas ./doc/source
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Check that the deprecated `assert_raises_regex` is not used (`pytest.raises(match=pattern)` should be used instead)' ; echo $MSG
invgrep -R --exclude=*.pyc --exclude=testing.py --exclude=test_util.py assert_raises_regex pandas
RET=$(($RET + $?)) ; echo $MSG "DONE"

# Check for the following code in testing: `unittest.mock`, `mock.Mock()` or `mock.patch`
MSG='Check that unittest.mock is not used (pytest builtin monkeypatch fixture should be used instead)' ; echo $MSG
invgrep -r -E --include '*.py' '(unittest(\.| import )mock|mock\.Mock\(\)|mock\.patch)' pandas/tests/
Expand Down Expand Up @@ -208,7 +204,7 @@ import sys
import pandas
blacklist = {'bs4', 'gcsfs', 'html5lib', 'http', 'ipython', 'jinja2', 'hypothesis',
'lxml', 'numexpr', 'openpyxl', 'py', 'pytest', 's3fs', 'scipy',
'lxml', 'matplotlib', 'numexpr', 'openpyxl', 'py', 'pytest', 's3fs', 'scipy',
'tables', 'urllib.request', 'xlrd', 'xlsxwriter', 'xlwt'}
# GH#28227 for some of these check for top-level modules, while others are
Expand Down
3 changes: 2 additions & 1 deletion ci/deps/azure-36-32bit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- defaults
- conda-forge
dependencies:
- attrs=19.1.0
- gcc_linux-32
- gcc_linux-32
- gxx_linux-32
Expand All @@ -11,7 +12,7 @@ dependencies:
- python=3.6.*
- pytz=2017.2
# universal
- pytest>=4.0.2,<5.0.0
- pytest
- pytest-xdist
- pytest-mock
- pytest-azurepipelines
Expand Down
9 changes: 7 additions & 2 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash -e

if [ "$JOB" == "3.8-dev" ]; then
/bin/bash ci/build38.sh
exit 0
fi

# edit the locale file if needed
if [ -n "$LOCALE_OVERRIDE" ]; then
Expand Down Expand Up @@ -51,6 +55,7 @@ echo
echo "update conda"
conda config --set ssl_verify false
conda config --set quiet true --set always_yes true --set changeps1 false
conda install pip # create conda to create a historical artifact for pip & setuptools
conda update -n base conda

echo "conda info -a"
Expand Down Expand Up @@ -118,8 +123,8 @@ conda list pandas
echo "[Build extensions]"
python setup.py build_ext -q -i

# XXX: Some of our environments end up with old verisons of pip (10.x)
# Adding a new enough verison of pip to the requirements explodes the
# XXX: Some of our environments end up with old versions of pip (10.x)
# Adding a new enough version of pip to the requirements explodes the
# solve time. Just using pip to update itself.
# - py35_macos
# - py35_compat
Expand Down
Binary file removed doc/logo/pandas_logo.png
Binary file not shown.
47 changes: 0 additions & 47 deletions doc/logo/pandas_logo.py

This file was deleted.

Loading

0 comments on commit 765e506

Please sign in to comment.