Skip to content

Commit

Permalink
Merge remote-tracking branch 'repo_org/master' into Add_ExtensionArra…
Browse files Browse the repository at this point in the history
…y_tests

* repo_org/master: (52 commits)
  ENH: Allow rename_axis to specify index and columns arguments  (pandas-dev#20046)
  STY: proposed isort settings [ci skip] [skip ci] [ciskip] [skipci] (pandas-dev#23366)
  MAINT: Remove extraneous test.parquet file
  CLN: Follow-up comments to pandas-devgh-23392 (pandas-dev#23401)
  BUG GH23282 calling min on series of NaT returns NaT (pandas-dev#23289)
  unpin openpyxl (pandas-dev#23361)
  REF: collect ops dispatch functions in one place, try to de-duplicate SparseDataFrame methods (pandas-dev#23060)
  CLN: Remove pandas.tools module (pandas-dev#23376)
  CLN: Remove some dtype methods from API (pandas-dev#23390)
  CLN: Cleanup toplevel namespace shims (pandas-dev#23386)
  DOC: fixup whatsnew note for GH21394 (pandas-dev#23355)
  Fix import format at pandas/tests/extension directory (pandas-dev#23365)
  DOC: Remove Series.sortlevel from api.rst (pandas-dev#23395)
  API: Disallow dtypes w/o frequency when casting (pandas-dev#23392)
  BUG/TST/REF: Datetimelike Arithmetic Methods (pandas-dev#23215)
  STYLE: lint
  add np.nan* funcs to cython_table (pandas-dev#22109)
  Run Isort on tests/util single PR (pandas-dev#23347)
  BUG: Fix date_range overflow (pandas-dev#23345)
  Run Isort on tests/arrays single PR (pandas-dev#23346)
  ...
  • Loading branch information
thoo committed Oct 30, 2018
2 parents 9c55787 + a2e5994 commit 3760dce
Show file tree
Hide file tree
Showing 347 changed files with 5,393 additions and 3,795 deletions.
111 changes: 3 additions & 108 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,6 @@
version: 2
jobs:

# --------------------------------------------------------------------------
# 0. py27_compat
# --------------------------------------------------------------------------
py27_compat:
docker:
- image: continuumio/miniconda:latest
# databases configuration
- image: circleci/postgres:9.6.5-alpine-ram
environment:
POSTGRES_USER: postgres
POSTGRES_DB: pandas_nosetest
- image: circleci/mysql:8-ram
environment:
MYSQL_USER: "root"
MYSQL_HOST: "localhost"
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_DATABASE: "pandas_nosetest"
environment:
JOB: "2.7_COMPAT"
ENV_FILE: "ci/circle-27-compat.yaml"
LOCALE_OVERRIDE: "it_IT.UTF-8"
MINICONDA_DIR: /home/ubuntu/miniconda3
steps:
- checkout
- run:
name: build
command: |
./ci/install_circle.sh
./ci/show_circle.sh
- run:
name: test
command: ./ci/run_circle.sh --skip-slow --skip-network

# --------------------------------------------------------------------------
# 1. py36_locale
# --------------------------------------------------------------------------
Expand Down Expand Up @@ -62,86 +29,14 @@ jobs:
- run:
name: build
command: |
./ci/install_circle.sh
./ci/show_circle.sh
./ci/circle/install_circle.sh
./ci/circle/show_circle.sh
- run:
name: test
command: ./ci/run_circle.sh --skip-slow --skip-network

# --------------------------------------------------------------------------
# 2. py36_locale_slow
# --------------------------------------------------------------------------
py36_locale_slow:
docker:
- image: continuumio/miniconda:latest
# databases configuration
- image: circleci/postgres:9.6.5-alpine-ram
environment:
POSTGRES_USER: postgres
POSTGRES_DB: pandas_nosetest
- image: circleci/mysql:8-ram
environment:
MYSQL_USER: "root"
MYSQL_HOST: "localhost"
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_DATABASE: "pandas_nosetest"

environment:
JOB: "3.6_LOCALE_SLOW"
ENV_FILE: "ci/circle-36-locale_slow.yaml"
LOCALE_OVERRIDE: "zh_CN.UTF-8"
MINICONDA_DIR: /home/ubuntu/miniconda3
steps:
- checkout
- run:
name: build
command: |
./ci/install_circle.sh
./ci/show_circle.sh
- run:
name: test
command: ./ci/run_circle.sh --only-slow --skip-network

# --------------------------------------------------------------------------
# 3. py35_ascii
# --------------------------------------------------------------------------
py35_ascii:
docker:
- image: continuumio/miniconda:latest
# databases configuration
- image: circleci/postgres:9.6.5-alpine-ram
environment:
POSTGRES_USER: postgres
POSTGRES_DB: pandas_nosetest
- image: circleci/mysql:8-ram
environment:
MYSQL_USER: "root"
MYSQL_HOST: "localhost"
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_DATABASE: "pandas_nosetest"

environment:
JOB: "3.5_ASCII"
ENV_FILE: "ci/circle-35-ascii.yaml"
LOCALE_OVERRIDE: "C"
MINICONDA_DIR: /home/ubuntu/miniconda3
steps:
- checkout
- run:
name: build
command: |
./ci/install_circle.sh
./ci/show_circle.sh
- run:
name: test
command: ./ci/run_circle.sh --skip-slow --skip-network

command: ./ci/circle/run_circle.sh --skip-slow --skip-network

workflows:
version: 2
build_and_test:
jobs:
- py27_compat
- py36_locale
- py36_locale_slow
- py35_ascii
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ after_success:
after_script:
- echo "after_script start"
- source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- if [ -e /tmp/single.xml ]; then
ci/print_skipped.py /tmp/single.xml;
- if [ -e test-data-single.xml ]; then
ci/print_skipped.py test-data-single.xml;
fi
- if [ -e /tmp/multiple.xml ]; then
ci/print_skipped.py /tmp/multiple.xml;
- if [ -e test-data-multiple.xml ]; then
ci/print_skipped.py test-data-multiple.xml;
fi
- echo "after_script done"
28 changes: 20 additions & 8 deletions asv_bench/benchmarks/indexing_engines.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
import numpy as np

from pandas._libs.index import (Int64Engine, UInt64Engine, Float64Engine,
ObjectEngine)
from pandas._libs import index as libindex


def _get_numeric_engines():
engine_names = [
('Int64Engine', np.int64), ('Int32Engine', np.int32),
('Int16Engine', np.int16), ('Int8Engine', np.int8),
('UInt64Engine', np.uint64), ('UInt32Engine', np.uint32),
('UInt16engine', np.uint16), ('UInt8Engine', np.uint8),
('Float64Engine', np.float64), ('Float32Engine', np.float32),
]
return [(getattr(libindex, engine_name), dtype)
for engine_name, dtype in engine_names
if hasattr(libindex, engine_name)]


class NumericEngineIndexing(object):

params = [[Int64Engine, UInt64Engine, Float64Engine],
[np.int64, np.uint64, np.float64],
params = [_get_numeric_engines(),
['monotonic_incr', 'monotonic_decr', 'non_monotonic'],
]
param_names = ['engine', 'dtype', 'index_type']
param_names = ['engine_and_dtype', 'index_type']

def setup(self, engine, dtype, index_type):
def setup(self, engine_and_dtype, index_type):
engine, dtype = engine_and_dtype
N = 10**5
values = list([1] * N + [2] * N + [3] * N)
arr = {
Expand All @@ -26,7 +38,7 @@ def setup(self, engine, dtype, index_type):
# code belows avoids populating the mapping etc. while timing.
self.data.get_loc(2)

def time_get_loc(self, engine, dtype, index_type):
def time_get_loc(self, engine_and_dtype, index_type):
self.data.get_loc(2)


Expand All @@ -44,7 +56,7 @@ def setup(self, index_type):
'non_monotonic': np.array(list('abc') * N, dtype=object),
}[index_type]

self.data = ObjectEngine(lambda: arr, len(arr))
self.data = libindex.ObjectEngine(lambda: arr, len(arr))
# code belows avoids populating the mapping etc. while timing.
self.data.get_loc('b')

Expand Down
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
parameters:
name: macOS
vmImage: xcode9-macos10.13
# - template: ci/azure/linux.yml
# parameters:
# name: Linux
# vmImage: ubuntu-16.04
- template: ci/azure/linux.yml
parameters:
name: Linux
vmImage: ubuntu-16.04

# Windows Python 2.7 needs VC 9.0 installed, and not sure
# how to make that a conditional task, so for now these are
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- nomkl
- numexpr
- numpy
- openpyxl=2.5.5
- openpyxl
- psycopg2
- pymysql
- pytables
Expand Down
35 changes: 35 additions & 0 deletions ci/azure-37-locale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: pandas
channels:
- defaults
- conda-forge
dependencies:
- beautifulsoup4
- cython>=0.28.2
- html5lib
- ipython
- jinja2
- lxml
- matplotlib
- nomkl
- numexpr
- numpy
- openpyxl
- psycopg2
- pymysql
- pytables
- python-dateutil
- python=3.6*
- pytz
- s3fs
- scipy
- sqlalchemy
- xarray
- xlrd
- xlsxwriter
- xlwt
# universal
- pytest
- pytest-xdist
- moto
- pip:
- hypothesis>=3.58.0
2 changes: 1 addition & 1 deletion ci/azure-macos-35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- nomkl
- numexpr
- numpy=1.12.0
- openpyxl=2.5.5
- openpyxl
- pytables
- python=3.5*
- pytz
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-windows-27.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- matplotlib=2.0.1
- numexpr
- numpy=1.12*
- openpyxl=2.5.5
- openpyxl
- pytables
- python=2.7.*
- pytz
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-windows-36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- matplotlib
- numexpr
- numpy=1.14*
- openpyxl=2.5.5
- openpyxl
- parquet-cpp
- pyarrow
- pytables
Expand Down
56 changes: 56 additions & 0 deletions ci/azure/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
parameters:
name: ''
vmImage: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 11
matrix:
py27_np_19:
ENV_FILE: ci/azure-27-compat.yaml
CONDA_PY: "27"
CONDA_ENV: pandas
TEST_ARGS: "--skip-slow --skip-network"

py36_locale:
ENV_FILE: ci/azure-37-locale.yaml
CONDA_PY: "37"
CONDA_ENV: pandas
TEST_ARGS: "--skip-slow --skip-network"
LOCALE_OVERRIDE: "zh_CN.UTF-8"

py36_locale_slow:
ENV_FILE: ci/azure-36-locale_slow.yaml
CONDA_PY: "36"
CONDA_ENV: pandas
TEST_ARGS: "--only-slow --skip-network"

steps:
- script: |
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386; fi
echo "Installing Miniconda"{
ci/incremental/install_miniconda.sh
export PATH=$HOME/miniconda3/bin:$PATH
echo "Setting up Conda environment"
ci/incremental/setup_conda_environment.sh
displayName: 'Before Install'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
ci/incremental/build.sh
displayName: 'Build'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
ci/script_single.sh
ci/script_multi.sh
echo "[Test done]"
displayName: 'Test'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- task: PublishTestResults@2
inputs:
testResultsFiles: 'test-data-*.xml'
testRunTitle: 'Linux'
2 changes: 1 addition & 1 deletion ci/azure/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:
source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- task: PublishTestResults@2
inputs:
testResultsFiles: '/tmp/*.xml'
testResultsFiles: 'test-data-*.xml'
testRunTitle: 'MacOS-35'
15 changes: 0 additions & 15 deletions ci/circle-35-ascii.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion ci/circle-36-locale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- nomkl
- numexpr
- numpy
- openpyxl=2.5.5
- openpyxl
- psycopg2
- pymysql
- pytables
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions ci/incremental/setup_conda_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ set -v
# w/o removing anything else
echo
echo "[removing installed pandas]"
conda remove pandas -y --force
pip uninstall -y pandas
conda remove pandas -y --force || true
pip uninstall -y pandas || true

echo
echo "[no installed pandas]"
conda list pandas

if [ -n "$LOCALE_OVERRIDE" ]; then
sudo locale-gen "$LOCALE_OVERRIDE"
fi

# # Install the compiler toolchain
# if [[ $(uname) == Linux ]]; then
# if [[ "$CONDA_SUBDIR" == "linux-32" || "$BITS32" == "yes" ]] ; then
Expand Down
Loading

0 comments on commit 3760dce

Please sign in to comment.