Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into to_html-to_string
Browse files Browse the repository at this point in the history
* upstream/master:
  BUILD: Simplifying contributor dependencies (pandas-dev#23522)
  BUG/REF: TimedeltaIndex.__new__ (pandas-dev#23539)
  • Loading branch information
thoo committed Nov 11, 2018
2 parents 87297cd + 592fd64 commit 895f8cd
Show file tree
Hide file tree
Showing 21 changed files with 511 additions and 213 deletions.
20 changes: 15 additions & 5 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
# In the future we may want to add the validation of docstrings and other checks here.
#
# Usage:
# $ ./ci/code_checks.sh # run all checks
# $ ./ci/code_checks.sh lint # run linting only
# $ ./ci/code_checks.sh patterns # check for patterns that should not exist
# $ ./ci/code_checks.sh doctests # run doctests
# $ ./ci/code_checks.sh # run all checks
# $ ./ci/code_checks.sh lint # run linting only
# $ ./ci/code_checks.sh patterns # check for patterns that should not exist
# $ ./ci/code_checks.sh doctests # run doctests
# $ ./ci/code_checks.sh dependencies # check that dependencies are consistent

echo "inside $0"
[[ $LINT ]] || { echo "NOT Linting. To lint use: LINT=true $0 $1"; exit 0; }
[[ -z "$1" || "$1" == "lint" || "$1" == "patterns" || "$1" == "doctests" ]] || { echo "Unknown command $1. Usage: $0 [lint|patterns|doctests]"; exit 9999; }
[[ -z "$1" || "$1" == "lint" || "$1" == "patterns" || "$1" == "doctests" || "$1" == "dependencies" ]] \
|| { echo "Unknown command $1. Usage: $0 [lint|patterns|doctests|dependencies]"; exit 9999; }

source activate pandas
BASE_DIR="$(dirname $0)/.."
RET=0
CHECK=$1

Expand Down Expand Up @@ -172,4 +175,11 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then

fi

### DEPENDENCIES ###
if [[ -z "$CHECK" || "$CHECK" == "dependencies" ]]; then
MSG='Check that requirements-dev.txt has been generated from environment.yml' ; echo $MSG
$BASE_DIR/scripts/generate_pip_deps_from_conda.py --compare
RET=$(($RET + $?)) ; echo $MSG "DONE"
fi

exit $RET
20 changes: 0 additions & 20 deletions ci/environment-dev.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions ci/requirements-optional-conda.txt

This file was deleted.

16 changes: 0 additions & 16 deletions ci/requirements_dev.txt

This file was deleted.

11 changes: 3 additions & 8 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ We'll now kick off a three-step process:
.. code-block:: none
# Create and activate the build environment
conda env create -f ci/environment-dev.yaml
conda env create -f environment.yml
conda activate pandas-dev
# or with older versions of Anaconda:
Expand All @@ -180,9 +180,6 @@ We'll now kick off a three-step process:
python setup.py build_ext --inplace -j 4
python -m pip install -e .
# Install the rest of the optional dependencies
conda install -c defaults -c conda-forge --file=ci/requirements-optional-conda.txt
At this point you should be able to import pandas from your locally built version::

$ python # start an interpreter
Expand Down Expand Up @@ -221,14 +218,12 @@ You'll need to have at least python3.5 installed on your system.
. ~/virtualenvs/pandas-dev/bin/activate
# Install the build dependencies
python -m pip install -r ci/requirements_dev.txt
python -m pip install -r requirements-dev.txt
# Build and install pandas
python setup.py build_ext --inplace -j 4
python -m pip install -e .
# Install additional dependencies
python -m pip install -r ci/requirements-optional-pip.txt
Creating a branch
-----------------

Expand Down
2 changes: 2 additions & 0 deletions doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ Backwards incompatible API changes

- A newly constructed empty :class:`DataFrame` with integer as the ``dtype`` will now only be cast to ``float64`` if ``index`` is specified (:issue:`22858`)
- :meth:`Series.str.cat` will now raise if `others` is a `set` (:issue:`23009`)
- Passing scalar values to :class:`DatetimeIndex` or :class:`TimedeltaIndex` will now raise ``TypeError`` instead of ``ValueError`` (:issue:`23539`)

.. _whatsnew_0240.api_breaking.deps:

Expand Down Expand Up @@ -971,6 +972,7 @@ Deprecations
- The class ``FrozenNDArray`` has been deprecated. When unpickling, ``FrozenNDArray`` will be unpickled to ``np.ndarray`` once this class is removed (:issue:`9031`)
- Deprecated the `nthreads` keyword of :func:`pandas.read_feather` in favor of
`use_threads` to reflect the changes in pyarrow 0.11.0. (:issue:`23053`)
- Constructing a :class:`TimedeltaIndex` from data with ``datetime64``-dtyped data is deprecated, will raise ``TypeError`` in a future version (:issue:`23539`)

.. _whatsnew_0240.deprecations.datetimelike_int_ops:

Expand Down
53 changes: 53 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: pandas-dev
channels:
- defaults
- conda-forge
dependencies:
# required
- NumPy
- python=3
- python-dateutil>=2.5.0
- pytz

# development
- Cython>=0.28.2
- flake8
- flake8-comprehensions
- flake8-rst
- hypothesis>=3.58.0
- isort
- moto
- pytest>=3.6
- setuptools>=24.2.0
- sphinx
- sphinxcontrib-spelling

# optional
- beautifulsoup4>=4.2.1
- blosc
- bottleneck>=1.2.0
- fastparquet>=0.1.2
- gcsfs
- html5lib
- ipython>=5.6.0
- ipykernel
- jinja2
- lxml
- matplotlib>=2.0.0
- nbsphinx
- numexpr>=2.6.1
- openpyxl
- pyarrow>=0.7.0
- pymysql
- pytables>=3.4.2
- pytest-cov
- pytest-xdist
- s3fs
- scipy>=0.18.1
- seaborn
- sqlalchemy
- statsmodels
- xarray
- xlrd
- xlsxwriter
- xlwt
4 changes: 1 addition & 3 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ def __new__(cls, values, freq=None, tz=None, dtype=None):

result = cls._simple_new(values, freq=freq, tz=tz)
if freq_infer:
inferred = result.inferred_freq
if inferred:
result.freq = to_offset(inferred)
result.freq = to_offset(result.inferred_freq)

# NB: Among other things not yet ported from the DatetimeIndex
# constructor, this does not call _deepcopy_if_needed
Expand Down
Loading

0 comments on commit 895f8cd

Please sign in to comment.