Skip to content

Commit 719fa90

Browse files
authored
Merge branch 'main' into gha-win-mac
2 parents 384a52b + d49a244 commit 719fa90

File tree

347 files changed

+9696
-4254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

347 files changed

+9696
-4254
lines changed

.github/actions/build_pandas/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ runs:
2828
- name: Build Version
2929
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
3030
shell: bash -el {0}
31+
env:
32+
# Cannot use parallel compilation on Windows, see https://github.com/pandas-dev/pandas/issues/30873
33+
N_JOBS: ${{ runner.os == 'Windows' && 1 || 2 }}

.github/workflows/code-checks.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,16 @@ jobs:
7474

7575
- name: Install pyright
7676
# note: keep version in sync with .pre-commit-config.yaml
77-
run: npm install -g pyright@1.1.230
77+
run: npm install -g pyright@1.1.245
7878

7979
- name: Build Pandas
8080
id: build
8181
uses: ./.github/actions/build_pandas
8282

83+
- name: Check for no warnings when building single-page docs
84+
run: ci/code_checks.sh single-docs
85+
if: ${{ steps.build.outcome == 'success' }}
86+
8387
- name: Run checks on imported code
8488
run: ci/code_checks.sh code
8589
if: ${{ steps.build.outcome == 'success' }}
@@ -140,22 +144,8 @@ jobs:
140144
- name: Run ASV benchmarks
141145
run: |
142146
cd asv_bench
143-
asv check -E existing
144-
git remote add upstream https://github.com/pandas-dev/pandas.git
145-
git fetch upstream
146147
asv machine --yes
147-
asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
148-
if grep "failed" benchmarks.log > /dev/null ; then
149-
exit 1
150-
fi
151-
if: ${{ steps.build.outcome == 'success' }}
152-
153-
- name: Publish benchmarks artifact
154-
uses: actions/upload-artifact@v3
155-
with:
156-
name: Benchmarks log
157-
path: asv_bench/benchmarks.log
158-
if: failure()
148+
asv run --quick --dry-run --strict --durations=30 --python=same
159149
160150
build_docker_dev_environment:
161151
name: Build Docker Dev Environment

.github/workflows/docbuild-and-upload.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
run: |
3838
source activate pandas-dev
3939
python web/pandas_web.py web/pandas --target-path=web/build
40+
4041
- name: Build documentation
4142
run: |
4243
source activate pandas-dev

.github/workflows/posix.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
pattern: ["not single_cpu", "single_cpu"]
2929
# Don't test pyarrow v2/3: Causes timeouts in read_csv engine
3030
# even if tests are skipped/xfailed
31-
pyarrow_version: ["5", "7"]
31+
pyarrow_version: ["5", "6", "7"]
3232
include:
3333
- name: "Downstream Compat"
3434
env_file: actions-38-downstream_compat.yaml
@@ -61,7 +61,16 @@ jobs:
6161
env_file: actions-310-numpydev.yaml
6262
pattern: "not slow and not network and not single_cpu"
6363
pandas_testing_mode: "deprecate"
64-
test_args: "-W error"
64+
test_args: "-W error::DeprecationWarning:numpy"
65+
exclude:
66+
- env_file: actions-39.yaml
67+
pyarrow_version: "6"
68+
- env_file: actions-39.yaml
69+
pyarrow_version: "7"
70+
- env_file: actions-310.yaml
71+
pyarrow_version: "6"
72+
- env_file: actions-310.yaml
73+
pyarrow_version: "7"
6574
fail-fast: false
6675
name: ${{ matrix.name || format('{0} pyarrow={1} {2}', matrix.env_file, matrix.pyarrow_version, matrix.pattern) }}
6776
env:
@@ -171,10 +180,9 @@ jobs:
171180
run: ci/run_tests.sh
172181
# TODO: Don't continue on error for PyPy
173182
continue-on-error: ${{ env.IS_PYPY == 'true' }}
174-
if: always()
175183

176184
- name: Build Version
177-
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
185+
run: conda list
178186

179187
- name: Publish test results
180188
uses: actions/upload-artifact@v3

.github/workflows/windows.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Windows
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 1.4.x
8+
pull_request:
9+
branches:
10+
- main
11+
- 1.4.x
12+
paths-ignore:
13+
- "doc/**"
14+
15+
env:
16+
PANDAS_CI: 1
17+
PYTEST_TARGET: pandas
18+
PYTEST_WORKERS: auto
19+
PATTERN: "not slow and not db and not network and not single_cpu"
20+
21+
22+
jobs:
23+
pytest:
24+
runs-on: windows-latest
25+
defaults:
26+
run:
27+
shell: bash -el {0}
28+
timeout-minutes: 90
29+
strategy:
30+
matrix:
31+
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
32+
fail-fast: false
33+
concurrency:
34+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
35+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-windows
36+
cancel-in-progress: true
37+
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v3
41+
with:
42+
fetch-depth: 0
43+
44+
- name: Install Dependencies
45+
uses: conda-incubator/setup-miniconda@v2.1.1
46+
with:
47+
mamba-version: "*"
48+
channels: conda-forge
49+
activate-environment: pandas-dev
50+
channel-priority: strict
51+
environment-file: ci/deps/${{ matrix.env_file }}
52+
use-only-tar-bz2: true
53+
54+
- name: Build Pandas
55+
uses: ./.github/actions/build_pandas
56+
57+
- name: Test
58+
run: ci/run_tests.sh
59+
60+
- name: Build Version
61+
run: conda list
62+
63+
- name: Publish test results
64+
uses: actions/upload-artifact@v3
65+
with:
66+
name: Test results
67+
path: test-data.xml
68+
if: failure()
69+
70+
- name: Upload coverage to Codecov
71+
uses: codecov/codecov-action@v2
72+
with:
73+
flags: unittests
74+
name: codecov-pandas
75+
fail_ci_if_error: false

.pre-commit-config.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
types_or: [python, rst, markdown]
2727
files: ^(pandas|doc)/
2828
- repo: https://github.com/pre-commit/pre-commit-hooks
29-
rev: v4.1.0
29+
rev: v4.2.0
3030
hooks:
3131
- id: debug-statements
3232
- id: end-of-file-fixer
@@ -56,7 +56,7 @@ repos:
5656
hooks:
5757
- id: isort
5858
- repo: https://github.com/asottile/pyupgrade
59-
rev: v2.31.1
59+
rev: v2.32.0
6060
hooks:
6161
- id: pyupgrade
6262
args: [--py38-plus]
@@ -70,6 +70,10 @@ repos:
7070
- id: rst-inline-touching-normal
7171
types: [text] # overwrite types: [rst]
7272
types_or: [python, rst]
73+
- repo: https://github.com/sphinx-contrib/sphinx-lint
74+
rev: v0.4.1
75+
hooks:
76+
- id: sphinx-lint
7377
- repo: https://github.com/asottile/yesqa
7478
rev: v1.3.0
7579
hooks:
@@ -85,7 +89,7 @@ repos:
8589
types: [python]
8690
stages: [manual]
8791
# note: keep version in sync with .github/workflows/code-checks.yml
88-
additional_dependencies: ['pyright@1.1.230']
92+
additional_dependencies: ['pyright@1.1.245']
8993
- repo: local
9094
hooks:
9195
- id: flake8-rst
@@ -172,6 +176,13 @@ repos:
172176
files: ^pandas/core/
173177
exclude: ^pandas/core/api\.py$
174178
types: [python]
179+
- id: use-io-common-urlopen
180+
name: Use pandas.io.common.urlopen instead of urllib.request.urlopen
181+
language: python
182+
entry: python scripts/use_io_common_urlopen.py
183+
files: ^pandas/
184+
exclude: ^pandas/tests/
185+
types: [python]
175186
- id: no-bool-in-core-generic
176187
name: Use bool_t instead of bool in pandas/core/generic.py
177188
entry: python scripts/no_bool_in_generic.py

LICENSES/KLIB_LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
The MIT License
2+
3+
Copyright (c) 2008- Attractive Chaos <attractor@live.co.uk>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

LICENSES/OTHER

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
numpydoc license
2-
----------------
3-
4-
The numpydoc license is in pandas/doc/sphinxext/LICENSE.txt
5-
61
Bottleneck license
72
------------------
83

@@ -77,4 +72,4 @@ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
7772
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
7873
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7974
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
80-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
75+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include RELEASE.md
2+
include versioneer.py
23

34
graft doc
45
prune doc/build
@@ -54,9 +55,6 @@ global-exclude *.pxi
5455
# exclude the whole directory to avoid running related tests in sdist
5556
prune pandas/tests/io/parser/data
5657

57-
include versioneer.py
58-
include pandas/_version.py
59-
include pandas/io/formats/templates/*.tpl
60-
58+
# Selectively re-add *.cxx files that were excluded above
6159
graft pandas/_libs/src
6260
graft pandas/_libs/tslibs/src

asv_bench/benchmarks/tslibs/tz_convert.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
try:
1313
old_sig = False
14-
from pandas._libs.tslibs.tzconversion import tz_convert_from_utc
14+
from pandas._libs.tslibs import tz_convert_from_utc
1515
except ImportError:
16-
old_sig = True
17-
from pandas._libs.tslibs.tzconversion import tz_convert as tz_convert_from_utc
16+
try:
17+
old_sig = False
18+
from pandas._libs.tslibs.tzconversion import tz_convert_from_utc
19+
except ImportError:
20+
old_sig = True
21+
from pandas._libs.tslibs.tzconversion import tz_convert as tz_convert_from_utc
1822

1923

2024
class TimeTZConvert:

azure-pipelines.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ jobs:
2727
name: macOS
2828
vmImage: macOS-10.15
2929

30-
- template: ci/azure/windows.yml
31-
parameters:
32-
name: Windows
33-
vmImage: windows-2019
34-
3530
- job: py38_32bit
3631
pool:
3732
vmImage: ubuntu-18.04
@@ -48,6 +43,7 @@ jobs:
4843
pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
4944
python setup.py build_ext -q -j2 && \
5045
python -m pip install --no-build-isolation -e . && \
46+
export PANDAS_CI=1 && \
5147
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml"
5248
displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'
5349

ci/azure/windows.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)