Skip to content

Commit 6c4ec55

Browse files
authored
Merge pull request #1 from pandas-dev/master
Update fork
2 parents 1722c05 + 9c4c821 commit 6c4ec55

File tree

1,631 files changed

+184735
-122958
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,631 files changed

+184735
-122958
lines changed

.devcontainer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"python.linting.pylintEnabled": false,
1818
"python.linting.mypyEnabled": true,
1919
"python.testing.pytestEnabled": true,
20-
"python.testing.cwd": "pandas/tests"
20+
"python.testing.pytestArgs": [
21+
"pandas"
22+
]
2123
},
2224

2325
// Add the IDs of extensions you want installed when the container is created in the array below.

.github/CODE_OF_CONDUCT.md

-1
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

+1-1
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

+1-2
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
+17
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

+12
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}
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

+72-49
Original file line numberDiff line numberDiff line change
@@ -2,90 +2,82 @@ 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
33-
run: |
34-
source activate pandas-dev
35-
ci/code_checks.sh lint
36-
if: always()
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
3743

38-
- name: Dependencies consistency
39-
run: |
40-
source activate pandas-dev
41-
ci/code_checks.sh dependencies
44+
- name: Build Pandas
45+
uses: ./.github/actions/build_pandas
46+
47+
- name: Linting
48+
run: ci/code_checks.sh lint
4249
if: always()
4350

4451
- name: Checks on imported code
45-
run: |
46-
source activate pandas-dev
47-
ci/code_checks.sh code
52+
run: ci/code_checks.sh code
4853
if: always()
4954

5055
- name: Running doctests
51-
run: |
52-
source activate pandas-dev
53-
ci/code_checks.sh doctests
56+
run: ci/code_checks.sh doctests
5457
if: always()
5558

5659
- name: Docstring validation
57-
run: |
58-
source activate pandas-dev
59-
ci/code_checks.sh docstrings
60+
run: ci/code_checks.sh docstrings
6061
if: always()
6162

6263
- name: Typing validation
63-
run: |
64-
source activate pandas-dev
65-
ci/code_checks.sh typing
64+
run: ci/code_checks.sh typing
6665
if: always()
6766

6867
- name: Testing docstring validation script
69-
run: |
70-
source activate pandas-dev
71-
pytest --capture=no --strict scripts
68+
run: pytest --capture=no --strict-markers scripts
7269
if: always()
7370

7471
- name: Running benchmarks
7572
run: |
76-
source activate pandas-dev
7773
cd asv_bench
7874
asv check -E existing
7975
git remote add upstream https://github.com/pandas-dev/pandas.git
8076
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"
77+
asv machine --yes
78+
asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
79+
if grep "failed" benchmarks.log > /dev/null ; then
80+
exit 1
8981
fi
9082
if: always()
9183

@@ -101,20 +93,16 @@ jobs:
10193
runs-on: ubuntu-latest
10294
steps:
10395

104-
- name: Setting conda path
105-
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"
106-
10796
- name: Checkout
10897
uses: actions/checkout@v1
10998

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

113102
- name: Build website
114103
run: |
115104
source activate pandas-dev
116105
python web/pandas_web.py web/pandas --target-path=web/build
117-
118106
- name: Build documentation
119107
run: |
120108
source activate pandas-dev
@@ -123,7 +111,7 @@ jobs:
123111
# This can be removed when the ipython directive fails when there are errors,
124112
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
125113
- name: Check ipython directive errors
126-
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
114+
run: "! grep -B10 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
127115

128116
- name: Install ssh key
129117
run: |
@@ -140,3 +128,38 @@ jobs:
140128
- name: Upload dev docs
141129
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
142130
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

+40
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)