Skip to content

Commit ffce3d5

Browse files
committed
Merge branch 'master' into doc/info
2 parents 53a47cd + 51b04e0 commit ffce3d5

File tree

542 files changed

+23614
-22400
lines changed

Some content is hidden

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

542 files changed

+23614
-22400
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
- [ ] closes #xxxx
22
- [ ] tests added / passed
3-
- [ ] passes `black pandas`
4-
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
3+
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
54
- [ ] whatsnew entry

.github/workflows/autoupdate-pre-commit-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Update pre-commit config packages
2424
uses: technote-space/create-pr-action@v2
2525
with:
26-
GITHUB_TOKEN: ${{ secrets.ACTION_TRIGGER_TOKEN }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
EXECUTE_COMMANDS: |
2828
pip install pre-commit
2929
pre-commit autoupdate || (exit 0);

.github/workflows/comment_bot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Comment-bot
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
- edited
8+
9+
jobs:
10+
autotune:
11+
name: "Fixup pre-commit formatting"
12+
if: startsWith(github.event.comment.body, '@github-actions pre-commit')
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: r-lib/actions/pr-fetch@master
17+
with:
18+
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Cache multiple paths
20+
uses: actions/cache@v2
21+
with:
22+
path: |
23+
~/.cache/pre-commit
24+
~/.cache/pip
25+
key: pre-commit-dispatched-${{ runner.os }}-build
26+
- uses: actions/setup-python@v2
27+
with:
28+
python-version: 3.8
29+
- name: Install-pre-commit
30+
run: python -m pip install --upgrade pre-commit
31+
- name: Run pre-commit
32+
run: pre-commit run --all-files || (exit 0)
33+
- name: Commit results
34+
run: |
35+
git config user.name "$(git log -1 --pretty=format:%an)"
36+
git config user.email "$(git log -1 --pretty=format:%ae)"
37+
git commit -a -m 'Fixes from pre-commit [automated commit]' || echo "No changes to commit"
38+
- uses: r-lib/actions/pr-push@master
39+
with:
40+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/database.yml

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
name: Database
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches:
8+
- master
9+
- 1.2.x
10+
11+
env:
12+
PYTEST_WORKERS: "auto"
13+
PANDAS_CI: 1
14+
PATTERN: ((not slow and not network and not clipboard) or (single and db))
15+
16+
jobs:
17+
Linux_py37_locale:
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
shell: bash -l {0}
22+
23+
env:
24+
ENV_FILE: ci/deps/actions-37-locale.yaml
25+
LOCALE_OVERRIDE: zh_CN.UTF-8
26+
27+
services:
28+
mysql:
29+
image: mysql
30+
env:
31+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
32+
MYSQL_DATABASE: pandas
33+
options: >-
34+
--health-cmd "mysqladmin ping"
35+
--health-interval 10s
36+
--health-timeout 5s
37+
--health-retries 5
38+
ports:
39+
- 3306:3306
40+
41+
postgres:
42+
image: postgres
43+
env:
44+
POSTGRES_USER: postgres
45+
POSTGRES_PASSWORD: postgres
46+
POSTGRES_DB: pandas
47+
options: >-
48+
--health-cmd pg_isready
49+
--health-interval 10s
50+
--health-timeout 5s
51+
--health-retries 5
52+
ports:
53+
- 5432:5432
54+
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v1
58+
59+
- name: Cache conda
60+
uses: actions/cache@v1
61+
env:
62+
CACHE_NUMBER: 0
63+
with:
64+
path: ~/conda_pkgs_dir
65+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
66+
hashFiles('${{ env.ENV_FILE }}') }}
67+
68+
- uses: conda-incubator/setup-miniconda@v2
69+
with:
70+
activate-environment: pandas-dev
71+
channel-priority: strict
72+
environment-file: ${{ env.ENV_FILE }}
73+
use-only-tar-bz2: true
74+
75+
- name: Environment Detail
76+
run: |
77+
conda info
78+
conda list
79+
80+
- name: Build Pandas
81+
run: |
82+
python setup.py build_ext -j 2
83+
python -m pip install -e . --no-build-isolation --no-use-pep517
84+
85+
- name: Test
86+
run: ci/run_tests.sh
87+
if: always()
88+
89+
- name: Build Version
90+
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
91+
92+
- name: Publish test results
93+
uses: actions/upload-artifact@master
94+
with:
95+
name: Test results
96+
path: test-data.xml
97+
if: failure()
98+
99+
- name: Print skipped tests
100+
run: python ci/print_skipped.py
101+
102+
Linux_py37_cov:
103+
runs-on: ubuntu-latest
104+
defaults:
105+
run:
106+
shell: bash -l {0}
107+
108+
env:
109+
ENV_FILE: ci/deps/actions-37-cov.yaml
110+
PANDAS_TESTING_MODE: deprecate
111+
COVERAGE: true
112+
113+
services:
114+
mysql:
115+
image: mysql
116+
env:
117+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
118+
MYSQL_DATABASE: pandas
119+
options: >-
120+
--health-cmd "mysqladmin ping"
121+
--health-interval 10s
122+
--health-timeout 5s
123+
--health-retries 5
124+
ports:
125+
- 3306:3306
126+
127+
postgres:
128+
image: postgres
129+
env:
130+
POSTGRES_USER: postgres
131+
POSTGRES_PASSWORD: postgres
132+
POSTGRES_DB: pandas
133+
options: >-
134+
--health-cmd pg_isready
135+
--health-interval 10s
136+
--health-timeout 5s
137+
--health-retries 5
138+
ports:
139+
- 5432:5432
140+
141+
steps:
142+
- name: Checkout
143+
uses: actions/checkout@v1
144+
145+
- name: Cache conda
146+
uses: actions/cache@v1
147+
env:
148+
CACHE_NUMBER: 0
149+
with:
150+
path: ~/conda_pkgs_dir
151+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
152+
hashFiles('${{ env.ENV_FILE }}') }}
153+
154+
- uses: conda-incubator/setup-miniconda@v2
155+
with:
156+
activate-environment: pandas-dev
157+
channel-priority: strict
158+
environment-file: ${{ env.ENV_FILE }}
159+
use-only-tar-bz2: true
160+
161+
- name: Environment Detail
162+
run: |
163+
conda info
164+
conda list
165+
166+
- name: Build Pandas
167+
run: |
168+
python setup.py build_ext -j 2
169+
python -m pip install -e . --no-build-isolation --no-use-pep517
170+
171+
- name: Test
172+
run: ci/run_tests.sh
173+
if: always()
174+
175+
- name: Build Version
176+
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
177+
178+
- name: Publish test results
179+
uses: actions/upload-artifact@master
180+
with:
181+
name: Test results
182+
path: test-data.xml
183+
if: failure()
184+
185+
- name: Print skipped tests
186+
run: python ci/print_skipped.py

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ asv_bench/pandas/
110110
doc/source/generated
111111
doc/source/user_guide/styled.xlsx
112112
doc/source/reference/api
113-
doc/source/_static
113+
doc/source/_static/*.html
114114
doc/source/vbench
115115
doc/source/vbench.rst
116116
doc/source/index.rst

.pre-commit-config.yaml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
minimum_pre_commit_version: '2.9.2'
1+
minimum_pre_commit_version: 2.9.2
2+
exclude: ^LICENSES/|\.(html|csv|svg)$
23
repos:
34
- repo: https://github.com/python/black
45
rev: 20.8b1
@@ -19,11 +20,9 @@ repos:
1920
types: [text]
2021
args: [--append-config=flake8/cython-template.cfg]
2122
- repo: https://github.com/PyCQA/isort
22-
rev: 5.6.4
23+
rev: 5.7.0
2324
hooks:
2425
- id: isort
25-
types: [text] # overwrite upstream `types: [python]`
26-
types_or: [python, cython]
2726
- repo: https://github.com/asottile/pyupgrade
2827
rev: v2.7.4
2928
hooks:
@@ -89,6 +88,9 @@ repos:
8988
# No direct imports from conftest
9089
conftest\ import|
9190
import\ conftest
91+
92+
# Check for use of pandas.testing instead of tm
93+
pd\.testing\.
9294
types: [python]
9395
files: ^pandas/tests/
9496
- id: incorrect-code-directives
@@ -118,6 +120,13 @@ repos:
118120
entry: python scripts/validate_unwanted_patterns.py --validation-type="private_function_across_module"
119121
types: [python]
120122
exclude: ^(asv_bench|pandas/tests|doc)/
123+
- id: unwanted-patterns-bare-pytest-raises
124+
name: Check for use of bare pytest raises
125+
language: python
126+
entry: python scripts/validate_unwanted_patterns.py --validation-type="bare_pytest_raises"
127+
types: [python]
128+
files: ^pandas/tests/
129+
exclude: ^pandas/tests/extension/
121130
- id: inconsistent-namespace-usage
122131
name: 'Check for inconsistent use of pandas namespace in tests'
123132
entry: python scripts/check_for_inconsistent_pandas_namespace.py
@@ -134,7 +143,7 @@ repos:
134143
name: Check for use of foo.__class__ instead of type(foo)
135144
entry: \.__class__
136145
language: pygrep
137-
files: \.(py|pyx)$
146+
types_or: [python, cython]
138147
- id: unwanted-typing
139148
name: Check for use of comment-based annotation syntax and missing error codes
140149
entry: |
@@ -143,6 +152,11 @@ repos:
143152
\#\ type:\s?ignore(?!\[)
144153
language: pygrep
145154
types: [python]
155+
- id: np-bool
156+
name: Check for use of np.bool instead of np.bool_
157+
entry: np\.bool[^_8]
158+
language: pygrep
159+
types_or: [python, cython, rst]
146160
- id: no-os-remove
147161
name: Check code for instances of os.remove
148162
entry: os\.remove
@@ -159,9 +173,14 @@ repos:
159173
hooks:
160174
- id: yesqa
161175
- repo: https://github.com/pre-commit/pre-commit-hooks
162-
rev: v3.3.0
176+
rev: v3.4.0
163177
hooks:
164178
- id: end-of-file-fixer
165-
exclude: ^LICENSES/|\.(html|csv|txt|svg|py)$
179+
exclude: \.txt$
166180
- id: trailing-whitespace
167-
exclude: \.(html|svg)$
181+
- repo: https://github.com/codespell-project/codespell
182+
rev: v2.0.0
183+
hooks:
184+
- id: codespell
185+
types_or: [python, rst, markdown]
186+
files: ^pandas/core/

.travis.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ services:
1616
# travis cache --delete inside the project directory from the travis command line client
1717
# The cache directories will be deleted if anything in ci/ changes in a commit
1818
cache:
19+
apt: true
1920
ccache: true
2021
directories:
2122
- $HOME/.cache # cython cache
2223

2324
env:
2425
global:
25-
- PYTEST_WORKERS="auto"
2626
# create a github personal access token
2727
# cd pandas-dev/pandas
2828
# travis encrypt 'PANDAS_GH_TOKEN=personal_access_token' -r pandas-dev/pandas
@@ -35,31 +35,10 @@ matrix:
3535
fast_finish: true
3636

3737
include:
38-
- env:
39-
- JOB="3.8, slow" ENV_FILE="ci/deps/travis-38-slow.yaml" PATTERN="slow" SQL="1"
40-
services:
41-
- mysql
42-
- postgresql
43-
44-
- env:
45-
- JOB="3.7, locale" ENV_FILE="ci/deps/travis-37-locale.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" SQL="1"
46-
services:
47-
- mysql
48-
- postgresql
49-
5038
- arch: arm64
5139
env:
5240
- JOB="3.7, arm64" PYTEST_WORKERS=1 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard and not arm_slow)"
5341

54-
- env:
55-
# Enabling Deprecations when running tests
56-
# PANDAS_TESTING_MODE="deprecate" causes DeprecationWarning messages to be displayed in the logs
57-
# See pandas/_testing.py for more details.
58-
- JOB="3.7, coverage" ENV_FILE="ci/deps/travis-37-cov.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true SQL="1"
59-
services:
60-
- mysql
61-
- postgresql
62-
6342
allow_failures:
6443
# Moved to allowed_failures 2020-09-29 due to timeouts https://github.com/pandas-dev/pandas/issues/36719
6544
- arch: arm64

0 commit comments

Comments
 (0)