Skip to content

Commit b373e75

Browse files
Merge branch 'main' into offsets-week-doc
2 parents 4f23831 + 627bc40 commit b373e75

File tree

1,186 files changed

+51758
-46085
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,186 files changed

+51758
-46085
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
test-arm:
55
machine:
66
image: ubuntu-2004:202101-01
7-
resource_class: arm.medium
7+
resource_class: arm.large
88
environment:
99
ENV_FILE: ci/deps/circle-38-arm64.yaml
1010
PYTEST_WORKERS: auto

.circleci/setup_env.sh

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,16 @@
11
#!/bin/bash -e
22

3-
# edit the locale file if needed
4-
if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
5-
echo "Adding locale to the first line of pandas/__init__.py"
6-
rm -f pandas/__init__.pyc
7-
SEDC="3iimport locale\nlocale.setlocale(locale.LC_ALL, '$LC_ALL')\n"
8-
sed -i "$SEDC" pandas/__init__.py
9-
10-
echo "[head -4 pandas/__init__.py]"
11-
head -4 pandas/__init__.py
12-
echo
13-
fi
3+
echo "Install Mambaforge"
4+
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/4.14.0-0/Mambaforge-4.14.0-0-Linux-aarch64.sh"
5+
echo "Downloading $MAMBA_URL"
6+
wget -q $MAMBA_URL -O minimamba.sh
7+
chmod +x minimamba.sh
148

9+
MAMBA_DIR="$HOME/miniconda3"
10+
rm -rf $MAMBA_DIR
11+
./minimamba.sh -b -p $MAMBA_DIR
1512

16-
MINICONDA_DIR=/usr/local/miniconda
17-
if [ -e $MINICONDA_DIR ] && [ "$BITS32" != yes ]; then
18-
echo "Found Miniconda installation at $MINICONDA_DIR"
19-
else
20-
echo "Install Miniconda"
21-
DEFAULT_CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest"
22-
if [[ "$(uname -m)" == 'aarch64' ]]; then
23-
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.10.1-4/Miniforge3-4.10.1-4-Linux-aarch64.sh"
24-
elif [[ "$(uname)" == 'Linux' ]]; then
25-
if [[ "$BITS32" == "yes" ]]; then
26-
CONDA_URL="$DEFAULT_CONDA_URL-Linux-x86.sh"
27-
else
28-
CONDA_URL="$DEFAULT_CONDA_URL-Linux-x86_64.sh"
29-
fi
30-
elif [[ "$(uname)" == 'Darwin' ]]; then
31-
CONDA_URL="$DEFAULT_CONDA_URL-MacOSX-x86_64.sh"
32-
else
33-
echo "OS $(uname) not supported"
34-
exit 1
35-
fi
36-
echo "Downloading $CONDA_URL"
37-
wget -q $CONDA_URL -O miniconda.sh
38-
chmod +x miniconda.sh
39-
40-
MINICONDA_DIR="$HOME/miniconda3"
41-
rm -rf $MINICONDA_DIR
42-
./miniconda.sh -b -p $MINICONDA_DIR
43-
fi
44-
export PATH=$MINICONDA_DIR/bin:$PATH
13+
export PATH=$MAMBA_DIR/bin:$PATH
4514

4615
echo
4716
echo "which conda"
@@ -51,7 +20,7 @@ echo
5120
echo "update conda"
5221
conda config --set ssl_verify false
5322
conda config --set quiet true --set always_yes true --set changeps1 false
54-
conda install -y -c conda-forge -n base 'mamba>=0.21.2' pip setuptools
23+
mamba install -y -c conda-forge -n base pip setuptools
5524

5625
echo "conda info -a"
5726
conda info -a
@@ -70,11 +39,6 @@ time mamba env update -n pandas-dev --file="${ENV_FILE}"
7039
echo "conda list -n pandas-dev"
7140
conda list -n pandas-dev
7241

73-
if [[ "$BITS32" == "yes" ]]; then
74-
# activate 32-bit compiler
75-
export CONDA_BUILD=1
76-
fi
77-
7842
echo "activate pandas-dev"
7943
source activate pandas-dev
8044

@@ -90,15 +54,9 @@ if pip list | grep -q ^pandas; then
9054
pip uninstall -y pandas || true
9155
fi
9256

93-
if [ "$(conda list -f qt --json)" != [] ]; then
94-
echo
95-
echo "remove qt"
96-
echo "causes problems with the clipboard, we use xsel for that"
97-
conda remove qt -y --force || true
98-
fi
99-
10057
echo "Build extensions"
101-
python setup.py build_ext -q -j3
58+
# GH 47305: Parallel build can causes flaky ImportError from pandas/_libs/tslibs
59+
python setup.py build_ext -q -j1
10260

10361
echo "Install pandas"
10462
python -m pip install --no-build-isolation --no-use-pep517 -e .

.devcontainer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// You can edit these settings after create using File > Preferences > Settings > Remote.
1010
"settings": {
1111
"terminal.integrated.shell.linux": "/bin/bash",
12-
"python.condaPath": "/opt/conda/bin/conda",
13-
"python.pythonPath": "/opt/conda/bin/python",
12+
"python.pythonPath": "/usr/local/bin/python",
1413
"python.formatting.provider": "black",
1514
"python.linting.enabled": true,
1615
"python.linting.flake8Enabled": true,

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ body:
6868
attributes:
6969
label: Additional Context
7070
description: >
71-
Please provide any relevant Github issues, code examples or references that help describe and support
71+
Please provide any relevant GitHub issues, code examples or references that help describe and support
7272
the feature request.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
1+
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
22
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
33
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
44
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.

.github/workflows/32-bit-linux.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 1.4.x
7+
- 1.5.x
88
pull_request:
99
branches:
1010
- main
11-
- 1.4.x
11+
- 1.5.x
1212
paths-ignore:
1313
- "doc/**"
1414

@@ -17,7 +17,7 @@ permissions:
1717

1818
jobs:
1919
pytest:
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-22.04
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v3
@@ -38,9 +38,11 @@ jobs:
3838
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
3939
. ~/virtualenvs/pandas-dev/bin/activate && \
4040
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
41-
pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
42-
python setup.py build_ext -q -j2 && \
41+
python -m pip install versioneer[toml] && \
42+
python -m pip install cython numpy python-dateutil pytz pytest>=7.0.0 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.34.2 && \
43+
python setup.py build_ext -q -j1 && \
4344
python -m pip install --no-build-isolation --no-use-pep517 -e . && \
45+
python -m pip list && \
4446
export PANDAS_CI=1 && \
4547
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml"
4648

.github/workflows/assign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
permissions:
1212
issues: write
1313
pull-requests: write
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-22.04
1515
steps:
1616
- if: github.event.comment.body == 'take'
1717
run: |

.github/workflows/asv-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
name: "Run benchmarks"
2222
# TODO: Support more benchmarking options later, against different branches, against self, etc
2323
if: startsWith(github.event.comment.body, '@github-actions benchmark')
24-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-22.04
2525
defaults:
2626
run:
2727
shell: bash -el {0}

.github/workflows/autoupdate-pre-commit-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
pull-requests: write # for technote-space/create-pr-action to create a PR
1616
if: github.repository_owner == 'pandas-dev'
1717
name: Autoupdate pre-commit config
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- name: Set up Python
21-
uses: actions/setup-python@v3
21+
uses: actions/setup-python@v4
2222
- name: Cache multiple paths
2323
uses: actions/cache@v3
2424
with:

.github/workflows/code-checks.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 1.4.x
7+
- 1.5.x
88
pull_request:
99
branches:
1010
- main
11-
- 1.4.x
11+
- 1.5.x
1212

1313
env:
1414
ENV_FILE: environment.yml
@@ -20,7 +20,7 @@ permissions:
2020
jobs:
2121
pre_commit:
2222
name: pre-commit
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-22.04
2424
concurrency:
2525
# https://github.community/t/concurrecy-not-work-for-push/183068/7
2626
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-pre-commit
@@ -30,16 +30,18 @@ jobs:
3030
uses: actions/checkout@v3
3131

3232
- name: Install Python
33-
uses: actions/setup-python@v3
33+
uses: actions/setup-python@v4
3434
with:
35-
python-version: '3.9.7'
35+
python-version: '3.9'
3636

3737
- name: Run pre-commit
3838
uses: pre-commit/[email protected]
39+
with:
40+
extra_args: --verbose --all-files
3941

40-
typing_and_docstring_validation:
41-
name: Docstring and typing validation
42-
runs-on: ubuntu-latest
42+
docstring_typing_manual_hooks:
43+
name: Docstring validation, typing, and other manual pre-commit hooks
44+
runs-on: ubuntu-22.04
4345
defaults:
4446
run:
4547
shell: bash -el {0}
@@ -79,17 +81,21 @@ jobs:
7981
run: ci/code_checks.sh docstrings
8082
if: ${{ steps.build.outcome == 'success' && always() }}
8183

84+
- name: Run check of documentation notebooks
85+
run: ci/code_checks.sh notebooks
86+
if: ${{ steps.build.outcome == 'success' && always() }}
87+
8288
- name: Use existing environment for type checking
8389
run: |
8490
echo $PATH >> $GITHUB_PATH
8591
echo "PYTHONHOME=$PYTHONHOME" >> $GITHUB_ENV
8692
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
8793
if: ${{ steps.build.outcome == 'success' && always() }}
8894

89-
- name: Typing
95+
- name: Typing + pylint
9096
uses: pre-commit/[email protected]
9197
with:
92-
extra_args: --hook-stage manual --all-files
98+
extra_args: --verbose --hook-stage manual --all-files
9399
if: ${{ steps.build.outcome == 'success' && always() }}
94100

95101
- name: Run docstring validation script tests
@@ -98,7 +104,7 @@ jobs:
98104

99105
asv-benchmarks:
100106
name: ASV Benchmarks
101-
runs-on: ubuntu-latest
107+
runs-on: ubuntu-22.04
102108
defaults:
103109
run:
104110
shell: bash -el {0}
@@ -129,7 +135,7 @@ jobs:
129135
130136
build_docker_dev_environment:
131137
name: Build Docker Dev Environment
132-
runs-on: ubuntu-latest
138+
runs-on: ubuntu-22.04
133139
defaults:
134140
run:
135141
shell: bash -el {0}
@@ -151,9 +157,12 @@ jobs:
151157
- name: Build image
152158
run: docker build --pull --no-cache --tag pandas-dev-env .
153159

160+
- name: Show environment
161+
run: docker run --rm pandas-dev-env python -c "import pandas as pd; print(pd.show_versions())"
162+
154163
requirements-dev-text-installable:
155164
name: Test install requirements-dev.txt
156-
runs-on: ubuntu-latest
165+
runs-on: ubuntu-22.04
157166

158167
concurrency:
159168
# https://github.community/t/concurrecy-not-work-for-push/183068/7
@@ -168,7 +177,7 @@ jobs:
168177

169178
- name: Setup Python
170179
id: setup_python
171-
uses: actions/setup-python@v3
180+
uses: actions/setup-python@v4
172181
with:
173182
python-version: '3.8'
174183
cache: 'pip'

.github/workflows/codeql.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ concurrency:
88
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
99
cancel-in-progress: true
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
analyze:
13-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-22.04
1417
permissions:
1518
actions: read
1619
contents: read

0 commit comments

Comments
 (0)