Skip to content

Commit 1d5102c

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into multiindex_union
� Conflicts: � pandas/_libs/lib.pyx � pandas/tests/indexes/multi/test_setops.py � pandas/tests/libs/test_lib.py
2 parents 661f015 + 9373dbe commit 1d5102c

File tree

1,245 files changed

+77839
-48329
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,245 files changed

+77839
-48329
lines changed

.github/ISSUE_TEMPLATE/documentation_improvement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ labels: "Docs, Needs Triage"
99

1010
#### Location of the documentation
1111

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"]
12+
[this should provide the location of the documentation, e.g. "pandas.read_csv" or the URL of the documentation, e.g. "https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html"]
1313

1414
**Note**: You can check the latest versions of the docs on `master` [here](https://pandas.pydata.org/docs/dev/).
1515

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: 64 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,74 @@ name: CI
22

33
on:
44
push:
5-
branches: master
5+
branches: [master]
66
pull_request:
77
branches:
88
- master
99
- 1.2.x
1010

1111
env:
1212
ENV_FILE: environment.yml
13+
PANDAS_CI: 1
1314

1415
jobs:
1516
checks:
1617
name: Checks
1718
runs-on: ubuntu-latest
18-
steps:
19-
20-
- name: Setting conda path
21-
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
19+
defaults:
20+
run:
21+
shell: bash -l {0}
2222

23+
steps:
2324
- name: Checkout
2425
uses: actions/checkout@v1
2526

2627
- name: Looking for unwanted patterns
2728
run: ci/code_checks.sh patterns
2829
if: always()
2930

30-
- name: Setup environment and build pandas
31-
run: ci/setup_env.sh
32-
if: always()
31+
- name: Cache conda
32+
uses: actions/cache@v2
33+
with:
34+
path: ~/conda_pkgs_dir
35+
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
36+
37+
- uses: conda-incubator/setup-miniconda@v2
38+
with:
39+
activate-environment: pandas-dev
40+
channel-priority: strict
41+
environment-file: ${{ env.ENV_FILE }}
42+
use-only-tar-bz2: true
43+
44+
- name: Build Pandas
45+
uses: ./.github/actions/build_pandas
3346

3447
- name: Linting
35-
run: |
36-
source activate pandas-dev
37-
ci/code_checks.sh lint
48+
run: ci/code_checks.sh lint
3849
if: always()
3950

4051
- name: Checks on imported code
41-
run: |
42-
source activate pandas-dev
43-
ci/code_checks.sh code
52+
run: ci/code_checks.sh code
4453
if: always()
4554

4655
- name: Running doctests
47-
run: |
48-
source activate pandas-dev
49-
ci/code_checks.sh doctests
56+
run: ci/code_checks.sh doctests
5057
if: always()
5158

5259
- name: Docstring validation
53-
run: |
54-
source activate pandas-dev
55-
ci/code_checks.sh docstrings
60+
run: ci/code_checks.sh docstrings
5661
if: always()
5762

5863
- name: Typing validation
59-
run: |
60-
source activate pandas-dev
61-
ci/code_checks.sh typing
64+
run: ci/code_checks.sh typing
6265
if: always()
6366

6467
- name: Testing docstring validation script
65-
run: |
66-
source activate pandas-dev
67-
pytest --capture=no --strict-markers scripts
68+
run: pytest --capture=no --strict-markers scripts
6869
if: always()
6970

7071
- name: Running benchmarks
7172
run: |
72-
source activate pandas-dev
7373
cd asv_bench
7474
asv check -E existing
7575
git remote add upstream https://github.com/pandas-dev/pandas.git
@@ -93,20 +93,16 @@ jobs:
9393
runs-on: ubuntu-latest
9494
steps:
9595

96-
- name: Setting conda path
97-
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
98-
9996
- name: Checkout
10097
uses: actions/checkout@v1
10198

102-
- name: Setup environment and build pandas
103-
run: ci/setup_env.sh
99+
- name: Set up pandas
100+
uses: ./.github/actions/setup
104101

105102
- name: Build website
106103
run: |
107104
source activate pandas-dev
108105
python web/pandas_web.py web/pandas --target-path=web/build
109-
110106
- name: Build documentation
111107
run: |
112108
source activate pandas-dev
@@ -132,3 +128,38 @@ jobs:
132128
- name: Upload dev docs
133129
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
134130
if: github.event_name == 'push'
131+
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+
141+
data_manager:
142+
name: Test experimental data manager
143+
runs-on: ubuntu-latest
144+
strategy:
145+
matrix:
146+
pattern: ["not slow and not network and not clipboard", "slow"]
147+
steps:
148+
149+
- name: Checkout
150+
uses: actions/checkout@v1
151+
152+
- name: Set up pandas
153+
uses: ./.github/actions/setup
154+
155+
- name: Run tests
156+
env:
157+
PANDAS_DATA_MANAGER: array
158+
PATTERN: ${{ matrix.pattern }}
159+
PYTEST_WORKERS: "auto"
160+
run: |
161+
source activate pandas-dev
162+
ci/run_tests.sh
163+
164+
- name: Print skipped tests
165+
run: python ci/print_skipped.py

.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: 15 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@ env:
1212
PYTEST_WORKERS: "auto"
1313
PANDAS_CI: 1
1414
PATTERN: ((not slow and not network and not clipboard) or (single and db))
15+
COVERAGE: true
1516

1617
jobs:
17-
Linux_py37_locale:
18+
Linux_py37_IO:
1819
runs-on: ubuntu-latest
1920
defaults:
2021
run:
2122
shell: bash -l {0}
2223

23-
env:
24-
ENV_FILE: ci/deps/actions-37-locale.yaml
25-
LOCALE_OVERRIDE: zh_CN.UTF-8
24+
strategy:
25+
matrix:
26+
ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml]
27+
fail-fast: false
2628

2729
services:
2830
mysql:
@@ -63,27 +65,20 @@ jobs:
6365
with:
6466
path: ~/conda_pkgs_dir
6567
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
66-
hashFiles('${{ env.ENV_FILE }}') }}
68+
hashFiles('${{ matrix.ENV_FILE }}') }}
6769

6870
- uses: conda-incubator/setup-miniconda@v2
6971
with:
7072
activate-environment: pandas-dev
7173
channel-priority: strict
72-
environment-file: ${{ env.ENV_FILE }}
74+
environment-file: ${{ matrix.ENV_FILE }}
7375
use-only-tar-bz2: true
7476

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

8580
- name: Test
86-
run: ci/run_tests.sh
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
8782
if: always()
8883

8984
- name: Build Version
@@ -99,88 +94,9 @@ jobs:
9994
- name: Print skipped tests
10095
run: python ci/print_skipped.py
10196

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
97+
- name: Upload coverage to Codecov
98+
uses: codecov/codecov-action@v1
15599
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
100+
flags: unittests
101+
name: codecov-pandas
102+
fail_ci_if_error: true

0 commit comments

Comments
 (0)