Skip to content

Commit 11aa671

Browse files
committed
feat: documentation building
1 parent 633ad27 commit 11aa671

File tree

2 files changed

+65
-62
lines changed

2 files changed

+65
-62
lines changed

.github/workflows/docs.yml

+59-62
Original file line numberDiff line numberDiff line change
@@ -73,34 +73,29 @@ jobs:
7373
with:
7474
python-version: ${{ inputs.python_version }}
7575

76-
- name: "Create virtual environment in the current workspace"
77-
shell: pwsh
78-
run: python -m venv .venv --system-site-packages
76+
# - name: "Create virtual environment in the current workspace"
77+
# shell: pwsh
78+
# run: python -m venv .venv --system-site-packages
7979

80-
- name: "Update PATH for virtual environment"
81-
run: |
82-
echo "${{ github.workspace }}\.venv\Scripts" >> $env:GITHUB_PATH
80+
# - name: "Update PATH for virtual environment"
81+
# run: |
82+
# echo "${{ github.workspace }}\.venv\Scripts" >> $env:GITHUB_PATH
8383

84-
- name: "Update pip to the latest version"
84+
- name: "Update pip to the latest version and install tox"
8585
shell: pwsh
8686
run: |
8787
python -m pip install -U pip
88+
python -m pip install tox
8889
89-
- name: "Install requirements"
90-
shell: pwsh
91-
run: |
92-
python -m pip install -r requirements/requirements_build.txt
90+
# - name: "Install requirements"
91+
# shell: pwsh
92+
# run: |
93+
# python -m pip install -r requirements/requirements_build.txt
9394

9495
- name: "Build the wheel"
9596
shell: pwsh
9697
run: |
97-
$os = "${{ matrix.os }}"
98-
if ($os -eq "ubuntu-latest") {
99-
$platform = "manylinux_2_17"
100-
} else {
101-
$platform = "win"
102-
}
103-
python .ci/build_wheel.py -p $platform -w
98+
tox -e build-wheel -- win
10499
105100
- name: "Expose the wheel"
106101
shell: bash
@@ -111,10 +106,10 @@ jobs:
111106
echo ${name}
112107
echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT
113108
114-
- name: "Install package wheel"
115-
shell: pwsh
116-
run: |
117-
python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}[plotting]
109+
# - name: "Install package wheel"
110+
# shell: bash
111+
# run: |
112+
# python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}[plotting]
118113

119114
- name: "Install DPF"
120115
id: set-server-path
@@ -131,6 +126,7 @@ jobs:
131126
shell: pwsh
132127
working-directory: tests
133128
run: |
129+
python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}[plotting]
134130
python -c "from ansys.dpf import core"
135131
136132
- name: "Setup headless display"
@@ -143,53 +139,54 @@ jobs:
143139
run: |
144140
choco install pandoc
145141
146-
- name: "Install documentation packages for Python"
147-
shell: pwsh
148-
run: |
149-
python -m pip install -r requirements/requirements_docs.txt
142+
# - name: "Install documentation packages for Python"
143+
# shell: pwsh
144+
# run: |
145+
# python -m pip install -r requirements/requirements_docs.txt
150146

151-
- name: "Kill all servers"
152-
uses: ansys/pydpf-actions/[email protected]
147+
# - name: "Kill all servers"
148+
# uses: ansys/pydpf-actions/[email protected]
153149

154-
- name: "Ensure VTK compatibility"
155-
shell: pwsh
156-
run: |
157-
python -m pip uninstall --yes vtk
158-
python -m pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==${{ env.VTK_OSMESA_VERSION }}
150+
# - name: "Ensure VTK compatibility"
151+
# shell: pwsh
152+
# run: |
153+
# python -m pip uninstall --yes vtk
154+
# python -m pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==${{ env.VTK_OSMESA_VERSION }}
159155

160-
- name: "List installed packages"
161-
shell: pwsh
162-
run: |
163-
python -m pip list
156+
# - name: "List installed packages"
157+
# shell: pwsh
158+
# run: |
159+
# python -m pip list
164160

165161
- name: "Build HTML Documentation"
166-
shell: cmd /D /E:ON /V:OFF /C "CALL "{0}""
167-
working-directory: .ci
168-
run: |
169-
build_doc.bat > ..\doc\log.txt && type ..\doc\log.txt 2>&1
170-
timeout-minutes: 60
171-
env:
172-
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
173-
174-
- name: "Check for success"
162+
# shell: cmd /D /E:ON /V:OFF /C "CALL "{0}""
163+
# working-directory: .ci
175164
shell: bash
176-
working-directory: doc
177165
run: |
178-
case `grep -F "build succeeded" log.txt >/dev/null; echo $?` in
179-
0)
180-
echo "Build succeeded!"
181-
exit 0;;
182-
1)
183-
echo "Documentation generation failed, please check previous step!"
184-
exit 1;;
185-
*)
186-
echo "An error occurred while checking success of the previous step!"
187-
exit 1;;
188-
esac
189-
190-
- name: "Kill all servers"
191-
uses: ansys/pydpf-actions/[email protected]
192-
if: always()
166+
tox -e doc-html --installpkg dist/ansys_dpf_core*
167+
# timeout-minutes: 60
168+
# env:
169+
# MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
170+
171+
# - name: "Check for success"
172+
# shell: bash
173+
# working-directory: doc
174+
# run: |
175+
# case `grep -F "build succeeded" log.txt >/dev/null; echo $?` in
176+
# 0)
177+
# echo "Build succeeded!"
178+
# exit 0;;
179+
# 1)
180+
# echo "Documentation generation failed, please check previous step!"
181+
# exit 1;;
182+
# *)
183+
# echo "An error occurred while checking success of the previous step!"
184+
# exit 1;;
185+
# esac
186+
187+
# - name: "Kill all servers"
188+
# uses: ansys/pydpf-actions/[email protected]
189+
# if: always()
193190

194191
- name: "Retrieve package version"
195192
shell: bash

tox.ini

+6
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ setenv =
122122
skip_install =
123123
clean: True
124124

125+
extras =
126+
html: plotting
127+
125128
deps =
126129
links,html: -r requirements/requirements_docs.txt
127130

@@ -173,5 +176,8 @@ description = Environment for custom build of package wheels
173176

174177
skip_install = True
175178

179+
deps =
180+
-r requirements/requirements_build.txt
181+
176182
commands =
177183
python .ci/build_wheel.py -p {posargs:{on_platform}} -w

0 commit comments

Comments
 (0)