Skip to content

Commit 75dfb3d

Browse files
committed
Merge remote-tracking branch 'upstream/main' into cmake-build
2 parents b1e6be8 + 4485f15 commit 75dfb3d

File tree

493 files changed

+15477
-4807
lines changed

Some content is hidden

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

493 files changed

+15477
-4807
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Feature Request
2+
description: Suggest an idea for pandas
3+
title: "ENH: "
4+
labels: [Enhancement, Needs Triage]
5+
6+
body:
7+
- type: checkboxes
8+
id: checks
9+
attributes:
10+
label: Feature Type
11+
description: Please check what type of feature request you would like to propose.
12+
options:
13+
- label: >
14+
Adding new functionality to pandas
15+
- label: >
16+
Changing existing functionality in pandas
17+
- label: >
18+
Removing existing functionality in pandas
19+
- type: textarea
20+
id: description
21+
attributes:
22+
label: Problem Description
23+
description: >
24+
Please describe what problem the feature would solve, e.g. "I wish I could use pandas to ..."
25+
placeholder: >
26+
I wish I could use pandas to return a Series from a DataFrame when possible.
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: feature
31+
attributes:
32+
label: Feature Description
33+
description: >
34+
Please describe how the new feature would be implemented, using psudocode if relevant.
35+
placeholder: >
36+
Add a new parameter to DataFrame, to_series, to return a Series if possible.
37+
38+
def __init__(self, ..., to_series: bool=False):
39+
"""
40+
Parameters
41+
----------
42+
...
43+
44+
to_series : bool, default False
45+
Return a Series if possible
46+
"""
47+
if to_series:
48+
return Series(data)
49+
validations:
50+
required: true
51+
- type: textarea
52+
id: alternative
53+
attributes:
54+
label: Alternative Solutions
55+
description: >
56+
Please describe any alternative solution (existing functionality, 3rd party package, etc.)
57+
that would satisfy the feature request.
58+
placeholder: >
59+
Write a custom function to return a Series when possible.
60+
61+
def to_series(...)
62+
result = pd.DataFrame(...)
63+
...
64+
validations:
65+
required: true
66+
- type: textarea
67+
id: context
68+
attributes:
69+
label: Additional Context
70+
description: >
71+
Please provide any relevant Github issues, code examples or references that help describe and support
72+
the feature request.

.github/actions/build_pandas/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ runs:
66

77
- name: Environment Detail
88
run: |
9-
conda info
10-
conda list
9+
micromamba info
10+
micromamba list
1111
shell: bash -el {0}
1212

1313
- name: Build Pandas

.github/actions/setup-conda/action.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ inputs:
66
environment-name:
77
description: Name to use for the Conda environment
88
default: test
9-
python-version:
10-
description: Python version to install
9+
extra-specs:
10+
description: Extra packages to install
1111
required: false
1212
pyarrow-version:
1313
description: If set, overrides the PyArrow version in the Conda environment to the given string.
@@ -24,14 +24,13 @@ runs:
2424
if: ${{ inputs.pyarrow-version }}
2525

2626
- name: Install ${{ inputs.environment-file }}
27-
uses: conda-incubator/[email protected]
27+
uses: mamba-org/provision-with-micromamba@v12
2828
with:
2929
environment-file: ${{ inputs.environment-file }}
30-
activate-environment: ${{ inputs.environment-name }}
31-
python-version: ${{ inputs.python-version }}
32-
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
30+
environment-name: ${{ inputs.environment-name }}
31+
extra-specs: ${{ inputs.extra-specs }}
3332
channels: conda-forge
34-
mamba-version: "0.24"
35-
use-mamba: true
36-
use-only-tar-bz2: true
33+
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
3734
condarc-file: ci/condarc.yml
35+
cache-env: true
36+
cache-downloads: true

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

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
paths-ignore:
1313
- "doc/**"
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
pytest:
1720
runs-on: ubuntu-latest

.github/workflows/assign.yml

+6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ on:
33
issue_comment:
44
types: created
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
issue_assign:
11+
permissions:
12+
issues: write
13+
pull-requests: write
814
runs-on: ubuntu-latest
915
steps:
1016
- if: github.event.comment.body == 'take'

.github/workflows/asv-bot.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ env:
99
ENV_FILE: environment.yml
1010
COMMENT: ${{github.event.comment.body}}
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
autotune:
17+
permissions:
18+
contents: read
19+
issues: write
20+
pull-requests: write
1421
name: "Run benchmarks"
1522
# TODO: Support more benchmarking options later, against different branches, against self, etc
1623
if: startsWith(github.event.comment.body, '@github-actions benchmark')
@@ -33,12 +40,6 @@ jobs:
3340
with:
3441
fetch-depth: 0
3542

36-
- name: Cache conda
37-
uses: actions/cache@v3
38-
with:
39-
path: ~/conda_pkgs_dir
40-
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
41-
4243
# Although asv sets up its own env, deps are still needed
4344
# during discovery process
4445
- name: Set up Conda

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

+6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ on:
55
- cron: "0 7 1 * *" # At 07:00 on 1st of every month.
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
update-pre-commit:
13+
permissions:
14+
contents: write # for technote-space/create-pr-action to push code
15+
pull-requests: write # for technote-space/create-pr-action to create a PR
1016
if: github.repository_owner == 'pandas-dev'
1117
name: Autoupdate pre-commit config
1218
runs-on: ubuntu-latest

.github/workflows/code-checks.yml

+11-18
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ env:
1414
ENV_FILE: environment.yml
1515
PANDAS_CI: 1
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
pre_commit:
1922
name: pre-commit
@@ -52,50 +55,46 @@ jobs:
5255
with:
5356
fetch-depth: 0
5457

55-
- name: Cache conda
56-
uses: actions/cache@v3
57-
with:
58-
path: ~/conda_pkgs_dir
59-
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
60-
6158
- name: Set up Conda
6259
uses: ./.github/actions/setup-conda
6360

6461
- name: Build Pandas
6562
id: build
6663
uses: ./.github/actions/build_pandas
6764

65+
# The following checks are independent of each other and should still be run if one fails
6866
- name: Check for no warnings when building single-page docs
6967
run: ci/code_checks.sh single-docs
70-
if: ${{ steps.build.outcome == 'success' }}
68+
if: ${{ steps.build.outcome == 'success' && always() }}
7169

7270
- name: Run checks on imported code
7371
run: ci/code_checks.sh code
74-
if: ${{ steps.build.outcome == 'success' }}
72+
if: ${{ steps.build.outcome == 'success' && always() }}
7573

7674
- name: Run doctests
7775
run: ci/code_checks.sh doctests
78-
if: ${{ steps.build.outcome == 'success' }}
76+
if: ${{ steps.build.outcome == 'success' && always() }}
7977

8078
- name: Run docstring validation
8179
run: ci/code_checks.sh docstrings
82-
if: ${{ steps.build.outcome == 'success' }}
80+
if: ${{ steps.build.outcome == 'success' && always() }}
8381

8482
- name: Use existing environment for type checking
8583
run: |
8684
echo $PATH >> $GITHUB_PATH
8785
echo "PYTHONHOME=$PYTHONHOME" >> $GITHUB_ENV
8886
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
87+
if: ${{ steps.build.outcome == 'success' && always() }}
8988

9089
- name: Typing
9190
uses: pre-commit/[email protected]
9291
with:
9392
extra_args: --hook-stage manual --all-files
94-
if: ${{ steps.build.outcome == 'success' }}
93+
if: ${{ steps.build.outcome == 'success' && always() }}
9594

9695
- name: Run docstring validation script tests
9796
run: pytest scripts
98-
if: ${{ steps.build.outcome == 'success' }}
97+
if: ${{ steps.build.outcome == 'success' && always() }}
9998

10099
asv-benchmarks:
101100
name: ASV Benchmarks
@@ -115,12 +114,6 @@ jobs:
115114
with:
116115
fetch-depth: 0
117116

118-
- name: Cache conda
119-
uses: actions/cache@v3
120-
with:
121-
path: ~/conda_pkgs_dir
122-
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
123-
124117
- name: Set up Conda
125118
uses: ./.github/actions/setup-conda
126119

.github/workflows/codeql.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CodeQL
2+
on:
3+
schedule:
4+
# every day at midnight
5+
- cron: "0 0 * * *"
6+
7+
concurrency:
8+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
analyze:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
actions: read
16+
contents: read
17+
security-events: write
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
language:
23+
- python
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: github/codeql-action/init@v2
28+
with:
29+
languages: ${{ matrix.language }}
30+
- uses: github/codeql-action/autobuild@v2
31+
- uses: github/codeql-action/analyze@v2

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

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ env:
1414
ENV_FILE: environment.yml
1515
PANDAS_CI: 1
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
web_and_docs:
1922
name: Doc Build and Upload
@@ -46,6 +49,11 @@ jobs:
4649
- name: Build documentation
4750
run: doc/make.py --warnings-are-errors
4851

52+
- name: Build the interactive terminal
53+
run: |
54+
cd web/interactive_terminal
55+
jupyter lite build
56+
4957
- name: Install ssh key
5058
run: |
5159
mkdir -m 700 -p ~/.ssh

.github/workflows/macos-windows.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ env:
1818
PATTERN: "not slow and not db and not network and not single_cpu"
1919

2020

21+
permissions:
22+
contents: read
23+
2124
jobs:
2225
pytest:
2326
defaults:
2427
run:
2528
shell: bash -el {0}
26-
timeout-minutes: 90
29+
timeout-minutes: 120
2730
strategy:
2831
matrix:
2932
os: [macos-latest, windows-latest]

.github/workflows/python-dev.yml

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ env:
2727
COVERAGE: true
2828
PYTEST_TARGET: pandas
2929

30+
permissions:
31+
contents: read
32+
3033
jobs:
3134
build:
3235
if: false # Comment this line out to "unfreeze"

0 commit comments

Comments
 (0)