Skip to content

Commit 3da5726

Browse files
Merge remote-tracking branch 'upstream/master' into pandas-devgh-27081
2 parents fc3d2c2 + 3912a38 commit 3da5726

File tree

1,146 files changed

+96176
-54526
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,146 files changed

+96176
-54526
lines changed

.devcontainer.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
2+
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/python-3-miniconda
3+
{
4+
"name": "pandas",
5+
"context": ".",
6+
"dockerFile": "Dockerfile",
7+
8+
// Use 'settings' to set *default* container specific settings.json values on container create.
9+
// You can edit these settings after create using File > Preferences > Settings > Remote.
10+
"settings": {
11+
"terminal.integrated.shell.linux": "/bin/bash",
12+
"python.condaPath": "/opt/conda/bin/conda",
13+
"python.pythonPath": "/opt/conda/bin/python",
14+
"python.formatting.provider": "black",
15+
"python.linting.enabled": true,
16+
"python.linting.flake8Enabled": true,
17+
"python.linting.pylintEnabled": false,
18+
"python.linting.mypyEnabled": true,
19+
"python.testing.pytestEnabled": true,
20+
"python.testing.cwd": "pandas/tests"
21+
},
22+
23+
// Add the IDs of extensions you want installed when the container is created in the array below.
24+
"extensions": [
25+
"ms-python.python",
26+
"ms-vscode.cpptools"
27+
]
28+
}

.github/CODE_OF_CONDUCT.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ incident.
5454

5555
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
5656
version 1.3.0, available at
57-
[http://contributor-covenant.org/version/1/3/0/][version],
57+
[https://www.contributor-covenant.org/version/1/3/0/][version],
5858
and the [Swift Code of Conduct][swift].
5959

60-
[homepage]: http://contributor-covenant.org
61-
[version]: http://contributor-covenant.org/version/1/3/0/
60+
[homepage]: https://www.contributor-covenant.org
61+
[version]: https://www.contributor-covenant.org/version/1/3/0/
6262
[swift]: https://swift.org/community/#code-of-conduct
6363

.github/CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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/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.
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.pydata.org/docs/dev/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

@@ -16,7 +16,7 @@ If you notice a bug in the code or documentation, or have suggestions for how we
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/development/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](https://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

2121
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

.github/ISSUE_TEMPLATE.md

-29
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
3+
name: Bug Report
4+
about: Create a bug report to help us improve pandas
5+
title: "BUG:"
6+
labels: "Bug, Needs Triage"
7+
8+
---
9+
10+
- [ ] I have checked that this issue has not already been reported.
11+
12+
- [ ] I have confirmed this bug exists on the latest version of pandas.
13+
14+
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
15+
16+
---
17+
18+
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
19+
20+
#### Code Sample, a copy-pastable example
21+
22+
```python
23+
# Your code here
24+
25+
```
26+
27+
#### Problem description
28+
29+
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
30+
31+
#### Expected Output
32+
33+
#### Output of ``pd.show_versions()``
34+
35+
<details>
36+
37+
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
38+
39+
</details>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
3+
name: Documentation Improvement
4+
about: Report wrong or missing documentation
5+
title: "DOC:"
6+
labels: "Docs, Needs Triage"
7+
8+
---
9+
10+
#### Location of the documentation
11+
12+
[this should provide the location of the documentation, e.g. "pandas.read_csv" or the URL of the documentation, e.g. "https://dev.pandas.io/docs/reference/api/pandas.read_csv.html"]
13+
14+
**Note**: You can check the latest versions of the docs on `master` [here](https://pandas.pydata.org/docs/dev/).
15+
16+
#### Documentation problem
17+
18+
[this should provide a description of what documentation you believe needs to be fixed/improved]
19+
20+
#### Suggested fix for documentation
21+
22+
[this should explain the suggested fix and **why** it's better than the existing documentation]
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
3+
name: Feature Request
4+
about: Suggest an idea for pandas
5+
title: "ENH:"
6+
labels: "Enhancement, Needs Triage"
7+
8+
---
9+
10+
#### Is your feature request related to a problem?
11+
12+
[this should provide a description of what the problem is, e.g. "I wish I could use pandas to do [...]"]
13+
14+
#### Describe the solution you'd like
15+
16+
[this should provide a description of the feature request, e.g. "`DataFrame.foo` should get a new parameter `bar` that [...]", try to write a docstring for the desired feature]
17+
18+
#### API breaking implications
19+
20+
[this should provide a description of how this feature will affect the API]
21+
22+
#### Describe alternatives you've considered
23+
24+
[this should provide a description of any alternative solutions or features you've considered]
25+
26+
#### Additional context
27+
28+
[add any other context, code examples, or references to existing implementations about the feature request here]
29+
30+
```python
31+
# Your code here, if applicable
32+
33+
```
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
3+
name: Submit Question
4+
about: Ask a general question about pandas
5+
title: "QST:"
6+
labels: "Usage Question, Needs Triage"
7+
8+
---
9+
10+
- [ ] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions.
11+
12+
- [ ] I have asked my usage related question on [StackOverflow](https://stackoverflow.com).
13+
14+
---
15+
16+
#### Question about pandas
17+
18+
**Note**: If you'd still like to submit a question, please read [this guide](
19+
https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your question.
20+
21+
```python
22+
# Your code here, if applicable
23+
24+
```

.github/workflows/assign.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ jobs:
77
one:
88
runs-on: ubuntu-latest
99
steps:
10-
- name:
11-
run: |
12-
if [[ "${{ github.event.comment.body }}" == "take" ]]; then
13-
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
14-
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
15-
fi
10+
- if: github.event.comment.body == 'take'
11+
name:
12+
run: |
13+
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
14+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees

.github/workflows/ci.yml

+9-26
Original file line numberDiff line numberDiff line change
@@ -125,35 +125,18 @@ jobs:
125125
- name: Check ipython directive errors
126126
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
127127

128-
- name: Merge website and docs
128+
- name: Install ssh key
129129
run: |
130-
mkdir -p pandas_web/docs
131-
cp -r web/build/* pandas_web/
132-
cp -r doc/build/html/* pandas_web/docs/
130+
mkdir -m 700 -p ~/.ssh
131+
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
132+
chmod 600 ~/.ssh/id_rsa
133+
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
133134
if: github.event_name == 'push'
134135

135-
- name: Install Rclone
136-
run: sudo apt install rclone -y
136+
- name: Upload web
137+
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' --exclude='Pandas_Cheat_Sheet*' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
137138
if: github.event_name == 'push'
138139

139-
- name: Set up Rclone
140-
run: |
141-
RCLONE_CONFIG_PATH=$HOME/.config/rclone/rclone.conf
142-
mkdir -p `dirname $RCLONE_CONFIG_PATH`
143-
echo "[ovh_cloud_pandas_web]" > $RCLONE_CONFIG_PATH
144-
echo "type = swift" >> $RCLONE_CONFIG_PATH
145-
echo "env_auth = false" >> $RCLONE_CONFIG_PATH
146-
echo "auth_version = 3" >> $RCLONE_CONFIG_PATH
147-
echo "auth = https://auth.cloud.ovh.net/v3/" >> $RCLONE_CONFIG_PATH
148-
echo "endpoint_type = public" >> $RCLONE_CONFIG_PATH
149-
echo "tenant_domain = default" >> $RCLONE_CONFIG_PATH
150-
echo "tenant = 2977553886518025" >> $RCLONE_CONFIG_PATH
151-
echo "domain = default" >> $RCLONE_CONFIG_PATH
152-
echo "user = w4KGs3pmDxpd" >> $RCLONE_CONFIG_PATH
153-
echo "key = ${{ secrets.ovh_object_store_key }}" >> $RCLONE_CONFIG_PATH
154-
echo "region = BHS" >> $RCLONE_CONFIG_PATH
155-
if: github.event_name == 'push'
156-
157-
- name: Sync web
158-
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
140+
- name: Upload dev docs
141+
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
159142
if: github.event_name == 'push'

.pre-commit-config.yaml

+21-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ repos:
1010
- id: flake8
1111
language: python_venv
1212
additional_dependencies: [flake8-comprehensions>=3.1.0]
13+
- id: flake8
14+
name: flake8-pyx
15+
language: python_venv
16+
files: \.(pyx|pxd)$
17+
types:
18+
- file
19+
args: [--append-config=flake8/cython.cfg]
20+
- id: flake8
21+
name: flake8-pxd
22+
language: python_venv
23+
files: \.pxi\.in$
24+
types:
25+
- file
26+
args: [--append-config=flake8/cython-template.cfg]
1327
- repo: https://github.com/pre-commit/mirrors-isort
1428
rev: v4.3.21
1529
hooks:
@@ -20,11 +34,11 @@ repos:
2034
rev: v0.730
2135
hooks:
2236
- id: mypy
23-
# We run mypy over all files because of:
24-
# * changes in type definitions may affect non-touched files.
25-
# * Running it with `mypy pandas` and the filenames will lead to
26-
# spurious duplicate module errors,
27-
# see also https://github.com/pre-commit/mirrors-mypy/issues/5
28-
pass_filenames: false
2937
args:
30-
- pandas
38+
# As long as a some files are excluded from check-untyped-defs
39+
# we have to exclude it from the pre-commit hook as the configuration
40+
# is based on modules but the hook runs on files.
41+
- --no-check-untyped-defs
42+
- --follow-imports
43+
- skip
44+
files: pandas/

.travis.yml

+16-17
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ python: 3.7
77
# travis cache --delete inside the project directory from the travis command line client
88
# The cache directories will be deleted if anything in ci/ changes in a commit
99
cache:
10-
ccache: true
11-
directories:
12-
- $HOME/.cache # cython cache
13-
- $HOME/.ccache # compiler cache
10+
ccache: true
11+
directories:
12+
- $HOME/.cache # cython cache
13+
- $HOME/.ccache # compiler cache
1414

1515
env:
1616
global:
@@ -20,30 +20,30 @@ env:
2020
- secure: "EkWLZhbrp/mXJOx38CHjs7BnjXafsqHtwxPQrqWy457VDFWhIY1DMnIR/lOWG+a20Qv52sCsFtiZEmMfUjf0pLGXOqurdxbYBGJ7/ikFLk9yV2rDwiArUlVM9bWFnFxHvdz9zewBH55WurrY4ShZWyV+x2dWjjceWG5VpWeI6sA="
2121

2222
git:
23-
# for cloning
24-
depth: false
23+
# for cloning
24+
depth: false
2525

2626
matrix:
27-
fast_finish: true
28-
exclude:
29-
# Exclude the default Python 3.5 build
30-
- python: 3.5
27+
fast_finish: true
3128

32-
include:
29+
include:
3330
- env:
34-
- JOB="3.8" ENV_FILE="ci/deps/travis-38.yaml" PATTERN="(not slow and not network)"
31+
- JOB="3.8" ENV_FILE="ci/deps/travis-38.yaml" PATTERN="(not slow and not network and not clipboard)"
3532

3633
- env:
37-
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network)"
34+
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network and not clipboard)"
3835

3936
- env:
40-
- 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" SQL="1"
37+
- JOB="3.6, locale" ENV_FILE="ci/deps/travis-36-locale.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" SQL="1"
4138
services:
4239
- mysql
4340
- postgresql
4441

4542
- env:
46-
- 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 SQL="1"
43+
# Enabling Deprecations when running tests
44+
# PANDAS_TESTING_MODE="deprecate" causes DeprecationWarning messages to be displayed in the logs
45+
# See pandas/_testing.py for more details.
46+
- JOB="3.6, coverage" ENV_FILE="ci/deps/travis-36-cov.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true SQL="1"
4747
services:
4848
- mysql
4949
- postgresql
@@ -73,7 +73,6 @@ before_install:
7373
# This overrides travis and tells it to look nowhere.
7474
- export BOTO_CONFIG=/dev/null
7575

76-
7776
install:
7877
- echo "install start"
7978
- ci/prep_cython_cache.sh
@@ -90,5 +89,5 @@ script:
9089
after_script:
9190
- echo "after_script start"
9291
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
93-
- ci/print_skipped.py
92+
- ci/print_skipped.py
9493
- echo "after_script done"

AUTHORS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ About the Copyright Holders
1414
The PyData Development Team is the collection of developers of the PyData
1515
project. This includes all of the PyData sub-projects, including pandas. The
1616
core team that coordinates development on GitHub can be found here:
17-
http://github.com/pydata.
17+
https://github.com/pydata.
1818

1919
Full credits for pandas contributors can be found in the documentation.
2020

0 commit comments

Comments
 (0)