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

feat: improve contribute section documentation #2085

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

moe-ad
Copy link
Contributor

@moe-ad moe-ad commented Feb 14, 2025

Summary

As stated in the title

Details

The following have been done:

  • User, Developer, and Documentarian subsections added to the contribute section.
  • Use cases of tox added to Developer and Documentarian subsections.
  • Environment variables added to allow exclusion of API and examples during documentation generation in a local environment.

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.65%. Comparing base (d39d5a2) to head (094d8b3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2085      +/-   ##
==========================================
+ Coverage   86.24%   86.65%   +0.40%     
==========================================
  Files          90       90              
  Lines       10274    10274              
==========================================
+ Hits         8861     8903      +42     
+ Misses       1413     1371      -42     

@moe-ad
Copy link
Contributor Author

moe-ad commented Feb 17, 2025

Moving to ready for review to check generated documentation

@moe-ad moe-ad marked this pull request as ready for review February 17, 2025 09:49
@PProfizi PProfizi added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 19, 2025
Copy link
Contributor

@Revathyvenugopal162 Revathyvenugopal162 left a comment

Choose a reason for hiding this comment

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

small suggestions

@moe-ad moe-ad self-assigned this Feb 20, 2025
BUILD_API = True if os.environ.get("BUILD_API", "true") == "true" else False
if not BUILD_API:
extensions.remove("ansys_sphinx_theme.extension.autoapi")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
extensions.remove("ansys_sphinx_theme.extension.autoapi")
extensions.extend("ansys_sphinx_theme.extension.autoapi")

Add the extension only if there is env variable, remove it from extensions

# Optionally exclude api or example documentation generation.
BUILD_API = True if os.environ.get("BUILD_API", "true") == "true" else False
if not BUILD_API:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if not BUILD_API:
if BUILD_API:

Comment on lines +407 to +409
if not BUILD_EXAMPLES:
extensions.remove("sphinx_gallery.gen_gallery")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
BUILD_EXAMPLES = True if os.environ.get("BUILD_EXAMPLES", "true") == "true" else False
if not BUILD_EXAMPLES:
extensions.remove("sphinx_gallery.gen_gallery")
BUILD_EXAMPLES = True if os.environ.get("BUILD_EXAMPLES", "true") == "true" else False
if BUILD_EXAMPLES:
extensions.extend("sphinx_gallery.gen_gallery")

same here

@@ -109,6 +111,7 @@
"sphinx.ext.todo",
"sphinx_copybutton",
"sphinx_design",
"sphinx_jinja",
"sphinx_gallery.gen_gallery",
'sphinx_reredirects',
"ansys_sphinx_theme.extension.autoapi",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"ansys_sphinx_theme.extension.autoapi",

@@ -109,6 +111,7 @@
"sphinx.ext.todo",
"sphinx_copybutton",
"sphinx_design",
"sphinx_jinja",
"sphinx_gallery.gen_gallery",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"sphinx_gallery.gen_gallery",

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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants