Skip to content

Commit bade9e4

Browse files
Merge remote-tracking branch 'upstream/master' into ea-array-protocol
2 parents 9506fef + e98032d commit bade9e4

File tree

421 files changed

+8574
-5550
lines changed

Some content is hidden

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

421 files changed

+8574
-5550
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,5 @@ doc/build/html/index.html
109109
# Windows specific leftover:
110110
doc/tmp.sv
111111
doc/source/styled.xlsx
112-
doc/source/templates/
113112
env/
114113
doc/source/savefig/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323

2424
git:
2525
# for cloning
26-
depth: 1000
26+
depth: 1500
2727

2828
matrix:
2929
fast_finish: true

ci/build_docs.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ "${TRAVIS_OS_NAME}" != "linux" ]; then
55
exit 0
66
fi
77

8-
cd "$TRAVIS_BUILD_DIR"
8+
cd "$TRAVIS_BUILD_DIR"/doc
99
echo "inside $0"
1010

1111
if [ "$DOC" ]; then
@@ -14,10 +14,6 @@ if [ "$DOC" ]; then
1414

1515
source activate pandas
1616

17-
mv "$TRAVIS_BUILD_DIR"/doc /tmp
18-
mv "$TRAVIS_BUILD_DIR/LICENSE" /tmp # included in the docs.
19-
cd /tmp/doc
20-
2117
echo ###############################
2218
echo # Log file for the doc build #
2319
echo ###############################
@@ -29,7 +25,7 @@ if [ "$DOC" ]; then
2925
echo # Create and send docs #
3026
echo ########################
3127

32-
cd /tmp/doc/build/html
28+
cd build/html
3329
git config --global user.email "[email protected]"
3430
git config --global user.name "pandas-docs-bot"
3531

ci/code_checks.sh

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99
# In the future we may want to add the validation of docstrings and other checks here.
1010
#
1111
# Usage:
12-
# $ ./ci/code_checks.sh # run all checks
13-
# $ ./ci/code_checks.sh lint # run linting only
14-
# $ ./ci/code_checks.sh patterns # check for patterns that should not exist
15-
# $ ./ci/code_checks.sh doctests # run doctests
12+
# $ ./ci/code_checks.sh # run all checks
13+
# $ ./ci/code_checks.sh lint # run linting only
14+
# $ ./ci/code_checks.sh patterns # check for patterns that should not exist
15+
# $ ./ci/code_checks.sh doctests # run doctests
16+
# $ ./ci/code_checks.sh dependencies # check that dependencies are consistent
1617

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

2123
source activate pandas
24+
BASE_DIR="$(dirname $0)/.."
2225
RET=0
2326
CHECK=$1
2427

@@ -44,6 +47,13 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
4447
flake8 pandas/_libs --filename=*.pxi.in,*.pxd --select=E501,E302,E203,E111,E114,E221,E303,E231,E126,F403
4548
RET=$(($RET + $?)) ; echo $MSG "DONE"
4649

50+
echo "flake8-rst --version"
51+
flake8-rst --version
52+
53+
MSG='Linting code-blocks in .rst documentation' ; echo $MSG
54+
flake8-rst doc/source --filename=*.rst
55+
RET=$(($RET + $?)) ; echo $MSG "DONE"
56+
4757
# Check that cython casting is of the form `<type>obj` as opposed to `<type> obj`;
4858
# it doesn't make a difference, but we want to be internally consistent.
4959
# Note: this grep pattern is (intended to be) equivalent to the python
@@ -64,6 +74,9 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
6474
cpplint --quiet --extensions=c,h --headers=h --recursive --filter=-readability/casting,-runtime/int,-build/include_subdir pandas/_libs/src/*.h pandas/_libs/src/parser pandas/_libs/ujson pandas/_libs/tslibs/src/datetime
6575
RET=$(($RET + $?)) ; echo $MSG "DONE"
6676

77+
echo "isort --version-number"
78+
isort --version-number
79+
6780
# Imports - Check formatting using isort see setup.cfg for settings
6881
MSG='Check import format using isort ' ; echo $MSG
6982
isort --recursive --check-only pandas
@@ -109,6 +122,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
109122
! grep -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
110123
RET=$(($RET + $?)) ; echo $MSG "DONE"
111124

125+
MSG='Check that the deprecated `assert_raises_regex` is not used (`pytest.raises(match=pattern)` should be used instead)' ; echo $MSG
126+
! grep -R --exclude=*.pyc --exclude=testing.py --exclude=test_testing.py assert_raises_regex pandas
127+
RET=$(($RET + $?)) ; echo $MSG "DONE"
128+
112129
MSG='Check for modules that pandas should not import' ; echo $MSG
113130
python -c "
114131
import sys
@@ -141,7 +158,7 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
141158

142159
MSG='Doctests generic.py' ; echo $MSG
143160
pytest -q --doctest-modules pandas/core/generic.py \
144-
-k"-_set_axis_name -_xs -describe -droplevel -groupby -interpolate -pct_change -pipe -reindex -reindex_axis -resample -to_json -transpose -values -xs"
161+
-k"-_set_axis_name -_xs -describe -droplevel -groupby -interpolate -pct_change -pipe -reindex -reindex_axis -to_json -transpose -values -xs"
145162
RET=$(($RET + $?)) ; echo $MSG "DONE"
146163

147164
MSG='Doctests top-level reshaping functions' ; echo $MSG
@@ -162,4 +179,11 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
162179

163180
fi
164181

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

ci/deps/travis-36-doc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ dependencies:
88
- bottleneck
99
- cython>=0.28.2
1010
- fastparquet
11+
- gitpython
1112
- html5lib
1213
- hypothesis>=3.58.0
1314
- ipykernel
14-
- ipython==6.5.0
15+
- ipython
1516
- ipywidgets
1617
- lxml
1718
- matplotlib

ci/deps/travis-36.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- fastparquet
1010
- flake8>=3.5
1111
- flake8-comprehensions
12+
- flake8-rst=0.4.2
1213
- gcsfs
1314
- geopandas
1415
- html5lib

ci/environment-dev.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

ci/requirements-optional-conda.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

ci/requirements_dev.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

doc/make.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ def _process_single_doc(self, single_doc):
126126
self.single_doc = 'api'
127127
elif os.path.exists(os.path.join(SOURCE_PATH, single_doc)):
128128
self.single_doc_type = 'rst'
129-
self.single_doc = os.path.splitext(os.path.basename(single_doc))[0]
129+
130+
if 'whatsnew' in single_doc:
131+
basename = single_doc
132+
else:
133+
basename = os.path.basename(single_doc)
134+
self.single_doc = os.path.splitext(basename)[0]
130135
elif os.path.exists(
131136
os.path.join(SOURCE_PATH, '{}.rst'.format(single_doc))):
132137
self.single_doc_type = 'rst'

0 commit comments

Comments
 (0)