Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into bug/categorical-i…
Browse files Browse the repository at this point in the history
…ndexing-1row-df

* upstream/master: (284 commits)
  CLN: leftover ix checks (pandas-dev#30951)
  CI: numpydev changed double to single quote (pandas-dev#30952)
  DOC: Fix whatsnew contributors section (pandas-dev#30926)
  STY: wrong placed space in strings (pandas-dev#30940)
  TYP: type up parts of series.py (pandas-dev#30761)
  DOC: Fix SS03 docstring error (pandas-dev#30939)
  CLN: remove unnecesary _date_check_type (pandas-dev#30932)
  DOC: Fixture docs in pandas/conftest.py (pandas-dev#30917)
  CLN: F-strings (pandas-dev#30916)
  replace syntax with f-string (pandas-dev#30919)
  BUG: pickle files left behind by tm.round_trip_pickle (pandas-dev#30906)
  TYP: offsets (pandas-dev#30897)
  TYP: typing annotations (pandas-dev#30901)
  WEB: Remove from roadmap moving the docstring script (pandas-dev#30893)
  WEB: Removing Discourse links (pandas-dev#30890)
  DOC: Encourage use of pre-commit in the docs (pandas-dev#30864)
  DEPR: fix missing stacklevel in pandas.core.index deprecation (pandas-dev#30878)
  CLN: remove unnecessary overriding in subclasses (pandas-dev#30875)
  RLS: 1.0.0rc0
  BUG: validate Index data is 1D + deprecate multi-dim indexing (pandas-dev#30588)
  ...

# Conflicts:
#	doc/source/whatsnew/v1.0.0.rst
  • Loading branch information
keechongtan committed Jan 13, 2020
2 parents c5a7f6e + 46c2864 commit 4c339ac
Show file tree
Hide file tree
Showing 752 changed files with 16,818 additions and 11,625 deletions.
82 changes: 72 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,53 +23,53 @@ jobs:

- name: Looking for unwanted patterns
run: ci/code_checks.sh patterns
if: true
if: always()

- name: Setup environment and build pandas
run: ci/setup_env.sh
if: true
if: always()

- name: Linting
run: |
source activate pandas-dev
ci/code_checks.sh lint
if: true
if: always()

- name: Dependencies consistency
run: |
source activate pandas-dev
ci/code_checks.sh dependencies
if: true
if: always()

- name: Checks on imported code
run: |
source activate pandas-dev
ci/code_checks.sh code
if: true
if: always()

- name: Running doctests
run: |
source activate pandas-dev
ci/code_checks.sh doctests
if: true
if: always()

- name: Docstring validation
run: |
source activate pandas-dev
ci/code_checks.sh docstrings
if: true
if: always()

- name: Typing validation
run: |
source activate pandas-dev
ci/code_checks.sh typing
if: true
if: always()

- name: Testing docstring validation script
run: |
source activate pandas-dev
pytest --capture=no --strict scripts
if: true
if: always()

- name: Running benchmarks
run: |
Expand All @@ -87,11 +87,73 @@ jobs:
else
echo "Benchmarks did not run, no changes detected"
fi
if: true
if: always()

- name: Publish benchmarks artifact
uses: actions/upload-artifact@master
with:
name: Benchmarks log
path: asv_bench/benchmarks.log
if: failure()

web_and_docs:
name: Web and docs
runs-on: ubuntu-latest
steps:

- name: Setting conda path
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"

- name: Checkout
uses: actions/checkout@v1

- name: Setup environment and build pandas
run: ci/setup_env.sh

- name: Build website
run: |
source activate pandas-dev
python web/pandas_web.py web/pandas --target-path=web/build
- name: Build documentation
run: |
source activate pandas-dev
doc/make.py --warnings-are-errors | tee sphinx.log ; exit ${PIPESTATUS[0]}
# This can be removed when the ipython directive fails when there are errors,
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
- name: Check ipython directive errors
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"

- name: Merge website and docs
run: |
mkdir -p pandas_web/docs
cp -r web/build/* pandas_web/
cp -r doc/build/html/* pandas_web/docs/
if: github.event_name == 'push'

- name: Install Rclone
run: sudo apt install rclone -y
if: github.event_name == 'push'

- name: Set up Rclone
run: |
RCLONE_CONFIG_PATH=$HOME/.config/rclone/rclone.conf
mkdir -p `dirname $RCLONE_CONFIG_PATH`
echo "[ovh_cloud_pandas_web]" > $RCLONE_CONFIG_PATH
echo "type = swift" >> $RCLONE_CONFIG_PATH
echo "env_auth = false" >> $RCLONE_CONFIG_PATH
echo "auth_version = 3" >> $RCLONE_CONFIG_PATH
echo "auth = https://auth.cloud.ovh.net/v3/" >> $RCLONE_CONFIG_PATH
echo "endpoint_type = public" >> $RCLONE_CONFIG_PATH
echo "tenant_domain = default" >> $RCLONE_CONFIG_PATH
echo "tenant = 2977553886518025" >> $RCLONE_CONFIG_PATH
echo "domain = default" >> $RCLONE_CONFIG_PATH
echo "user = w4KGs3pmDxpd" >> $RCLONE_CONFIG_PATH
echo "key = ${{ secrets.ovh_object_store_key }}" >> $RCLONE_CONFIG_PATH
echo "region = BHS" >> $RCLONE_CONFIG_PATH
if: github.event_name == 'push'

- name: Sync web
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
if: github.event_name == 'push'
14 changes: 13 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@ repos:
language: python_venv
additional_dependencies: [flake8-comprehensions>=3.1.0]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.20
rev: v4.3.21
hooks:
- id: isort
language: python_venv
exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.730
hooks:
- id: mypy
# We run mypy over all files because of:
# * changes in type definitions may affect non-touched files.
# * Running it with `mypy pandas` and the filenames will lead to
# spurious duplicate module errors,
# see also https://github.com/pre-commit/mirrors-mypy/issues/5
pass_filenames: false
args:
- pandas
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: python
python: 3.5
python: 3.7

# To turn off cached cython files and compiler cache
# set NOCACHE-true
Expand Down Expand Up @@ -48,17 +48,12 @@ matrix:
- mysql
- postgresql

# In allow_failures
- env:
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" SQL="1"
services:
- mysql
- postgresql

allow_failures:
- env:
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" SQL="1"

before_install:
- echo "before_install"
# set non-blocking IO on travis
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Release Notes
=============

The list of changes to Pandas between each release can be found
[here](http://pandas.pydata.org/pandas-docs/stable/whatsnew.html). For full
[here](https://pandas.pydata.org/pandas-docs/stable/whatsnew/index.html). For full
details, see the commit logs at http://github.com/pandas-dev/pandas.
7 changes: 5 additions & 2 deletions asv_bench/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"project": "pandas",

// The project's homepage
"project_url": "http://pandas.pydata.org/",
"project_url": "https://pandas.pydata.org/",

// The URL of the source code repository for the project being
// benchmarked
Expand Down Expand Up @@ -122,5 +122,8 @@
".*": "0409521665"
},
"regression_thresholds": {
}
},
"build_command":
["python setup.py build -j4",
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"],
}
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from pandas._libs import lib

import pandas as pd
from pandas.util import testing as tm

from .pandas_vb_common import tm

for imp in ["pandas.util", "pandas.tools.hashing"]:
try:
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/categoricals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import numpy as np

import pandas as pd
import pandas.util.testing as tm

from .pandas_vb_common import tm

try:
from pandas.api.types import union_categoricals
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/ctors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import numpy as np

from pandas import DatetimeIndex, Index, MultiIndex, Series, Timestamp
import pandas.util.testing as tm

from .pandas_vb_common import tm


def no_change(arr):
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/frame_ctor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import numpy as np

from pandas import DataFrame, MultiIndex, Series, Timestamp, date_range
import pandas.util.testing as tm

from .pandas_vb_common import tm

try:
from pandas.tseries.offsets import Nano, Hour
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/frame_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import numpy as np

from pandas import DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range
import pandas.util.testing as tm

from .pandas_vb_common import tm


class GetNumericData:
Expand Down
5 changes: 3 additions & 2 deletions asv_bench/benchmarks/gil.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from pandas import DataFrame, Series, date_range, factorize, read_csv
from pandas.core.algorithms import take_1d
import pandas.util.testing as tm

from .pandas_vb_common import tm

try:
from pandas import (
Expand All @@ -24,7 +25,7 @@
except ImportError:
from pandas import algos
try:
from pandas.util.testing import test_parallel
from pandas._testing import test_parallel

have_real_test_parallel = True
except ImportError:
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
date_range,
period_range,
)
import pandas.util.testing as tm

from .pandas_vb_common import tm

method_blacklist = {
"object": {
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/index_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
Series,
date_range,
)
import pandas.util.testing as tm

from .pandas_vb_common import tm


class SetOperations:
Expand Down
7 changes: 6 additions & 1 deletion asv_bench/benchmarks/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
option_context,
period_range,
)
import pandas.util.testing as tm

from .pandas_vb_common import tm


class NumericSeriesIndexing:
Expand Down Expand Up @@ -131,6 +132,7 @@ def setup(self):
self.col_scalar = columns[10]
self.bool_indexer = self.df[self.col_scalar] > 0
self.bool_obj_indexer = self.bool_indexer.astype(object)
self.boolean_indexer = (self.df[self.col_scalar] > 0).astype("boolean")

def time_loc(self):
self.df.loc[self.idx_scalar, self.col_scalar]
Expand All @@ -144,6 +146,9 @@ def time_boolean_rows(self):
def time_boolean_rows_object(self):
self.df[self.bool_obj_indexer]

def time_boolean_rows_boolean(self):
self.df[self.boolean_indexer]


class DataFrameNumericIndexing:
def setup(self):
Expand Down
3 changes: 1 addition & 2 deletions asv_bench/benchmarks/inference.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import numpy as np

from pandas import DataFrame, Series, to_numeric
import pandas.util.testing as tm

from .pandas_vb_common import lib, numeric_dtypes
from .pandas_vb_common import lib, numeric_dtypes, tm


class NumericInferOps:
Expand Down
3 changes: 1 addition & 2 deletions asv_bench/benchmarks/io/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import numpy as np

from pandas import Categorical, DataFrame, date_range, read_csv, to_datetime
import pandas.util.testing as tm

from ..pandas_vb_common import BaseIO
from ..pandas_vb_common import BaseIO, tm


class ToCSV(BaseIO):
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/io/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from odf.text import P

from pandas import DataFrame, ExcelWriter, date_range, read_excel
import pandas.util.testing as tm

from ..pandas_vb_common import tm


def _generate_dataframe():
Expand Down
3 changes: 1 addition & 2 deletions asv_bench/benchmarks/io/hdf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import numpy as np

from pandas import DataFrame, HDFStore, date_range, read_hdf
import pandas.util.testing as tm

from ..pandas_vb_common import BaseIO
from ..pandas_vb_common import BaseIO, tm


class HDFStoreDataFrame(BaseIO):
Expand Down
Loading

0 comments on commit 4c339ac

Please sign in to comment.