Skip to content

Commit 29dd29a

Browse files
committed
Merge branch 'master' into sort_values
2 parents 8363293 + cf8c7d5 commit 29dd29a

File tree

1,005 files changed

+26494
-17088
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,005 files changed

+26494
-17088
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build pandas
2+
description: Rebuilds the C extensions and installs pandas
3+
runs:
4+
using: composite
5+
steps:
6+
7+
- name: Environment Detail
8+
run: |
9+
conda info
10+
conda list
11+
shell: bash -l {0}
12+
13+
- name: Build Pandas
14+
run: |
15+
python setup.py build_ext -j 2
16+
python -m pip install -e . --no-build-isolation --no-use-pep517
17+
shell: bash -l {0}

.github/actions/setup/action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Set up pandas
2+
description: Runs all the setup steps required to have a built pandas ready to use
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Setting conda path
7+
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
8+
shell: bash -l {0}
9+
10+
- name: Setup environment and build pandas
11+
run: ci/setup_env.sh
12+
shell: bash -l {0}

.github/workflows/ci.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,8 @@ jobs:
4141
environment-file: ${{ env.ENV_FILE }}
4242
use-only-tar-bz2: true
4343

44-
- name: Environment Detail
45-
run: |
46-
conda info
47-
conda list
48-
4944
- name: Build Pandas
50-
run: |
51-
python setup.py build_ext -j 2
52-
python -m pip install -e . --no-build-isolation --no-use-pep517
45+
uses: ./.github/actions/build_pandas
5346

5447
- name: Linting
5548
run: ci/code_checks.sh lint
@@ -100,14 +93,11 @@ jobs:
10093
runs-on: ubuntu-latest
10194
steps:
10295

103-
- name: Setting conda path
104-
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
105-
10696
- name: Checkout
10797
uses: actions/checkout@v1
10898

109-
- name: Setup environment and build pandas
110-
run: ci/setup_env.sh
99+
- name: Set up pandas
100+
uses: ./.github/actions/setup
111101

112102
- name: Build website
113103
run: |
@@ -139,21 +129,41 @@ jobs:
139129
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
140130
if: github.event_name == 'push'
141131

132+
- name: Move docs into site directory
133+
run: mv doc/build/html web/build/docs
134+
- name: Save website as an artifact
135+
uses: actions/upload-artifact@v2
136+
with:
137+
name: website
138+
path: web/build
139+
retention-days: 14
140+
142141
data_manager:
143142
name: Test experimental data manager
144143
runs-on: ubuntu-latest
145144
steps:
146145

147-
- name: Setting conda path
148-
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
149-
150146
- name: Checkout
151147
uses: actions/checkout@v1
152148

153-
- name: Setup environment and build pandas
154-
run: ci/setup_env.sh
149+
- name: Set up pandas
150+
uses: ./.github/actions/setup
155151

156152
- name: Run tests
157153
run: |
158154
source activate pandas-dev
159155
pytest pandas/tests/frame/methods --array-manager
156+
pytest pandas/tests/frame/test_reductions.py --array-manager
157+
pytest pandas/tests/reductions/ --array-manager
158+
pytest pandas/tests/generic/test_generic.py --array-manager
159+
pytest pandas/tests/arithmetic/ --array-manager
160+
pytest pandas/tests/groupby/aggregate/ --array-manager
161+
pytest pandas/tests/reshape/merge --array-manager
162+
163+
# indexing subset (temporary since other tests don't pass yet)
164+
pytest pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_setitem_boolean --array-manager
165+
pytest pandas/tests/frame/indexing/test_where.py --array-manager
166+
pytest pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_setitem_multi_index --array-manager
167+
pytest pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItem::test_setitem_listlike_indexer_duplicate_columns --array-manager
168+
pytest pandas/tests/indexing/multiindex/test_setitem.py::TestMultiIndexSetItem::test_astype_assignment_with_dups --array-manager
169+
pytest pandas/tests/indexing/multiindex/test_setitem.py::TestMultiIndexSetItem::test_frame_setitem_multi_column --array-manager

.github/workflows/comment_bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install-pre-commit
3030
run: python -m pip install --upgrade pre-commit
3131
- name: Run pre-commit
32-
run: pre-commit run --all-files || (exit 0)
32+
run: pre-commit run --from-ref=origin/master --to-ref=HEAD --all-files || (exit 0)
3333
- name: Commit results
3434
run: |
3535
git config user.name "$(git log -1 --pretty=format:%an)"

.github/workflows/database.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,8 @@ jobs:
7272
environment-file: ${{ env.ENV_FILE }}
7373
use-only-tar-bz2: true
7474

75-
- name: Environment Detail
76-
run: |
77-
conda info
78-
conda list
79-
8075
- 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
76+
uses: ./.github/actions/build_pandas
8477

8578
- name: Test
8679
run: ci/run_tests.sh
@@ -158,15 +151,8 @@ jobs:
158151
environment-file: ${{ env.ENV_FILE }}
159152
use-only-tar-bz2: true
160153

161-
- name: Environment Detail
162-
run: |
163-
conda info
164-
conda list
165-
166154
- 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
155+
uses: ./.github/actions/build_pandas
170156

171157
- name: Test
172158
run: ci/run_tests.sh
@@ -184,3 +170,11 @@ jobs:
184170

185171
- name: Print skipped tests
186172
run: python ci/print_skipped.py
173+
174+
- name: Upload coverage to Codecov
175+
uses: codecov/codecov-action@v1
176+
with:
177+
files: /tmp/test_coverage.xml
178+
flags: unittests
179+
name: codecov-pandas
180+
fail_ci_if_error: true

.pre-commit-config.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ repos:
2424
hooks:
2525
- id: isort
2626
- repo: https://github.com/asottile/pyupgrade
27-
rev: v2.7.4
27+
rev: v2.10.0
2828
hooks:
2929
- id: pyupgrade
30-
args: [--py37-plus]
30+
args: [--py37-plus, --keep-runtime-typing]
3131
- repo: https://github.com/pre-commit/pygrep-hooks
32-
rev: v1.7.0
32+
rev: v1.7.1
3333
hooks:
3434
- id: rst-backticks
3535
- id: rst-directive-colons
@@ -127,12 +127,18 @@ repos:
127127
types: [python]
128128
files: ^pandas/tests/
129129
exclude: ^pandas/tests/extension/
130+
- id: unwanted-patters-pytest-xfail
131+
name: Check for use of pytest.xfail
132+
entry: pytest\.xfail
133+
language: pygrep
134+
types: [python]
135+
files: ^pandas/tests/
130136
- id: inconsistent-namespace-usage
131137
name: 'Check for inconsistent use of pandas namespace in tests'
132138
entry: python scripts/check_for_inconsistent_pandas_namespace.py
133139
language: python
134140
types: [python]
135-
files: ^pandas/tests/
141+
files: ^pandas/tests/frame/
136142
- id: FrameOrSeriesUnion
137143
name: Check for use of Union[Series, DataFrame] instead of FrameOrSeriesUnion alias
138144
entry: Union\[.*(Series,.*DataFrame|DataFrame,.*Series).*\]
@@ -157,6 +163,11 @@ repos:
157163
entry: np\.bool[^_8]
158164
language: pygrep
159165
types_or: [python, cython, rst]
166+
- id: np-object
167+
name: Check for use of np.object instead of np.object_
168+
entry: np\.object[^_8]
169+
language: pygrep
170+
types_or: [python, cython, rst]
160171
- id: no-os-remove
161172
name: Check code for instances of os.remove
162173
entry: os\.remove
@@ -174,6 +185,12 @@ repos:
174185
language: pygrep
175186
types: [python]
176187
files: ^pandas/tests/
188+
- id: title-capitalization
189+
name: Validate correct capitalization among titles in documentation
190+
entry: python scripts/validate_rst_title_capitalization.py
191+
language: python
192+
types: [rst]
193+
files: ^doc/source/(development|reference)/
177194
- repo: https://github.com/asottile/yesqa
178195
rev: v1.2.2
179196
hooks:
@@ -192,6 +209,11 @@ repos:
192209
files: ^pandas/
193210
exclude: ^pandas/tests/
194211
- repo: https://github.com/MarcoGorelli/no-string-hints
195-
rev: v0.1.6
212+
rev: v0.1.7
196213
hooks:
197214
- id: no-string-hints
215+
- repo: https://github.com/MarcoGorelli/abs-imports
216+
rev: v0.1.2
217+
hooks:
218+
- id: abs-imports
219+
files: ^pandas/

MANIFEST.in

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
include MANIFEST.in
2-
include LICENSE
31
include RELEASE.md
4-
include README.md
5-
include setup.py
6-
include pyproject.toml
72

83
graft doc
94
prune doc/build
@@ -16,10 +11,12 @@ global-exclude *.bz2
1611
global-exclude *.csv
1712
global-exclude *.dta
1813
global-exclude *.feather
14+
global-exclude *.tar
1915
global-exclude *.gz
2016
global-exclude *.h5
2117
global-exclude *.html
2218
global-exclude *.json
19+
global-exclude *.jsonl
2320
global-exclude *.pickle
2421
global-exclude *.png
2522
global-exclude *.pyc
@@ -40,6 +37,11 @@ global-exclude .DS_Store
4037
global-exclude .git*
4138
global-exclude \#*
4239

40+
# GH 39321
41+
# csv_dir_path fixture checks the existence of the directory
42+
# exclude the whole directory to avoid running related tests in sdist
43+
prune pandas/tests/io/parser/data
44+
4345
include versioneer.py
4446
include pandas/_version.py
4547
include pandas/io/formats/templates/*.tpl

Makefile

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,3 @@ doc:
2525
cd doc; \
2626
python make.py clean; \
2727
python make.py html
28-
29-
check:
30-
python3 scripts/validate_unwanted_patterns.py \
31-
--validation-type="private_function_across_module" \
32-
--included-file-extensions="py" \
33-
--excluded-file-paths=pandas/tests,asv_bench/ \
34-
pandas/
35-
36-
python3 scripts/validate_unwanted_patterns.py \
37-
--validation-type="private_import_across_module" \
38-
--included-file-extensions="py" \
39-
--excluded-file-paths=pandas/tests,asv_bench/,doc/
40-
pandas/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
algos/ directory is intended for individual functions from core.algorithms
3+
4+
In many cases these algorithms are reachable in multiple ways:
5+
algos.foo(x, y)
6+
Series(x).foo(y)
7+
Index(x).foo(y)
8+
pd.array(x).foo(y)
9+
10+
In most cases we profile the Series variant directly, trusting the performance
11+
of the others to be highly correlated.
12+
"""

0 commit comments

Comments
 (0)