Skip to content

Conversation

@ecoussoux-ansys
Copy link
Collaborator

This PR introduces the use of sphix-autoapi to build the API documentation.

This allows for automatic generation of API references leveraging the docstring content from the .py files and removal of many .rst files that had to be manually generated inside doc/source/grpc_api and doc/source/dotnet_api with the sole purpose of exposing the sphinx-autosummary documentation for each module and which (for the vast majority of them) did not contain any custom / informational content. On top of that, some modules and subpackages were missed in the GRPC and dotnet documentations to date, probably due to the fact that corresponding .rst files were not manually added when expanding the APIs: This is a concern that sphinx-autoapi eliminates by automatically going through the entire packages and modules when producing the API documentation.

The following decisions were made to keep the changes as little disruptive as possible compared to the current structure of the API documentation:

  • sphinx-autoapi runs on the entire src/pyedb folder and generates files in doc/source/autoapi. However, only the parts related to the GRPC and the dotnet API are then exposed inside the documentation (through links in doc/source/grpc_api/index.rst and doc/source/dotnet_api/index.rst respectively) to reflect the fact that only those parts of the project were documented in such detail up to now. The documentation of these two sections of the API remains separated as was the case previously (the entire content generated by sphinx-autoapi in doc/source/autoapi is not exposed in the documentation, contrary to what is done for instance in pyansys-geometry). It is suggested that the benefits of a reorganisation of the API documentation with a view to making better use of the content generated by sphinx-autoapi is left for a future issue / PR.

  • While the vast majority of the .rst files from doc/source/grpc_api and doc/source/dotnet_api were removed, a few are preserved as they provide valuable content in the form of text, images or code examples. This is the case for the two files serving as introductions to the documentation of the GRPC and dotnet APIs (respectively doc/source/grpc_api/index.rst and doc/source/dotnet_api/index.rst) and for doc/source/dotnet_api/dotnet/SiWave.rst, which is in fact redirecting to the documentation of the pyedb.siwave.Siwave class from within the dotnet API documentation. These 3 .rst files were found to be the only ones both accessible in the documentation and providing original content that would have been lost with a mere redirection to outputs of sphinx-autoapi. It is suggested to leave the discussion whether including such information inside the API documentation is relevant or not for another PR, where this content could for instance be transferred to the user guide or even inside some docstrings.

On top of this, the version of the ansys-sphinx-theme used for the documentation was updated in this PR.
A few typos in .rst files are corrected too, even if these are not necessarily related to the topic of this PR.

Finally, a follow-up PR should aim at improving the home page of the documentation doc/source/index.rst to create tiles for the main sections (see pyansys-geometry documentation) and remove the many links to the Home page introduced by the use of toctree constructs in the latest versions of the ansys-sphinx-theme.

Close #1606.

@ecoussoux-ansys ecoussoux-ansys self-assigned this Nov 5, 2025
@ecoussoux-ansys ecoussoux-ansys added the documentation Improvements or additions to documentation label Nov 5, 2025
@github-actions github-actions bot added maintenance Package and maintenance related dependencies Related with project dependencies labels Nov 5, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.89%. Comparing base (805037e) to head (caf02b5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1632      +/-   ##
==========================================
+ Coverage   70.84%   70.89%   +0.05%     
==========================================
  Files         226      226              
  Lines       40690    40690              
==========================================
+ Hits        28826    28847      +21     
+ Misses      11864    11843      -21     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@svandenb-dev svandenb-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I followed the instructions for documentations. Thanks @ecoussoux-ansys for your work.

@ecoussoux-ansys ecoussoux-ansys merged commit c0f8946 into main Nov 7, 2025
31 checks passed
@ecoussoux-ansys ecoussoux-ansys deleted the docs/introduce-sphinx-autoapi branch November 7, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Related with project dependencies documentation Improvements or additions to documentation maintenance Package and maintenance related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOCS: Migrate documentation build to sphinx-autoapi

5 participants