Skip to content

Commit 2897723

Browse files
authored
Merge pull request #1 from pandas-dev/master
updates pandas
2 parents a214915 + 9dc6de3 commit 2897723

File tree

1,600 files changed

+366234
-260026
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,600 files changed

+366234
-260026
lines changed

.coveragerc

-27
This file was deleted.

.github/CONTRIBUTING.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
Contributing to pandas
2-
======================
1+
# Contributing to pandas
32

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

6-
Our main contribution docs can be found [here](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst), but 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 places in the docs 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.
6+
7+
## Getting Started
78

8-
Getting Started
9-
---------------
109
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.
1110

12-
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 our [Getting Started](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#where-to-start) section of our main contribution doc.
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.
12+
13+
## Filing Issues
14+
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.
1316

14-
Filing Issues
15-
-------------
16-
If you notice a bug in the code or in docs 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 of our main contribution doc.
17+
## Contributing to the Codebase
1718

18-
Contributing to the Codebase
19-
----------------------------
20-
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 our [Working with the code](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#working-with-the-code) section of our main contribution docs.
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.
2120

22-
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 can be found [here](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#test-driven-development-code-writing). We also have guidelines regarding coding style that will be enforced during testing. Details about coding style can be found [here](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#code-standards).
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.
2322

24-
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 of our main contribution docs. 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

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
custom: https://pandas.pydata.org/donate.html
2+
tidelift: pypi/pandas

.github/PULL_REQUEST_TEMPLATE.md

+1
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

.github/SECURITY.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
To report a security vulnerability to pandas, please go to https://tidelift.com/security and see the instructions there.

.gitignore

+14-4
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,19 @@ dist
5757
# wheel files
5858
*.whl
5959
**/wheelhouse/*
60+
pip-wheel-metadata
6061
# coverage
6162
.coverage
6263
coverage.xml
6364
coverage_html_report
65+
.mypy_cache
66+
*.pytest_cache
67+
# hypothesis test database
68+
.hypothesis/
69+
__pycache__
70+
# pytest-monkeytype
71+
monkeytype.sqlite3
72+
6473

6574
# OS generated files #
6675
######################
@@ -88,8 +97,8 @@ scikits
8897
*.c
8998
*.cpp
9099

91-
# Performance Testing #
92-
#######################
100+
# Unit / Performance Testing #
101+
##############################
93102
asv_bench/env/
94103
asv_bench/html/
95104
asv_bench/results/
@@ -98,13 +107,14 @@ asv_bench/pandas/
98107
# Documentation generated files #
99108
#################################
100109
doc/source/generated
110+
doc/source/user_guide/styled.xlsx
111+
doc/source/reference/api
101112
doc/source/_static
102113
doc/source/vbench
103114
doc/source/vbench.rst
104115
doc/source/index.rst
105116
doc/build/html/index.html
106117
# Windows specific leftover:
107118
doc/tmp.sv
108-
doc/source/styled.xlsx
109-
doc/source/templates/
110119
env/
120+
doc/source/savefig/

.pep8speaks.yml

-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,3 @@
22

33
scanner:
44
diff_only: True # If True, errors caused by only the patch are shown
5-
6-
pycodestyle:
7-
max-line-length: 79
8-
ignore: # Errors and warnings to ignore
9-
- E731
10-
- E402

.pre-commit-config.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
additional_dependencies: [flake8-comprehensions]
13+
- repo: https://github.com/pre-commit/mirrors-isort
14+
rev: v4.3.20
15+
hooks:
16+
- id: isort
17+
language: python_venv

.travis.yml

+28-85
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
@@ -23,86 +21,36 @@ env:
2321

2422
git:
2523
# for cloning
26-
depth: 1000
24+
depth: false
2725

2826
matrix:
2927
fast_finish: true
3028
exclude:
3129
# Exclude the default Python 3.5 build
3230
- python: 3.5
31+
3332
include:
34-
- os: osx
35-
language: generic
36-
env:
37-
- JOB="3.5_OSX" TEST_ARGS="--skip-slow --skip-network"
38-
- dist: trusty
39-
env:
40-
- JOB="2.7_LOCALE" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true
41-
addons:
42-
apt:
43-
packages:
44-
- language-pack-zh-hans
45-
- dist: trusty
46-
env:
47-
- JOB="2.7" TEST_ARGS="--skip-slow" LINT=true
48-
addons:
49-
apt:
50-
packages:
51-
- python-gtk2
52-
# In allow_failures
53-
- dist: trusty
54-
env:
55-
- JOB="3.5_CONDA_BUILD_TEST" TEST_ARGS="--skip-slow --skip-network" CONDA_BUILD_TEST=true
56-
- dist: trusty
57-
env:
58-
- JOB="3.6" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" CONDA_FORGE=true COVERAGE=true
59-
# In allow_failures
6033
- dist: trusty
6134
env:
62-
- JOB="2.7_SLOW" SLOW=true
63-
# In allow_failures
64-
- dist: trusty
65-
env:
66-
- JOB="3.6_PIP_BUILD_TEST" TEST_ARGS="--skip-slow" PIP_BUILD_TEST=true
67-
addons:
68-
apt:
69-
packages:
70-
- xsel
71-
# In allow_failures
35+
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network)"
36+
7237
- dist: trusty
7338
env:
74-
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
75-
# In allow_failures
39+
- 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"
40+
7641
- dist: trusty
7742
env:
78-
- JOB="3.6_ASV" ASV=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
44+
7945
# In allow_failures
8046
- dist: trusty
8147
env:
82-
- JOB="3.6_DOC" DOC=true
48+
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
49+
8350
allow_failures:
8451
- dist: trusty
8552
env:
86-
- JOB="3.5_CONDA_BUILD_TEST" TEST_ARGS="--skip-slow --skip-network" CONDA_BUILD_TEST=true
87-
- dist: trusty
88-
env:
89-
- JOB="2.7_SLOW" SLOW=true
90-
- dist: trusty
91-
env:
92-
- JOB="3.6_PIP_BUILD_TEST" TEST_ARGS="--skip-slow" PIP_BUILD_TEST=true
93-
addons:
94-
apt:
95-
packages:
96-
- xsel
97-
- dist: trusty
98-
env:
99-
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
100-
- dist: trusty
101-
env:
102-
- JOB="3.6_ASV" ASV=true
103-
- dist: trusty
104-
env:
105-
- JOB="3.6_DOC" DOC=true
53+
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
10654

10755
before_install:
10856
- echo "before_install"
@@ -115,41 +63,36 @@ before_install:
11563
- pwd
11664
- uname -a
11765
- git --version
118-
- git tag
66+
- ./ci/check_git_tags.sh
67+
# Because travis runs on Google Cloud and has a /etc/boto.cfg,
68+
# it breaks moto import, see:
69+
# https://github.com/spulec/moto/issues/1771
70+
# https://github.com/boto/boto/issues/3741
71+
# This overrides travis and tells it to look nowhere.
72+
- export BOTO_CONFIG=/dev/null
11973

12074
install:
12175
- echo "install start"
12276
- ci/prep_cython_cache.sh
123-
- ci/install_travis.sh
77+
- ci/setup_env.sh
12478
- ci/submit_cython_cache.sh
12579
- echo "install done"
12680

12781
before_script:
128-
- 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)
12984
- export DISPLAY=":99.0"
130-
- 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
13188

13289
script:
13390
- echo "script start"
134-
- ci/run_build_docs.sh
135-
- ci/script_single.sh
136-
- ci/script_multi.sh
137-
- ci/lint.sh
138-
- ci/asv.sh
139-
- echo "checking imports"
140-
- source activate pandas && python ci/check_imports.py
141-
- echo "script done"
142-
143-
after_success:
144-
- ci/upload_coverage.sh
91+
- source activate pandas-dev
92+
- ci/run_tests.sh
14593

14694
after_script:
14795
- echo "after_script start"
148-
- source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
149-
- if [ -e /tmp/single.xml ]; then
150-
ci/print_skipped.py /tmp/single.xml;
151-
fi
152-
- if [ -e /tmp/multiple.xml ]; then
153-
ci/print_skipped.py /tmp/multiple.xml;
154-
fi
96+
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
97+
- ci/print_skipped.py
15598
- echo "after_script done"

LICENSES/DATEUTIL_LICENSE

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Copyright 2017- Paul Ganssle <[email protected]>
2+
Copyright 2017- dateutil contributors (see AUTHORS file)
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
The above license applies to all contributions after 2017-12-01, as well as
17+
all contributions that have been re-licensed (see AUTHORS file for the list of
18+
contributors who have re-licensed their code).
19+
--------------------------------------------------------------------------------
20+
dateutil - Extensions to the standard Python datetime module.
21+
22+
Copyright (c) 2003-2011 - Gustavo Niemeyer <[email protected]>
23+
Copyright (c) 2012-2014 - Tomi Pieviläinen <[email protected]>
24+
Copyright (c) 2014-2016 - Yaron de Leeuw <[email protected]>
25+
Copyright (c) 2015- - Paul Ganssle <[email protected]>
26+
Copyright (c) 2015- - dateutil contributors (see AUTHORS file)
27+
28+
All rights reserved.
29+
30+
Redistribution and use in source and binary forms, with or without
31+
modification, are permitted provided that the following conditions are met:
32+
33+
* Redistributions of source code must retain the above copyright notice,
34+
this list of conditions and the following disclaimer.
35+
* Redistributions in binary form must reproduce the above copyright notice,
36+
this list of conditions and the following disclaimer in the documentation
37+
and/or other materials provided with the distribution.
38+
* Neither the name of the copyright holder nor the names of its
39+
contributors may be used to endorse or promote products derived from
40+
this software without specific prior written permission.
41+
42+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
46+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
47+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
48+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
49+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
50+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
51+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
52+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53+
54+
The above BSD License Applies to all code, even that also covered by Apache 2.0.

LICENSES/HAVEN_LICENSE

+2
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

0 commit comments

Comments
 (0)