-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: use sphinx-autoapi for API reference #1952
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f6240ac
feat: first commit that results in sucessful documentation build
moe-ad 6ce5d94
feat: bumped sphinx version manually to 8.1.3
moe-ad 7b334a9
feat: cleaned up conf.py
moe-ad d16becb
doc: sphinx 7.4.7 works for autoapi
moe-ad ed2b6e8
Merge branch 'master' into feat/migration-from-autodoc-to-autoapi
moe-ad c0bdb08
fix: ci doc build resulting in error
moe-ad f23c959
fix: check if modifying action file fixes doc-build error
moe-ad 284c7a6
fix: quick test
moe-ad c8765df
fix: trialing another fix
moe-ad 7d80e67
fix: modified docs.yml file
moe-ad 87ff3f4
Merge branch 'master' into feat/migration-from-autodoc-to-autoapi
jorgepiloto 12daf63
doc: todo to address warnings that are being suppressed
moe-ad a36f981
fix: duplicated dependency
jorgepiloto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
set SPHINX_APIDOC_OPTIONS=inherited-members | ||
call sphinx-apidoc -o ../doc/source/api ../src/ansys ../src/ansys/dpf/core/log.py ^ | ||
../src/ansys/dpf/core/help.py ../src/ansys/dpf/core/mapping_types.py ../src/ansys/dpf/core/ipconfig.py ^ | ||
../src/ansys/dpf/core/field_base.py ../src/ansys/dpf/core/cache.py ../src/ansys/dpf/core/misc.py ^ | ||
../src/ansys/dpf/core/check_version.py ../src/ansys/dpf/core/operators/build.py ../src/ansys/dpf/core/operators/specification.py ^ | ||
../src/ansys/dpf/core/vtk_helper.py ../src/ansys/dpf/core/label_space.py ../src/ansys/dpf/core/examples/python_plugins/* ^ | ||
../src/ansys/dpf/core/examples/examples.py ../src/ansys/dpf/gate/* ../src/ansys/dpf/gatebin/* ../src/ansys/grpc/dpf/* ^ | ||
../src/ansys/dpf/core/property_fields_container.py ^ | ||
-f --implicit-namespaces --separate --no-headings | ||
@echo off | ||
|
||
REM Move to the documentation directory | ||
pushd . | ||
cd ../doc/ | ||
|
||
REM Clean the previous build | ||
call make clean | ||
|
||
REM Build the HTML documentation | ||
call make html -v -v -v -P | ||
|
||
REM Display the directory contents for verification | ||
dir | ||
|
||
rem Patch pyVista issue with elemental plots | ||
REM Patch pyVista issue with elemental plots by copying necessary images | ||
xcopy source\examples\04-advanced\02-volume_averaged_stress\sphx_glr_02-volume_averaged_stress_001.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_001.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_002.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_003.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_004.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_005.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_006.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_007.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_thumb.png build\html\_images\ /y /f | ||
|
||
xcopy source\examples\04-advanced\02-volume_averaged_stress\sphx_glr_02-volume_averaged_stress_001.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_001.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_002.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_003.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_004.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_005.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_006.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_007.png build\html\_images\ /y /f | ||
xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_thumb.png build\html\_images\ /y /f | ||
REM Return to the original directory | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,17 +73,33 @@ jobs: | |
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: "Create virtual environment in the current workspace" | ||
shell: pwsh | ||
run: python -m venv .venv --system-site-packages | ||
|
||
- name: "Update PATH for virtual environment" | ||
run: | | ||
echo "${{ github.workspace }}\.venv\Scripts" >> $env:GITHUB_PATH | ||
- name: "Update pip to the latest version" | ||
shell: pwsh | ||
run: | | ||
python -m pip install -U pip | ||
- name: "Install requirements" | ||
run: pip install -r requirements/requirements_build.txt | ||
shell: pwsh | ||
run: | | ||
python -m pip install -r requirements/requirements_build.txt | ||
- name: "Build the wheel" | ||
shell: bash | ||
shell: pwsh | ||
run: | | ||
if [ ${{ matrix.os }} == "ubuntu-latest" ]; then | ||
export platform="manylinux_2_17" | ||
else | ||
export platform="win" | ||
fi | ||
$os = "${{ matrix.os }}" | ||
if ($os -eq "ubuntu-latest") { | ||
$platform = "manylinux_2_17" | ||
} else { | ||
$platform = "win" | ||
} | ||
python .ci/build_wheel.py -p $platform -w | ||
- name: "Expose the wheel" | ||
|
@@ -96,9 +112,9 @@ jobs: | |
echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT | ||
- name: "Install package wheel" | ||
shell: bash | ||
shell: pwsh | ||
run: | | ||
pip install dist/${{ steps.wheel.outputs.wheel_name }}[plotting] | ||
python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}[plotting] | ||
- name: "Install DPF" | ||
id: set-server-path | ||
|
@@ -112,9 +128,10 @@ jobs: | |
uses: ansys/pydpf-actions/[email protected] | ||
|
||
- name: "Test import" | ||
shell: bash | ||
shell: pwsh | ||
working-directory: tests | ||
run: python -c "from ansys.dpf import core" | ||
run: | | ||
python -c "from ansys.dpf import core" | ||
- name: "Setup headless display" | ||
uses: pyvista/setup-headless-display-action@v2 | ||
|
@@ -127,20 +144,23 @@ jobs: | |
choco install pandoc | ||
- name: "Install documentation packages for Python" | ||
shell: pwsh | ||
run: | | ||
pip install -r requirements/requirements_docs.txt | ||
python -m pip install -r requirements/requirements_docs.txt | ||
- name: "Kill all servers" | ||
uses: ansys/pydpf-actions/[email protected] | ||
|
||
- name: "Ensure VTK compatibility" | ||
shell: pwsh | ||
run: | | ||
python -m pip uninstall --yes vtk | ||
python -m pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==${{ env.VTK_OSMESA_VERSION }} | ||
- name: "List installed packages" | ||
shell: bash | ||
run: pip list | ||
shell: pwsh | ||
run: | | ||
python -m pip list | ||
- name: "Build HTML Documentation" | ||
shell: cmd /D /E:ON /V:OFF /C "CALL "{0}"" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
.. _ref_api_section: | ||
|
||
============= | ||
API reference | ||
============= | ||
|
||
This section describes PyDPF-Core endpoints, their capabilities, and how | ||
to interact with them programmatically. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: API reference | ||
ansys.dpf.core | ||
:titlesonly: | ||
:maxdepth: 3 | ||
|
||
<span class="nf nf-md-package"></span> ansys.dpf.core</api/ansys/dpf/core/index> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @moe-ad, does this not break any links in the doc?