Skip to content
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 13 commits into from
Dec 16, 2024

Conversation

moe-ad
Copy link
Contributor

@moe-ad moe-ad commented Dec 4, 2024

This PR is related to ansys-internal/pyansys-planning#100. The migration of the API documentation migration is being handled here.

@jorgepiloto jorgepiloto changed the title Feat: first commit that results in sucessful documentation build doc: use sphinx-autoapi for API reference Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.37%. Comparing base (6f7cde8) to head (a36f981).
Report is 32 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1952   +/-   ##
=======================================
  Coverage   88.37%   88.37%           
=======================================
  Files          89       89           
  Lines       10251    10251           
=======================================
  Hits         9059     9059           
  Misses       1192     1192           

@moe-ad
Copy link
Contributor Author

moe-ad commented Dec 4, 2024

@jorgepiloto, something I need to mention (already discussed with Revathy about this too).
If you try to build with sphinx 7.1.0 (which is the current default on this repo) while having autoapi enabled, the build fails. We narrowed it down to app.confdir being a str object in sphinx 7.1.0 and a path object in sphinx 8.1.3.

In ansys-sphinx-theme 1.2.2 (which is the current default on this repo), the autoapi extension treats app.confdir correctly (as a path object) but using sphinx 7.1.0 will result in an error because of the above reason.

In order words, we need sphinx 8.1.3 to be enforced moving forward.

@jorgepiloto
Copy link
Member

jorgepiloto commented Dec 4, 2024

Thanks for the research, @moe-ad. Then, let's focus on updating the rules for the moment. After that, we can update the examples to Jupytext. This should allow us to revisit the complete set of examples, making sure they run without random failures. Luckly, we can migrate to the latest Sphinx after that and merge this.

@moe-ad moe-ad marked this pull request as ready for review December 13, 2024 15:12
@moe-ad moe-ad force-pushed the feat/migration-from-autodoc-to-autoapi branch from dccf82b to ed2b6e8 Compare December 13, 2024 15:34
@moe-ad moe-ad force-pushed the feat/migration-from-autodoc-to-autoapi branch from a9edf40 to f23c959 Compare December 14, 2024 13:43
@moe-ad moe-ad force-pushed the feat/migration-from-autodoc-to-autoapi branch 3 times, most recently from 6c2b587 to 578e582 Compare December 14, 2024 18:38
@moe-ad moe-ad force-pushed the feat/migration-from-autodoc-to-autoapi branch from 578e582 to c8765df Compare December 14, 2024 18:56
@moe-ad
Copy link
Contributor Author

moe-ad commented Dec 14, 2024

Finally... :(

@moe-ad moe-ad requested a review from jorgepiloto December 16, 2024 12:59
@jorgepiloto jorgepiloto merged commit 2d59625 into master Dec 16, 2024
46 checks passed
@jorgepiloto jorgepiloto deleted the feat/migration-from-autodoc-to-autoapi branch December 16, 2024 15:58
@@ -1,10 +1,11 @@
.. _ref_api_section:
Copy link
Contributor

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?

@PProfizi PProfizi added the documentation Improvements or additions to documentation label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants