Skip to content

Commit 7273d4f

Browse files
committed
Finish up
1 parent 0b111fa commit 7273d4f

File tree

3 files changed

+612
-611
lines changed

3 files changed

+612
-611
lines changed

.github/workflows/code-checks.yml

Lines changed: 188 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -1,188 +1,188 @@
1-
#name: Code Checks
2-
#
3-
#on:
4-
# push:
5-
# branches:
6-
# - main
7-
# - 2.3.x
8-
# pull_request:
9-
# branches:
10-
# - main
11-
# - 2.3.x
12-
#
13-
#env:
14-
# ENV_FILE: environment.yml
15-
# PANDAS_CI: 1
16-
#
17-
#permissions:
18-
# contents: read
19-
#
20-
## pre-commit run by https://pre-commit.ci/
21-
#jobs:
22-
# docstring_typing_manual_hooks:
23-
# name: Docstring validation, typing, and other manual pre-commit hooks
24-
# runs-on: ubuntu-24.04
25-
# defaults:
26-
# run:
27-
# shell: bash -el {0}
28-
#
29-
# concurrency:
30-
# # https://github.community/t/concurrecy-not-work-for-push/183068/7
31-
# group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-code-checks
32-
# cancel-in-progress: true
33-
#
34-
# steps:
35-
# - name: Checkout
36-
# uses: actions/checkout@v4
37-
# with:
38-
# fetch-depth: 0
39-
#
40-
# - name: Set up Conda
41-
# uses: ./.github/actions/setup-conda
42-
#
43-
# - name: Build Pandas
44-
# id: build
45-
# uses: ./.github/actions/build_pandas
46-
# with:
47-
# editable: false
48-
#
49-
# # The following checks are independent of each other and should still be run if one fails
50-
#
51-
# # TODO: The doctests have to be run first right now, since the Cython doctests only work
52-
# # with pandas installed in non-editable mode
53-
# # This can be removed once pytest-cython doesn't require C extensions to be installed inplace
54-
#
55-
# - name: Extra installs
56-
# # https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
57-
# run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
58-
#
59-
# - name: Run doctests
60-
# run: cd ci && ./code_checks.sh doctests
61-
# if: ${{ steps.build.outcome == 'success' && always() }}
62-
#
63-
# - name: Install pandas in editable mode
64-
# id: build-editable
65-
# if: ${{ steps.build.outcome == 'success' && always() }}
66-
# uses: ./.github/actions/build_pandas
67-
# with:
68-
# editable: true
69-
#
70-
# - name: Check for no warnings when building single-page docs
71-
# run: ci/code_checks.sh single-docs
72-
# if: ${{ steps.build.outcome == 'success' && always() }}
73-
#
74-
# - name: Run checks on imported code
75-
# run: ci/code_checks.sh code
76-
# if: ${{ steps.build.outcome == 'success' && always() }}
77-
#
78-
# - name: Run docstring validation
79-
# run: ci/code_checks.sh docstrings
80-
# if: ${{ steps.build.outcome == 'success' && always() }}
81-
#
82-
# - name: Run check of documentation notebooks
83-
# run: ci/code_checks.sh notebooks
84-
# if: ${{ steps.build.outcome == 'success' && always() }}
85-
#
86-
# - name: Use existing environment for type checking
87-
# run: |
88-
# echo $PATH >> $GITHUB_PATH
89-
# echo "PYTHONHOME=$PYTHONHOME" >> $GITHUB_ENV
90-
# echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
91-
# if: ${{ steps.build.outcome == 'success' && always() }}
92-
#
93-
# - name: Typing
94-
# uses: pre-commit/[email protected]
95-
# with:
96-
# extra_args: --verbose --hook-stage manual --all-files
97-
# if: ${{ steps.build.outcome == 'success' && always() }}
98-
#
99-
# - name: Run docstring validation script tests
100-
# run: pytest scripts
101-
# if: ${{ steps.build.outcome == 'success' && always() }}
102-
#
103-
# asv-benchmarks:
104-
# name: ASV Benchmarks
105-
# runs-on: ubuntu-24.04
106-
# defaults:
107-
# run:
108-
# shell: bash -el {0}
109-
#
110-
# concurrency:
111-
# # https://github.community/t/concurrecy-not-work-for-push/183068/7
112-
# group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-asv-benchmarks
113-
# cancel-in-progress: true
114-
#
115-
# steps:
116-
# - name: Checkout
117-
# uses: actions/checkout@v4
118-
# with:
119-
# fetch-depth: 0
120-
#
121-
# - name: Set up Conda
122-
# uses: ./.github/actions/setup-conda
123-
#
124-
# - name: Build Pandas
125-
# id: build
126-
# uses: ./.github/actions/build_pandas
127-
#
128-
# - name: Run ASV benchmarks
129-
# run: |
130-
# cd asv_bench
131-
# asv machine --yes
132-
# asv run --quick --dry-run --durations=30 --python=same --show-stderr
133-
#
134-
# build_docker_dev_environment:
135-
# name: Build Docker Dev Environment
136-
# runs-on: ubuntu-24.04
137-
# defaults:
138-
# run:
139-
# shell: bash -el {0}
140-
#
141-
# concurrency:
142-
# # https://github.community/t/concurrecy-not-work-for-push/183068/7
143-
# group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-build_docker_dev_environment
144-
# cancel-in-progress: true
145-
#
146-
# steps:
147-
# - name: Clean up dangling images
148-
# run: docker image prune -f
149-
#
150-
# - name: Checkout
151-
# uses: actions/checkout@v4
152-
# with:
153-
# fetch-depth: 0
154-
#
155-
# - name: Build image
156-
# run: docker build --pull --no-cache --tag pandas-dev-env .
157-
#
158-
# - name: Show environment
159-
# run: docker run --rm pandas-dev-env python -c "import pandas as pd; print(pd.show_versions())"
160-
#
161-
# requirements-dev-text-installable:
162-
# name: Test install requirements-dev.txt
163-
# runs-on: ubuntu-24.04
164-
#
165-
# concurrency:
166-
# # https://github.community/t/concurrecy-not-work-for-push/183068/7
167-
# group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-requirements-dev-text-installable
168-
# cancel-in-progress: true
169-
#
170-
# steps:
171-
# - name: Checkout
172-
# uses: actions/checkout@v4
173-
# with:
174-
# fetch-depth: 0
175-
#
176-
# - name: Setup Python
177-
# id: setup_python
178-
# uses: actions/setup-python@v5
179-
# with:
180-
# python-version: '3.10'
181-
# cache: 'pip'
182-
# cache-dependency-path: 'requirements-dev.txt'
183-
#
184-
# - name: Install requirements-dev.txt
185-
# run: pip install -r requirements-dev.txt
186-
#
187-
# - name: Check Pip Cache Hit
188-
# run: echo ${{ steps.setup_python.outputs.cache-hit }}
1+
name: Code Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 2.3.x
8+
pull_request:
9+
branches:
10+
- main
11+
- 2.3.x
12+
13+
env:
14+
ENV_FILE: environment.yml
15+
PANDAS_CI: 1
16+
17+
permissions:
18+
contents: read
19+
20+
# pre-commit run by https://pre-commit.ci/
21+
jobs:
22+
docstring_typing_manual_hooks:
23+
name: Docstring validation, typing, and other manual pre-commit hooks
24+
runs-on: ubuntu-24.04
25+
defaults:
26+
run:
27+
shell: bash -el {0}
28+
29+
concurrency:
30+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
31+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-code-checks
32+
cancel-in-progress: true
33+
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
40+
- name: Set up Conda
41+
uses: ./.github/actions/setup-conda
42+
43+
- name: Build Pandas
44+
id: build
45+
uses: ./.github/actions/build_pandas
46+
with:
47+
editable: false
48+
49+
# The following checks are independent of each other and should still be run if one fails
50+
51+
# TODO: The doctests have to be run first right now, since the Cython doctests only work
52+
# with pandas installed in non-editable mode
53+
# This can be removed once pytest-cython doesn't require C extensions to be installed inplace
54+
55+
- name: Extra installs
56+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
57+
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
58+
59+
- name: Run doctests
60+
run: cd ci && ./code_checks.sh doctests
61+
if: ${{ steps.build.outcome == 'success' && always() }}
62+
63+
- name: Install pandas in editable mode
64+
id: build-editable
65+
if: ${{ steps.build.outcome == 'success' && always() }}
66+
uses: ./.github/actions/build_pandas
67+
with:
68+
editable: true
69+
70+
- name: Check for no warnings when building single-page docs
71+
run: ci/code_checks.sh single-docs
72+
if: ${{ steps.build.outcome == 'success' && always() }}
73+
74+
- name: Run checks on imported code
75+
run: ci/code_checks.sh code
76+
if: ${{ steps.build.outcome == 'success' && always() }}
77+
78+
- name: Run docstring validation
79+
run: ci/code_checks.sh docstrings
80+
if: ${{ steps.build.outcome == 'success' && always() }}
81+
82+
- name: Run check of documentation notebooks
83+
run: ci/code_checks.sh notebooks
84+
if: ${{ steps.build.outcome == 'success' && always() }}
85+
86+
- name: Use existing environment for type checking
87+
run: |
88+
echo $PATH >> $GITHUB_PATH
89+
echo "PYTHONHOME=$PYTHONHOME" >> $GITHUB_ENV
90+
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
91+
if: ${{ steps.build.outcome == 'success' && always() }}
92+
93+
- name: Typing
94+
uses: pre-commit/[email protected]
95+
with:
96+
extra_args: --verbose --hook-stage manual --all-files
97+
if: ${{ steps.build.outcome == 'success' && always() }}
98+
99+
- name: Run docstring validation script tests
100+
run: pytest scripts
101+
if: ${{ steps.build.outcome == 'success' && always() }}
102+
103+
asv-benchmarks:
104+
name: ASV Benchmarks
105+
runs-on: ubuntu-24.04
106+
defaults:
107+
run:
108+
shell: bash -el {0}
109+
110+
concurrency:
111+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
112+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-asv-benchmarks
113+
cancel-in-progress: true
114+
115+
steps:
116+
- name: Checkout
117+
uses: actions/checkout@v4
118+
with:
119+
fetch-depth: 0
120+
121+
- name: Set up Conda
122+
uses: ./.github/actions/setup-conda
123+
124+
- name: Build Pandas
125+
id: build
126+
uses: ./.github/actions/build_pandas
127+
128+
- name: Run ASV benchmarks
129+
run: |
130+
cd asv_bench
131+
asv machine --yes
132+
asv run --quick --dry-run --durations=30 --python=same --show-stderr
133+
134+
build_docker_dev_environment:
135+
name: Build Docker Dev Environment
136+
runs-on: ubuntu-24.04
137+
defaults:
138+
run:
139+
shell: bash -el {0}
140+
141+
concurrency:
142+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
143+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-build_docker_dev_environment
144+
cancel-in-progress: true
145+
146+
steps:
147+
- name: Clean up dangling images
148+
run: docker image prune -f
149+
150+
- name: Checkout
151+
uses: actions/checkout@v4
152+
with:
153+
fetch-depth: 0
154+
155+
- name: Build image
156+
run: docker build --pull --no-cache --tag pandas-dev-env .
157+
158+
- name: Show environment
159+
run: docker run --rm pandas-dev-env python -c "import pandas as pd; print(pd.show_versions())"
160+
161+
requirements-dev-text-installable:
162+
name: Test install requirements-dev.txt
163+
runs-on: ubuntu-24.04
164+
165+
concurrency:
166+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
167+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-requirements-dev-text-installable
168+
cancel-in-progress: true
169+
170+
steps:
171+
- name: Checkout
172+
uses: actions/checkout@v4
173+
with:
174+
fetch-depth: 0
175+
176+
- name: Setup Python
177+
id: setup_python
178+
uses: actions/setup-python@v5
179+
with:
180+
python-version: '3.10'
181+
cache: 'pip'
182+
cache-dependency-path: 'requirements-dev.txt'
183+
184+
- name: Install requirements-dev.txt
185+
run: pip install -r requirements-dev.txt
186+
187+
- name: Check Pip Cache Hit
188+
run: echo ${{ steps.setup_python.outputs.cache-hit }}

0 commit comments

Comments
 (0)