Skip to content

Commit 1517ae3

Browse files
authored
Merge branch 'master' into subplot_groups
2 parents 587cbc1 + 67c9385 commit 1517ae3

File tree

531 files changed

+23692
-14378
lines changed

Some content is hidden

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

531 files changed

+23692
-14378
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
if: always()
6666

6767
- name: Testing docstring validation script
68-
run: pytest --capture=no --strict-markers scripts
68+
run: pytest scripts
6969
if: always()
7070

7171
- name: Running benchmarks

.github/workflows/database.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
uses: ./.github/actions/build_pandas
7979

8080
- name: Test
81-
run: pytest -m "${{ env.PATTERN }}" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml -s --cov=pandas --cov-report=xml pandas/tests/io
81+
run: pytest -m "${{ env.PATTERN }}" -n 2 --dist=loadfile --cov=pandas --cov-report=xml pandas/tests/io
8282
if: always()
8383

8484
- name: Build Version

.github/workflows/python-dev.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Python Dev
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
name: actions-310-dev
15+
timeout-minutes: 60
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up Python Dev Version
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: '3.10-dev'
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip setuptools wheel
30+
pip install git+https://github.com/numpy/numpy.git
31+
pip install git+https://github.com/pytest-dev/pytest.git
32+
pip install git+https://github.com/nedbat/coveragepy.git
33+
pip install cython python-dateutil pytz hypothesis pytest-xdist
34+
pip list
35+
36+
- name: Build Pandas
37+
run: |
38+
python setup.py build_ext -q -j2
39+
python -m pip install -e . --no-build-isolation --no-use-pep517
40+
41+
- name: Build Version
42+
run: |
43+
python -c "import pandas; pandas.show_versions();"
44+
45+
- name: Test with pytest
46+
run: |
47+
coverage run -m pytest -m 'not slow and not network and not clipboard' pandas
48+
continue-on-error: true
49+
50+
- name: Publish test results
51+
uses: actions/upload-artifact@master
52+
with:
53+
name: Test results
54+
path: test-data.xml
55+
if: failure()
56+
57+
- name: Print skipped tests
58+
run: |
59+
python ci/print_skipped.py
60+
61+
- name: Report Coverage
62+
run: |
63+
coverage report -m
64+
65+
- name: Upload coverage to Codecov
66+
uses: codecov/codecov-action@v1
67+
with:
68+
flags: unittests
69+
name: codecov-pandas
70+
fail_ci_if_error: true

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ asv_bench/env/
104104
asv_bench/html/
105105
asv_bench/results/
106106
asv_bench/pandas/
107+
test-data.xml
107108

108109
# Documentation generated files #
109110
#################################

.pre-commit-config.yaml

+34-118
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
minimum_pre_commit_version: 2.9.2
22
exclude: ^LICENSES/|\.(html|csv|svg)$
3+
ci:
4+
autofix_prs: false
35
repos:
46
- repo: https://github.com/MarcoGorelli/absolufy-imports
57
rev: v0.3.0
@@ -33,10 +35,13 @@ repos:
3335
exclude: ^pandas/_libs/src/(klib|headers)/
3436
args: [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
3537
- repo: https://gitlab.com/pycqa/flake8
36-
rev: 3.9.0
38+
rev: 3.9.1
3739
hooks:
3840
- id: flake8
39-
additional_dependencies: [flake8-comprehensions>=3.1.0, flake8-bugbear>=21.3.2]
41+
additional_dependencies:
42+
- flake8-comprehensions==3.1.0
43+
- flake8-bugbear==21.3.2
44+
- pandas-dev-flaker==0.2.0
4045
- id: flake8
4146
name: flake8 (cython)
4247
types: [cython]
@@ -51,10 +56,10 @@ repos:
5156
hooks:
5257
- id: isort
5358
- repo: https://github.com/asottile/pyupgrade
54-
rev: v2.11.0
59+
rev: v2.12.0
5560
hooks:
5661
- id: pyupgrade
57-
args: [--py37-plus, --keep-runtime-typing]
62+
args: [--py37-plus]
5863
- repo: https://github.com/pre-commit/pygrep-hooks
5964
rev: v1.8.0
6065
hooks:
@@ -69,6 +74,11 @@ repos:
6974
rev: v1.2.2
7075
hooks:
7176
- id: yesqa
77+
additional_dependencies:
78+
- flake8==3.9.1
79+
- flake8-comprehensions==3.1.0
80+
- flake8-bugbear==21.3.2
81+
- pandas-dev-flaker==0.2.0
7282
- repo: local
7383
hooks:
7484
- id: flake8-rst
@@ -79,76 +89,18 @@ repos:
7989
types: [rst]
8090
args: [--filename=*.rst]
8191
additional_dependencies: [flake8-rst==0.7.0, flake8==3.7.9]
82-
- id: frame-or-series-union
83-
name: Check for use of Union[Series, DataFrame] instead of FrameOrSeriesUnion alias
84-
entry: Union\[.*(Series,.*DataFrame|DataFrame,.*Series).*\]
85-
language: pygrep
86-
types: [python]
87-
exclude: ^pandas/_typing\.py$
88-
- id: inconsistent-namespace-usage
89-
name: 'Check for inconsistent use of pandas namespace'
90-
entry: python scripts/check_for_inconsistent_pandas_namespace.py
91-
language: python
92-
types: [python]
93-
- id: incorrect-code-directives
94-
name: Check for incorrect code block or IPython directives
95-
language: pygrep
96-
entry: (\.\. code-block ::|\.\. ipython ::)
97-
types_or: [python, cython, rst]
98-
- id: no-os-remove
99-
name: Check code for instances of os.remove
100-
entry: os\.remove
101-
language: pygrep
102-
types: [python]
103-
files: ^pandas/tests/
104-
exclude: |
105-
(?x)^
106-
pandas/tests/io/excel/test_writers\.py
107-
|pandas/tests/io/pytables/common\.py
108-
|pandas/tests/io/pytables/test_store\.py$
109-
- id: non-standard-imports
110-
name: Check for non-standard imports
111-
language: pygrep
112-
entry: |
113-
(?x)
114-
# Check for imports from pandas.core.common instead of `import pandas.core.common as com`
115-
from\ pandas\.core\.common\ import
116-
|from\ pandas\.core\ import\ common
117-
118-
# Check for imports from collections.abc instead of `from collections import abc`
119-
|from\ collections\.abc\ import
120-
121-
# Numpy
122-
|from\ numpy\ import\ random
123-
|from\ numpy\.random\ import
124-
types: [python]
125-
- id: non-standard-imports-in-tests
126-
name: Check for non-standard imports in test suite
92+
- id: unwanted-patterns
93+
name: Unwanted patterns
12794
language: pygrep
12895
entry: |
12996
(?x)
130-
# Check for imports from pandas._testing instead of `import pandas._testing as tm`
131-
from\ pandas\._testing\ import
132-
|from\ pandas\ import\ _testing\ as\ tm
133-
134-
# No direct imports from conftest
135-
|conftest\ import
136-
|import\ conftest
137-
138-
# Check for use of pandas.testing instead of tm
139-
|pd\.testing\.
97+
# outdated annotation syntax, missing error codes
98+
\#\ type:\ (?!ignore)
99+
|\#\ type:\s?ignore(?!\[)
140100
141-
# Check for pd.api.types instead of from pandas.api.types import ...
142-
|(pd|pandas)\.api\.types\.
143-
types: [python]
144-
files: ^pandas/tests/
145-
- id: np-bool-and-np-object
146-
name: Check for use of np.bool/np.object instead of np.bool_/np.object_
147-
entry: |
148-
(?x)
149-
np\.bool[^_8]
150-
|np\.object[^_8]
151-
language: pygrep
101+
# Incorrect code-block / IPython directives
102+
|\.\.\ code-block\ ::
103+
|\.\.\ ipython\ ::
152104
types_or: [python, cython, rst]
153105
- id: pip-to-conda
154106
name: Generate pip dependency from conda
@@ -158,64 +110,28 @@ repos:
158110
files: ^(environment.yml|requirements-dev.txt)$
159111
pass_filenames: false
160112
additional_dependencies: [pyyaml]
113+
- id: sync-flake8-versions
114+
name: Check flake8 version is synced across flake8, yesqa, and environment.yml
115+
language: python
116+
entry: python scripts/sync_flake8_versions.py
117+
files: ^(\.pre-commit-config\.yaml|environment\.yml)$
118+
pass_filenames: false
119+
additional_dependencies: [pyyaml]
161120
- id: title-capitalization
162121
name: Validate correct capitalization among titles in documentation
163122
entry: python scripts/validate_rst_title_capitalization.py
164123
language: python
165124
types: [rst]
166125
files: ^doc/source/(development|reference)/
167-
- id: type-not-class
168-
name: Check for use of foo.__class__ instead of type(foo)
169-
entry: \.__class__
170-
language: pygrep
171-
types_or: [python, cython]
172-
- id: unwanted-patterns-bare-pytest-raises
173-
name: Check for use of bare pytest raises
174-
language: python
175-
entry: python scripts/validate_unwanted_patterns.py --validation-type="bare_pytest_raises"
176-
types: [python]
177-
files: ^pandas/tests/
178-
exclude: ^pandas/tests/extension/
179-
- id: unwanted-patterns-private-function-across-module
180-
name: Check for use of private functions across modules
181-
language: python
182-
entry: python scripts/validate_unwanted_patterns.py --validation-type="private_function_across_module"
183-
types: [python]
184-
exclude: ^(asv_bench|pandas/tests|doc)/
185-
- id: unwanted-patterns-private-import-across-module
186-
name: Check for import of private attributes across modules
187-
language: python
188-
entry: python scripts/validate_unwanted_patterns.py --validation-type="private_import_across_module"
189-
types: [python]
190-
exclude: ^(asv_bench|pandas/tests|doc)/
191-
- id: unwanted-patterns-pytest-xfail
192-
name: Check for use of pytest.xfail
193-
entry: pytest\.xfail
194-
language: pygrep
195-
types: [python]
196-
files: ^pandas/tests/
197-
- id: unwanted-patterns-strings-to-concatenate
198-
name: Check for use of not concatenated strings
199-
language: python
200-
entry: python scripts/validate_unwanted_patterns.py --validation-type="strings_to_concatenate"
201-
types_or: [python, cython]
202-
- id: unwanted-patterns-strings-with-wrong-placed-whitespace
203-
name: Check for strings with wrong placed spaces
204-
language: python
205-
entry: python scripts/validate_unwanted_patterns.py --validation-type="strings_with_wrong_placed_whitespace"
206-
types_or: [python, cython]
207-
- id: unwanted-typing
208-
name: Check for outdated annotation syntax and missing error codes
209-
entry: |
210-
(?x)
211-
\#\ type:\ (?!ignore)
212-
|\#\ type:\s?ignore(?!\[)
213-
language: pygrep
214-
types: [python]
215126
- id: use-pd_array-in-core
216127
name: Import pandas.array as pd_array in core
217128
language: python
218129
entry: python scripts/use_pd_array_in_core.py
219130
files: ^pandas/core/
220131
exclude: ^pandas/core/api\.py$
221132
types: [python]
133+
- id: no-bool-in-core-generic
134+
name: Use bool_t instead of bool in pandas/core/generic.py
135+
entry: python scripts/no_bool_in_generic.py
136+
language: python
137+
files: ^pandas/core/generic\.py$

.travis.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,11 @@ matrix:
3535
fast_finish: true
3636

3737
include:
38-
- arch: arm64
38+
- arch: arm64-graviton2
39+
virt: lxd
40+
group: edge
3941
env:
40-
- 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)"
41-
42-
allow_failures:
43-
# Moved to allowed_failures 2020-09-29 due to timeouts https://github.com/pandas-dev/pandas/issues/36719
44-
- arch: arm64
45-
env:
46-
- 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)"
47-
42+
- JOB="3.7, arm64" PYTEST_WORKERS="auto" ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard and not arm_slow)"
4843

4944
before_install:
5045
- echo "before_install"

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ BSD 3-Clause License
33
Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
44
All rights reserved.
55

6-
Copyright (c) 2011-2020, Open source contributors.
6+
Copyright (c) 2011-2021, Open source contributors.
77

88
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:

0 commit comments

Comments
 (0)