Skip to content

Commit 12df021

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pr/arw2019/to_datetime-inconsistent-parsing
2 parents efd2539 + cc5eba9 commit 12df021

File tree

1,709 files changed

+207738
-130610
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,709 files changed

+207738
-130610
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ and the [Swift Code of Conduct][swift].
6060
[homepage]: https://www.contributor-covenant.org
6161
[version]: https://www.contributor-covenant.org/version/1/3/0/
6262
[swift]: https://swift.org/community/#code-of-conduct
63-

.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

.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
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}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Update pre-commit config"
2+
3+
on:
4+
schedule:
5+
- cron: "0 7 * * 1" # At 07:00 on each Monday.
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-pre-commit:
10+
if: github.repository_owner == 'pandas-dev'
11+
name: Autoupdate pre-commit config
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
- name: Cache multiple paths
17+
uses: actions/cache@v2
18+
with:
19+
path: |
20+
~/.cache/pre-commit
21+
~/.cache/pip
22+
key: pre-commit-autoupdate-${{ runner.os }}-build
23+
- name: Update pre-commit config packages
24+
uses: technote-space/create-pr-action@v2
25+
with:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
EXECUTE_COMMANDS: |
28+
pip install pre-commit
29+
pre-commit autoupdate || (exit 0);
30+
pre-commit run -a || (exit 0);
31+
COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config"
32+
PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}"
33+
PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config"

.github/workflows/ci.yml

Lines changed: 95 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,90 +2,90 @@ name: CI
22

33
on:
44
push:
5-
branches: master
5+
branches:
6+
- master
7+
- 1.3.x
68
pull_request:
7-
branches: master
9+
branches:
10+
- master
11+
- 1.3.x
812

913
env:
1014
ENV_FILE: environment.yml
15+
PANDAS_CI: 1
1116

1217
jobs:
1318
checks:
1419
name: Checks
1520
runs-on: ubuntu-latest
16-
steps:
21+
defaults:
22+
run:
23+
shell: bash -l {0}
1724

18-
- name: Setting conda path
19-
run: echo "::add-path::${HOME}/miniconda3/bin"
25+
concurrency:
26+
group: ${{ github.ref }}-checks
27+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
2028

29+
steps:
2130
- name: Checkout
22-
uses: actions/checkout@v1
31+
uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 0
2334

2435
- name: Looking for unwanted patterns
2536
run: ci/code_checks.sh patterns
2637
if: always()
2738

28-
- name: Setup environment and build pandas
29-
run: ci/setup_env.sh
30-
if: always()
39+
- name: Cache conda
40+
uses: actions/cache@v2
41+
with:
42+
path: ~/conda_pkgs_dir
43+
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
3144

32-
- name: Linting
33-
run: |
34-
source activate pandas-dev
35-
ci/code_checks.sh lint
36-
if: always()
45+
- uses: conda-incubator/setup-miniconda@v2
46+
with:
47+
activate-environment: pandas-dev
48+
channel-priority: strict
49+
environment-file: ${{ env.ENV_FILE }}
50+
use-only-tar-bz2: true
3751

38-
- name: Dependencies consistency
39-
run: |
40-
source activate pandas-dev
41-
ci/code_checks.sh dependencies
52+
- name: Build Pandas
53+
uses: ./.github/actions/build_pandas
54+
55+
- name: Linting
56+
run: ci/code_checks.sh lint
4257
if: always()
4358

4459
- name: Checks on imported code
45-
run: |
46-
source activate pandas-dev
47-
ci/code_checks.sh code
60+
run: ci/code_checks.sh code
4861
if: always()
4962

5063
- name: Running doctests
51-
run: |
52-
source activate pandas-dev
53-
ci/code_checks.sh doctests
64+
run: ci/code_checks.sh doctests
5465
if: always()
5566

5667
- name: Docstring validation
57-
run: |
58-
source activate pandas-dev
59-
ci/code_checks.sh docstrings
68+
run: ci/code_checks.sh docstrings
6069
if: always()
6170

6271
- name: Typing validation
63-
run: |
64-
source activate pandas-dev
65-
ci/code_checks.sh typing
72+
run: ci/code_checks.sh typing
6673
if: always()
6774

6875
- name: Testing docstring validation script
69-
run: |
70-
source activate pandas-dev
71-
pytest --capture=no --strict scripts
76+
run: pytest scripts
7277
if: always()
7378

7479
- name: Running benchmarks
7580
run: |
76-
source activate pandas-dev
7781
cd asv_bench
7882
asv check -E existing
7983
git remote add upstream https://github.com/pandas-dev/pandas.git
8084
git fetch upstream
81-
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
82-
asv machine --yes
83-
asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
84-
if grep "failed" benchmarks.log > /dev/null ; then
85-
exit 1
86-
fi
87-
else
88-
echo "Benchmarks did not run, no changes detected"
85+
asv machine --yes
86+
asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
87+
if grep "failed" benchmarks.log > /dev/null ; then
88+
exit 1
8989
fi
9090
if: always()
9191

@@ -99,22 +99,24 @@ jobs:
9999
web_and_docs:
100100
name: Web and docs
101101
runs-on: ubuntu-latest
102-
steps:
103102

104-
- name: Setting conda path
105-
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"
103+
concurrency:
104+
group: ${{ github.ref }}-web-docs
105+
cancel-in-progress: true
106106

107+
steps:
107108
- name: Checkout
108-
uses: actions/checkout@v1
109+
uses: actions/checkout@v2
110+
with:
111+
fetch-depth: 0
109112

110-
- name: Setup environment and build pandas
111-
run: ci/setup_env.sh
113+
- name: Set up pandas
114+
uses: ./.github/actions/setup
112115

113116
- name: Build website
114117
run: |
115118
source activate pandas-dev
116119
python web/pandas_web.py web/pandas --target-path=web/build
117-
118120
- name: Build documentation
119121
run: |
120122
source activate pandas-dev
@@ -123,20 +125,60 @@ jobs:
123125
# This can be removed when the ipython directive fails when there are errors,
124126
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
125127
- name: Check ipython directive errors
126-
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
128+
run: "! grep -B10 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
127129

128130
- name: Install ssh key
129131
run: |
130132
mkdir -m 700 -p ~/.ssh
131133
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
132134
chmod 600 ~/.ssh/id_rsa
133135
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
134-
if: github.event_name == 'push'
136+
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
135137

136138
- name: Upload web
137139
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' --exclude='Pandas_Cheat_Sheet*' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
138-
if: github.event_name == 'push'
140+
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
139141

140142
- name: Upload dev docs
141143
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
142-
if: github.event_name == 'push'
144+
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
145+
146+
- name: Move docs into site directory
147+
run: mv doc/build/html web/build/docs
148+
- name: Save website as an artifact
149+
uses: actions/upload-artifact@v2
150+
with:
151+
name: website
152+
path: web/build
153+
retention-days: 14
154+
155+
data_manager:
156+
name: Test experimental data manager
157+
runs-on: ubuntu-latest
158+
strategy:
159+
matrix:
160+
pattern: ["not slow and not network and not clipboard", "slow"]
161+
concurrency:
162+
group: ${{ github.ref }}-data_manager-${{ matrix.pattern }}
163+
cancel-in-progress: true
164+
165+
steps:
166+
- name: Checkout
167+
uses: actions/checkout@v2
168+
with:
169+
fetch-depth: 0
170+
171+
- name: Set up pandas
172+
uses: ./.github/actions/setup
173+
174+
- name: Run tests
175+
env:
176+
PANDAS_DATA_MANAGER: array
177+
PATTERN: ${{ matrix.pattern }}
178+
PYTEST_WORKERS: "auto"
179+
run: |
180+
source activate pandas-dev
181+
ci/run_tests.sh
182+
183+
- name: Print skipped tests
184+
run: python ci/print_skipped.py

.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 --from-ref=origin/master --to-ref=HEAD --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 }}

0 commit comments

Comments
 (0)