Skip to content

Commit 8bcb313

Browse files
Merge remote-tracking branch 'upstream/master'
2 parents 1314059 + 143bc34 commit 8bcb313

File tree

1,179 files changed

+180847
-142088
lines changed

Some content is hidden

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

1,179 files changed

+180847
-142088
lines changed

.github/CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
Whether you are a novice or experienced software developer, all contributions and suggestions are welcome!
44

5-
Our main contributing guide can be found [in this repo](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst) or [on the website](https://pandas-docs.github.io/pandas-docs-travis/contributing.html). If you do not want to read it in its entirety, we will summarize the main ways in which you can contribute and point to relevant sections of that document for further information.
5+
Our main contributing guide can be found [in this repo](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst) or [on the website](https://pandas-docs.github.io/pandas-docs-travis/development/contributing.html). If you do not want to read it in its entirety, we will summarize the main ways in which you can contribute and point to relevant sections of that document for further information.
66

77
## Getting Started
88

99
If you are looking to contribute to the *pandas* codebase, the best place to start is the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues). This is also a great place for filing bug reports and making suggestions for ways in which we can improve the code and documentation.
1010

11-
If you have additional questions, feel free to ask them on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Gitter](https://gitter.im/pydata/pandas). Further information can also be found in the "[Where to start?](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#where-to-start)" section.
11+
If you have additional questions, feel free to ask them on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Gitter](https://gitter.im/pydata/pandas). Further information can also be found in the "[Where to start?](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#where-to-start)" section.
1212

1313
## Filing Issues
1414

15-
If you notice a bug in the code or documentation, or have suggestions for how we can improve either, feel free to create an issue on the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) using [GitHub's "issue" form](https://github.com/pandas-dev/pandas/issues/new). The form contains some questions that will help us best address your issue. For more information regarding how to file issues against *pandas*, please refer to the "[Bug reports and enhancement requests](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#bug-reports-and-enhancement-requests)" section.
15+
If you notice a bug in the code or documentation, or have suggestions for how we can improve either, feel free to create an issue on the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) using [GitHub's "issue" form](https://github.com/pandas-dev/pandas/issues/new). The form contains some questions that will help us best address your issue. For more information regarding how to file issues against *pandas*, please refer to the "[Bug reports and enhancement requests](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#bug-reports-and-enhancement-requests)" section.
1616

1717
## Contributing to the Codebase
1818

19-
The code is hosted on [GitHub](https://www.github.com/pandas-dev/pandas), so you will need to use [Git](http://git-scm.com/) to clone the project and make changes to the codebase. Once you have obtained a copy of the code, you should create a development environment that is separate from your existing Python environment so that you can make and test changes without compromising your own work environment. For more information, please refer to the "[Working with the code](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#working-with-the-code)" section.
19+
The code is hosted on [GitHub](https://www.github.com/pandas-dev/pandas), so you will need to use [Git](http://git-scm.com/) to clone the project and make changes to the codebase. Once you have obtained a copy of the code, you should create a development environment that is separate from your existing Python environment so that you can make and test changes without compromising your own work environment. For more information, please refer to the "[Working with the code](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#working-with-the-code)" section.
2020

21-
Before submitting your changes for review, make sure to check that your changes do not break any tests. You can find more information about our test suites in the "[Test-driven development/code writing](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#test-driven-development-code-writing)" section. We also have guidelines regarding coding style that will be enforced during testing, which can be found in the "[Code standards](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#code-standards)" section.
21+
Before submitting your changes for review, make sure to check that your changes do not break any tests. You can find more information about our test suites in the "[Test-driven development/code writing](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#test-driven-development-code-writing)" section. We also have guidelines regarding coding style that will be enforced during testing, which can be found in the "[Code standards](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#code-standards)" section.
2222

23-
Once your changes are ready to be submitted, make sure to push your changes to GitHub before creating a pull request. Details about how to do that can be found in the "[Contributing your changes to pandas](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#contributing-your-changes-to-pandas)" section. We will review your changes, and you will most likely be asked to make additional changes before it is finally ready to merge. However, once it's ready, we will merge it, and you will have successfully contributed to the codebase!
23+
Once your changes are ready to be submitted, make sure to push your changes to GitHub before creating a pull request. Details about how to do that can be found in the "[Contributing your changes to pandas](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#contributing-your-changes-to-pandas)" section. We will review your changes, and you will most likely be asked to make additional changes before it is finally ready to merge. However, once it's ready, we will merge it, and you will have successfully contributed to the codebase!

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://pandas.pydata.org/donate.html

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
- [ ] closes #xxxx
22
- [ ] tests added / passed
3+
- [ ] passes `black pandas`
34
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
45
- [ ] whatsnew entry

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,14 @@ dist
6161
.coverage
6262
coverage.xml
6363
coverage_html_report
64+
.mypy_cache
6465
*.pytest_cache
6566
# hypothesis test database
6667
.hypothesis/
68+
__pycache__
69+
# pytest-monkeytype
70+
monkeytype.sqlite3
71+
6772

6873
# OS generated files #
6974
######################
@@ -101,14 +106,14 @@ asv_bench/pandas/
101106
# Documentation generated files #
102107
#################################
103108
doc/source/generated
104-
doc/source/api/generated
109+
doc/source/user_guide/styled.xlsx
110+
doc/source/reference/api
105111
doc/source/_static
106112
doc/source/vbench
107113
doc/source/vbench.rst
108114
doc/source/index.rst
109115
doc/build/html/index.html
110116
# Windows specific leftover:
111117
doc/tmp.sv
112-
doc/source/styled.xlsx
113118
env/
114119
doc/source/savefig/

.pep8speaks.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,3 @@
22

33
scanner:
44
diff_only: True # If True, errors caused by only the patch are shown
5-
6-
# Opened issue in pep8speaks, so we can directly use the config in setup.cfg
7-
# (and avoid having to duplicate it here):
8-
# https://github.com/OrkoHunter/pep8speaks/issues/95
9-
10-
pycodestyle:
11-
max-line-length: 79
12-
ignore:
13-
- W503, # line break before binary operator
14-
- W504, # line break after binary operator
15-
- E402, # module level import not at top of file
16-
- E731, # do not assign a lambda expression, use a def
17-
- C406, # Unnecessary list literal - rewrite as a dict literal.
18-
- C408, # Unnecessary dict call - rewrite as a literal.
19-
- C409 # Unnecessary list passed to tuple() - rewrite as a tuple literal.

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
repos:
2+
- repo: https://github.com/python/black
3+
rev: stable
4+
hooks:
5+
- id: black
6+
language_version: python3.7
7+
- repo: https://gitlab.com/pycqa/flake8
8+
rev: 3.7.7
9+
hooks:
10+
- id: flake8
11+
language: python_venv
12+
- repo: https://github.com/pre-commit/mirrors-isort
13+
rev: v4.3.20
14+
hooks:
15+
- id: isort
16+
language: python_venv

.travis.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
sudo: false
21
language: python
3-
# Default Python version is usually 2.7
42
python: 3.5
53

64
# To turn off cached cython files and compiler cache
@@ -36,38 +34,23 @@ matrix:
3634
env:
3735
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network)"
3836

39-
- dist: trusty
40-
env:
41-
- JOB="2.7" ENV_FILE="ci/deps/travis-27.yaml" PATTERN="(not slow or (single and db))"
42-
addons:
43-
apt:
44-
packages:
45-
- python-gtk2
46-
4737
- dist: trusty
4838
env:
4939
- JOB="3.6, locale" ENV_FILE="ci/deps/travis-36-locale.yaml" PATTERN="((not slow and not network) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8"
5040

5141
- dist: trusty
5242
env:
53-
- JOB="3.6, coverage" ENV_FILE="ci/deps/travis-36.yaml" PATTERN="((not slow and not network) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true
43+
- JOB="3.6, coverage" ENV_FILE="ci/deps/travis-36-cov.yaml" PATTERN="((not slow and not network) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true
5444

5545
# In allow_failures
5646
- dist: trusty
5747
env:
5848
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
5949

60-
# In allow_failures
61-
- dist: trusty
62-
env:
63-
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
6450
allow_failures:
6551
- dist: trusty
6652
env:
6753
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
68-
- dist: trusty
69-
env:
70-
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
7154

7255
before_install:
7356
- echo "before_install"
@@ -91,28 +74,25 @@ before_install:
9174
install:
9275
- echo "install start"
9376
- ci/prep_cython_cache.sh
94-
- ci/install_travis.sh
77+
- ci/setup_env.sh
9578
- ci/submit_cython_cache.sh
9679
- echo "install done"
9780

9881
before_script:
99-
- ci/install_db_travis.sh
82+
# display server (for clipboard functionality) needs to be started here,
83+
# does not work if done in install:setup_env.sh (GH-26103)
10084
- export DISPLAY=":99.0"
101-
- ci/before_script_travis.sh
85+
- echo "sh -e /etc/init.d/xvfb start"
86+
- sh -e /etc/init.d/xvfb start
87+
- sleep 3
10288

10389
script:
10490
- echo "script start"
10591
- source activate pandas-dev
106-
- ci/build_docs.sh
10792
- ci/run_tests.sh
10893

10994
after_script:
11095
- echo "after_script start"
11196
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
112-
- if [ -e test-data-single.xml ]; then
113-
ci/print_skipped.py test-data-single.xml;
114-
fi
115-
- if [ -e test-data-multiple.xml ]; then
116-
ci/print_skipped.py test-data-multiple.xml;
117-
fi
97+
- ci/print_skipped.py
11898
- echo "after_script done"

LICENSES/HAVEN_LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
YEAR: 2013-2016
2+
COPYRIGHT HOLDER: Hadley Wickham; RStudio; and Evan Miller

LICENSES/HAVEN_MIT

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Based on http://opensource.org/licenses/MIT
2+
3+
This is a template. Complete and ship as file LICENSE the following 2
4+
lines (only)
5+
6+
YEAR:
7+
COPYRIGHT HOLDER:
8+
9+
and specify as
10+
11+
License: MIT + file LICENSE
12+
13+
Copyright (c) <YEAR>, <COPYRIGHT HOLDER>
14+
15+
Permission is hereby granted, free of charge, to any person obtaining
16+
a copy of this software and associated documentation files (the
17+
"Software"), to deal in the Software without restriction, including
18+
without limitation the rights to use, copy, modify, merge, publish,
19+
distribute, sublicense, and/or sell copies of the Software, and to
20+
permit persons to whom the Software is furnished to do so, subject to
21+
the following conditions:
22+
23+
The above copyright notice and this permission notice shall be
24+
included in all copies or substantial portions of the Software.
25+
26+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

LICENSES/SIX

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

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
tseries: pandas/_libs/lib.pyx pandas/_libs/tslib.pyx pandas/_libs/hashtable.pyx
2-
python setup.py build_ext --inplace
1+
.PHONY : develop build clean clean_pyc doc lint-diff black
32

4-
.PHONY : develop build clean clean_pyc tseries doc
3+
all: develop
54

65
clean:
76
-python setup.py clean
@@ -15,12 +14,14 @@ build: clean_pyc
1514
lint-diff:
1615
git diff upstream/master --name-only -- "*.py" | xargs flake8
1716

17+
black:
18+
black . --exclude '(asv_bench/env|\.egg|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist|setup.py)'
19+
1820
develop: build
19-
-python setup.py develop
21+
python setup.py develop
2022

2123
doc:
2224
-rm -rf doc/build doc/source/generated
2325
cd doc; \
2426
python make.py clean; \
2527
python make.py html
26-
python make.py spellcheck

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
<td>Package Status</td>
2727
<td>
2828
<a href="https://pypi.org/project/pandas/">
29-
<img src="https://img.shields.io/pypi/status/pandas.svg" alt="status" /></td>
29+
<img src="https://img.shields.io/pypi/status/pandas.svg" alt="status" />
3030
</a>
31+
</td>
3132
</tr>
3233
<tr>
3334
<td>License</td>
@@ -73,8 +74,8 @@
7374
<td>Gitter</td>
7475
<td>
7576
<a href="https://gitter.im/pydata/pandas">
76-
<img src="https://badges.gitter.im/Join%20Chat.svg"
77-
</a>
77+
<img src="https://badges.gitter.im/Join%20Chat.svg" />
78+
</a>
7879
</td>
7980
</tr>
8081
</table>
@@ -163,9 +164,9 @@ pip install pandas
163164
```
164165

165166
## Dependencies
166-
- [NumPy](https://www.numpy.org): 1.12.0 or higher
167+
- [NumPy](https://www.numpy.org): 1.13.3 or higher
167168
- [python-dateutil](https://labix.org/python-dateutil): 2.5.0 or higher
168-
- [pytz](https://pythonhosted.org/pytz): 2011k or higher
169+
- [pytz](https://pythonhosted.org/pytz): 2015.4 or higher
169170

170171
See the [full installation instructions](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies)
171172
for recommended and optional dependencies.
@@ -223,7 +224,7 @@ Most development discussion is taking place on github in this repo. Further, the
223224

224225
All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.
225226

226-
A detailed overview on how to contribute can be found in the **[contributing guide](https://pandas-docs.github.io/pandas-docs-travis/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
227+
A detailed overview on how to contribute can be found in the **[contributing guide](https://dev.pandas.io/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
227228

228229
If you are simply looking to start working with the pandas codebase, navigate to the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) and start looking through interesting issues. There are a number of issues listed under [Docs](https://github.com/pandas-dev/pandas/issues?labels=Docs&sort=updated&state=open) and [good first issue](https://github.com/pandas-dev/pandas/issues?labels=good+first+issue&sort=updated&state=open) where you could start out.
229230

asv_bench/asv.conf.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
// `asv` will cache wheels of the recent builds in each
108108
// environment, making them faster to install next time. This is
109109
// number of builds to keep, per environment.
110-
"wheel_cache_size": 8,
110+
"build_cache_size": 8,
111111

112112
// The commits after which the regression search in `asv publish`
113113
// should start looking for regressions. Dictionary whose keys are
@@ -118,9 +118,8 @@
118118
// skipped for the matching benchmark.
119119
//
120120
"regressions_first_commits": {
121-
".*": "v0.20.0"
121+
".*": "0409521665"
122122
},
123123
"regression_thresholds": {
124-
".*": 0.05
125124
}
126125
}

asv_bench/benchmarks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Pandas benchmarks."""

0 commit comments

Comments
 (0)