Skip to content

Commit 44ff963

Browse files
authored
Merge branch 'master' into add-test-for-describe-2
2 parents 213c99b + 90eff9d commit 44ff963

File tree

1,327 files changed

+119684
-86162
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,327 files changed

+119684
-86162
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/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: 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: 60 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,90 +2,89 @@ name: CI
22

33
on:
44
push:
5-
branches: master
5+
branches: [master]
66
pull_request:
7-
branches: master
7+
branches:
8+
- master
9+
- 1.2.x
810

911
env:
1012
ENV_FILE: environment.yml
13+
PANDAS_CI: 1
1114

1215
jobs:
1316
checks:
1417
name: Checks
1518
runs-on: ubuntu-latest
16-
steps:
17-
18-
- name: Setting conda path
19-
run: echo "::add-path::${HOME}/miniconda3/bin"
19+
defaults:
20+
run:
21+
shell: bash -l {0}
2022

23+
steps:
2124
- name: Checkout
2225
uses: actions/checkout@v1
2326

2427
- name: Looking for unwanted patterns
2528
run: ci/code_checks.sh patterns
2629
if: always()
2730

28-
- name: Setup environment and build pandas
29-
run: ci/setup_env.sh
30-
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 }}') }}
3136

32-
- name: Linting
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: Environment Detail
3345
run: |
34-
source activate pandas-dev
35-
ci/code_checks.sh lint
36-
if: always()
46+
conda info
47+
conda list
3748
38-
- name: Dependencies consistency
49+
- name: Build Pandas
3950
run: |
40-
source activate pandas-dev
41-
ci/code_checks.sh dependencies
51+
python setup.py build_ext -j 2
52+
python -m pip install -e . --no-build-isolation --no-use-pep517
53+
54+
- name: Linting
55+
run: ci/code_checks.sh lint
4256
if: always()
4357

4458
- name: Checks on imported code
45-
run: |
46-
source activate pandas-dev
47-
ci/code_checks.sh code
59+
run: ci/code_checks.sh code
4860
if: always()
4961

5062
- name: Running doctests
51-
run: |
52-
source activate pandas-dev
53-
ci/code_checks.sh doctests
63+
run: ci/code_checks.sh doctests
5464
if: always()
5565

5666
- name: Docstring validation
57-
run: |
58-
source activate pandas-dev
59-
ci/code_checks.sh docstrings
67+
run: ci/code_checks.sh docstrings
6068
if: always()
6169

6270
- name: Typing validation
63-
run: |
64-
source activate pandas-dev
65-
ci/code_checks.sh typing
71+
run: ci/code_checks.sh typing
6672
if: always()
6773

6874
- name: Testing docstring validation script
69-
run: |
70-
source activate pandas-dev
71-
pytest --capture=no --strict scripts
75+
run: pytest --capture=no --strict-markers scripts
7276
if: always()
7377

7478
- name: Running benchmarks
7579
run: |
76-
source activate pandas-dev
7780
cd asv_bench
7881
asv check -E existing
7982
git remote add upstream https://github.com/pandas-dev/pandas.git
8083
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"
84+
asv machine --yes
85+
asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
86+
if grep "failed" benchmarks.log > /dev/null ; then
87+
exit 1
8988
fi
9089
if: always()
9190

@@ -102,7 +101,7 @@ jobs:
102101
steps:
103102

104103
- name: Setting conda path
105-
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"
104+
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
106105

107106
- name: Checkout
108107
uses: actions/checkout@v1
@@ -114,7 +113,6 @@ jobs:
114113
run: |
115114
source activate pandas-dev
116115
python web/pandas_web.py web/pandas --target-path=web/build
117-
118116
- name: Build documentation
119117
run: |
120118
source activate pandas-dev
@@ -123,7 +121,7 @@ jobs:
123121
# This can be removed when the ipython directive fails when there are errors,
124122
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
125123
- name: Check ipython directive errors
126-
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
124+
run: "! grep -B10 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
127125

128126
- name: Install ssh key
129127
run: |
@@ -140,3 +138,22 @@ jobs:
140138
- name: Upload dev docs
141139
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
142140
if: github.event_name == 'push'
141+
142+
data_manager:
143+
name: Test experimental data manager
144+
runs-on: ubuntu-latest
145+
steps:
146+
147+
- name: Setting conda path
148+
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
149+
150+
- name: Checkout
151+
uses: actions/checkout@v1
152+
153+
- name: Setup environment and build pandas
154+
run: ci/setup_env.sh
155+
156+
- name: Run tests
157+
run: |
158+
source activate pandas-dev
159+
pytest pandas/tests/frame/methods --array-manager

.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 }}

0 commit comments

Comments
 (0)