Skip to content

Commit bee2222

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pandas-dev#30324
2 parents 5010732 + c5f11ab commit bee2222

File tree

1,088 files changed

+77915
-42818
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,088 files changed

+77915
-42818
lines changed

.binstar.yml

-28
This file was deleted.

.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

+1-1
Original file line numberDiff line numberDiff line change
@@ -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/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

+105-10
Original file line numberDiff line numberDiff line change
@@ -23,53 +23,53 @@ jobs:
2323

2424
- name: Looking for unwanted patterns
2525
run: ci/code_checks.sh patterns
26-
if: true
26+
if: always()
2727

2828
- name: Setup environment and build pandas
2929
run: ci/setup_env.sh
30-
if: true
30+
if: always()
3131

3232
- name: Linting
3333
run: |
3434
source activate pandas-dev
3535
ci/code_checks.sh lint
36-
if: true
36+
if: always()
3737

3838
- name: Dependencies consistency
3939
run: |
4040
source activate pandas-dev
4141
ci/code_checks.sh dependencies
42-
if: true
42+
if: always()
4343

4444
- name: Checks on imported code
4545
run: |
4646
source activate pandas-dev
4747
ci/code_checks.sh code
48-
if: true
48+
if: always()
4949

5050
- name: Running doctests
5151
run: |
5252
source activate pandas-dev
5353
ci/code_checks.sh doctests
54-
if: true
54+
if: always()
5555

5656
- name: Docstring validation
5757
run: |
5858
source activate pandas-dev
5959
ci/code_checks.sh docstrings
60-
if: true
60+
if: always()
6161

6262
- name: Typing validation
6363
run: |
6464
source activate pandas-dev
6565
ci/code_checks.sh typing
66-
if: true
66+
if: always()
6767

6868
- name: Testing docstring validation script
6969
run: |
7070
source activate pandas-dev
7171
pytest --capture=no --strict scripts
72-
if: true
72+
if: always()
7373

7474
- name: Running benchmarks
7575
run: |
@@ -87,11 +87,106 @@ jobs:
8787
else
8888
echo "Benchmarks did not run, no changes detected"
8989
fi
90-
if: true
90+
if: always()
9191

9292
- name: Publish benchmarks artifact
9393
uses: actions/upload-artifact@master
9494
with:
9595
name: Benchmarks log
9696
path: asv_bench/benchmarks.log
9797
if: failure()
98+
99+
web_and_docs:
100+
name: Web and docs
101+
runs-on: ubuntu-latest
102+
steps:
103+
104+
- name: Setting conda path
105+
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"
106+
107+
- name: Checkout
108+
uses: actions/checkout@v1
109+
110+
- name: Setup environment and build pandas
111+
run: ci/setup_env.sh
112+
113+
- name: Build website
114+
run: |
115+
source activate pandas-dev
116+
python web/pandas_web.py web/pandas --target-path=web/build
117+
118+
- name: Build documentation
119+
run: |
120+
source activate pandas-dev
121+
doc/make.py --warnings-are-errors | tee sphinx.log ; exit ${PIPESTATUS[0]}
122+
123+
# This can be removed when the ipython directive fails when there are errors,
124+
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
125+
- name: Check ipython directive errors
126+
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
127+
128+
- name: Merge website and docs
129+
run: |
130+
mkdir -p pandas_web/docs
131+
cp -r web/build/* pandas_web/
132+
cp -r doc/build/html/* pandas_web/docs/
133+
if: github.event_name == 'push'
134+
135+
- name: Install Rclone
136+
run: sudo apt install rclone -y
137+
if: github.event_name == 'push'
138+
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 with OVH
158+
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
159+
if: github.event_name == 'push'
160+
161+
- name: Create git repo to upload the built docs to GitHub pages
162+
run: |
163+
cd pandas_web
164+
git init
165+
touch .nojekyll
166+
echo "dev.pandas.io" > CNAME
167+
printf "User-agent: *\nDisallow: /" > robots.txt
168+
git add --all .
169+
git config user.email "[email protected]"
170+
git config user.name "pandas-bot"
171+
git commit -m "pandas web and documentation in master"
172+
if: github.event_name == 'push'
173+
174+
# For this task to work, next steps are required:
175+
# 1. Generate a pair of private/public keys (i.e. `ssh-keygen -t rsa -b 4096 -C "[email protected]"`)
176+
# 2. Go to https://github.com/pandas-dev/pandas/settings/secrets
177+
# 3. Click on "Add a new secret"
178+
# 4. Name: "github_pagas_ssh_key", Value: <Content of the private ssh key>
179+
# 5. The public key needs to be upladed to https://github.com/pandas-dev/pandas-dev.github.io/settings/keys
180+
- name: Install GitHub pages ssh deployment key
181+
uses: shimataro/ssh-key-action@v2
182+
with:
183+
key: ${{ secrets.github_pages_ssh_key }}
184+
known_hosts: 'github.com,192.30.252.128 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
185+
if: github.event_name == 'push'
186+
187+
- name: Publish web and docs to GitHub pages
188+
run: |
189+
cd pandas_web
190+
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git
191+
git push -f origin master || true
192+
if: github.event_name == 'push'

.pre-commit-config.yaml

+27-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,35 @@ 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
14-
rev: v4.3.20
28+
rev: v4.3.21
1529
hooks:
1630
- id: isort
1731
language: python_venv
1832
exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$
33+
- repo: https://github.com/pre-commit/mirrors-mypy
34+
rev: v0.730
35+
hooks:
36+
- id: mypy
37+
args:
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

+17-23
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
language: python
2-
python: 3.5
2+
python: 3.7
33

44
# To turn off cached cython files and compiler cache
55
# set NOCACHE-true
66
# To delete caches go to https://travis-ci.org/OWNER/REPOSITORY/caches or run
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,45 +20,40 @@ 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
5050

51-
# In allow_failures
5251
- env:
5352
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" SQL="1"
5453
services:
5554
- mysql
5655
- postgresql
5756

58-
allow_failures:
59-
- env:
60-
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" SQL="1"
61-
6257
before_install:
6358
- echo "before_install"
6459
# set non-blocking IO on travis
@@ -78,7 +73,6 @@ before_install:
7873
# This overrides travis and tells it to look nowhere.
7974
- export BOTO_CONFIG=/dev/null
8075

81-
8276
install:
8377
- echo "install start"
8478
- ci/prep_cython_cache.sh
@@ -95,5 +89,5 @@ script:
9589
after_script:
9690
- echo "after_script start"
9791
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
98-
- ci/print_skipped.py
92+
- ci/print_skipped.py
9993
- echo "after_script done"

0 commit comments

Comments
 (0)