Skip to content

Commit 13ffb5f

Browse files
authored
CI: Build documentation using pixi (#65075)
1 parent fc127a1 commit 13ffb5f

File tree

6 files changed

+7230
-2082
lines changed

6 files changed

+7230
-2082
lines changed

.github/workflows/code-checks.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,10 @@ jobs:
5353
run: cd ci && ./code_checks.sh doctests
5454
if: ${{ steps.build.outcome == 'success' && always() }}
5555

56-
- name: Check for no warnings when building single-page docs
57-
run: ci/code_checks.sh single-docs
58-
if: ${{ steps.build.outcome == 'success' && always() }}
59-
6056
- name: Run checks on imported code
6157
run: ci/code_checks.sh code
6258
if: ${{ steps.build.outcome == 'success' && always() }}
6359

64-
- name: Run check of documentation notebooks
65-
run: ci/code_checks.sh notebooks
66-
if: ${{ steps.build.outcome == 'success' && always() }}
67-
6860
- name: Use existing environment for type checking
6961
run: |
7062
echo $PATH >> $GITHUB_PATH

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

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ on:
2222
type: boolean
2323
default: false
2424

25-
env:
26-
ENV_FILE: environment.yml
25+
defaults:
26+
run:
27+
shell: bash -euox pipefail {0}
2728

2829
permissions: {}
2930

@@ -39,10 +40,6 @@ jobs:
3940
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-web-docs
4041
cancel-in-progress: true
4142

42-
defaults:
43-
run:
44-
shell: bash -el {0}
45-
4643
steps:
4744
- name: Set pandas version
4845
env:
@@ -83,33 +80,68 @@ jobs:
8380
with:
8481
fetch-depth: 0
8582

86-
- name: Set up Conda
87-
uses: ./.github/actions/setup-conda
88-
89-
- name: Build Pandas
90-
uses: ./.github/actions/build_pandas
83+
- name: Create virtual environment with Pixi
84+
uses: ./.github/actions/setup-pixi
85+
with:
86+
environment: docs-and-web
9187

92-
- name: Extra installs
93-
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
94-
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
88+
- name: Build pandas
89+
run: |
90+
pixi run \
91+
--environment docs-and-web \
92+
build-pandas \
93+
--editable \
94+
-Csetup-args="--werror"
9595
9696
- name: Test website
97-
run: python -m pytest web/
97+
run: |
98+
pixi run \
99+
--environment docs-and-web \
100+
ci-test-website
101+
102+
- name: Test build single page doc
103+
run: |
104+
pixi run \
105+
--environment docs-and-web \
106+
ci-test-single-page-doc pandas.Series.value_counts
107+
pixi run \
108+
--environment docs-and-web \
109+
ci-test-single-page-doc pandas.Series.str.split
110+
111+
- name: Test nbconvert doc notebooks
112+
run: |
113+
pixi run \
114+
--environment docs-and-web \
115+
ci-test-nbconvert-doc-notebooks "$(find doc/source -name '*.ipynb')"
98116
99117
- name: Build website
100-
run: python web/pandas_web.py web/pandas --target-path=web/build
118+
run: |
119+
pixi run \
120+
--environment docs-and-web \
121+
ci-build-website
101122
env:
102123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103124

104125
- name: Build documentation
105-
run: doc/make.py --warnings-are-errors
126+
run: |
127+
pixi run \
128+
--environment docs-and-web \
129+
ci-build-documentation \
130+
html
106131
107132
- name: Build the interactive terminal
108133
working-directory: web/interactive_terminal
109-
run: jupyter lite build
134+
run: |
135+
pixi run \
136+
--environment docs-and-web \
137+
ci-build-interactive_terminal
110138
111139
- name: Build documentation zip
112-
run: doc/make.py zip_html
140+
run: |
141+
pixi run \
142+
--environment docs-and-web \
143+
ci-build-documentation \
144+
zip_html
113145
114146
- name: Install ssh key
115147
run: |

ci/code_checks.sh

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
# $ ./ci/code_checks.sh # run all checks
1010
# $ ./ci/code_checks.sh code # checks on imported code
1111
# $ ./ci/code_checks.sh doctests # run doctests
12-
# $ ./ci/code_checks.sh single-docs # check single-page docs build warning-free
13-
# $ ./ci/code_checks.sh notebooks # check execution of documentation notebooks
1412

1513
set -uo pipefail
1614

@@ -21,8 +19,8 @@ else
2119
CHECK=""
2220
fi
2321

24-
[[ -z "$CHECK" || "$CHECK" == "code" || "$CHECK" == "doctests" || "$CHECK" == "single-docs" || "$CHECK" == "notebooks" ]] || \
25-
{ echo "Unknown command $1. Usage: $0 [code|doctests|single-docs|notebooks]"; exit 1; }
22+
[[ -z "$CHECK" || "$CHECK" == "code" || "$CHECK" == "doctests" ]] || \
23+
{ echo "Unknown command $1. Usage: $0 [code|doctests]"; exit 1; }
2624

2725
RET=0
2826

@@ -60,19 +58,4 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
6058

6159
fi
6260

63-
### DOCUMENTATION NOTEBOOKS ###
64-
if [[ -z "$CHECK" || "$CHECK" == "notebooks" ]]; then
65-
66-
MSG='Notebooks' ; echo $MSG
67-
jupyter nbconvert --execute "$(find doc/source -name '*.ipynb')" --to notebook
68-
RET=$(($RET + $?)) ; echo $MSG "DONE"
69-
70-
fi
71-
72-
### SINGLE-PAGE DOCS ###
73-
if [[ -z "$CHECK" || "$CHECK" == "single-docs" ]]; then
74-
python doc/make.py --warnings-are-errors --no-browser --single pandas.Series.value_counts
75-
python doc/make.py --warnings-are-errors --no-browser --single pandas.Series.str.split
76-
fi
77-
7861
exit $RET

doc/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,11 +761,9 @@ def _pandas_validate(obj_name, validator_cls=None, **validator_kwargs):
761761

762762
if include_api:
763763
intersphinx_mapping = {
764-
"dateutil": ("https://dateutil.readthedocs.io/en/latest/", None),
765764
"matplotlib": ("https://matplotlib.org/stable/", None),
766765
"numpy": ("https://numpy.org/doc/stable/", None),
767766
"python": ("https://docs.python.org/3/", None),
768-
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
769767
"pyarrow": ("https://arrow.apache.org/docs/", None),
770768
}
771769

0 commit comments

Comments
 (0)