-
Notifications
You must be signed in to change notification settings - Fork 128
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: change the api layout to autoapi layout. #3708
Draft
Revathyvenugopal162
wants to merge
6
commits into
main
Choose a base branch
from
feat/change-the-api-layout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+87
−43
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c9ee7d9
docs: initial commit of autoapi migration
Revathyvenugopal162 a34684e
fix: add gitignore
Revathyvenugopal162 7034881
fix: the pah
Revathyvenugopal162 e9b22f7
fix: the pah
Revathyvenugopal162 ecb9ca7
Merge branch 'main' into feat/change-the-api-layout
Revathyvenugopal162 2580cac
Merge branch 'main' into feat/change-the-api-layout
Revathyvenugopal162 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
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -15,7 +15,8 @@ | |||||||||
get_version_match, pyansys_logo_black, | ||||||||||
watermark, | ||||||||||
ansys_logo_white, | ||||||||||
ansys_logo_white_cropped, latex) | ||||||||||
ansys_logo_white_cropped, latex, | ||||||||||
get_autoapi_templates_dir_relative_path) | ||||||||||
from importlib import import_module | ||||||||||
from pprint import pformat | ||||||||||
from docutils.parsers.rst import Directive | ||||||||||
|
@@ -126,11 +127,12 @@ def setup(app): | |||||||||
"sphinx.ext.inheritance_diagram", | ||||||||||
"numpydoc", | ||||||||||
"ansys_sphinx_theme.extension.linkcode", | ||||||||||
"autoapi.extension", | ||||||||||
] | ||||||||||
|
||||||||||
# Intersphinx mapping | ||||||||||
intersphinx_mapping = { | ||||||||||
"python": ("https://docs.python.org/3", None), | ||||||||||
"python": ("https://docs.python.org/3.10", None), | ||||||||||
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None), | ||||||||||
"numpy": ("https://numpy.org/devdocs", None), | ||||||||||
"matplotlib": ("https://matplotlib.org/stable", None), | ||||||||||
|
@@ -291,18 +293,6 @@ def setup(app): | |||||||||
"run_examples": config["run_examples"], | ||||||||||
}, | ||||||||||
} | ||||||||||
# def prepare_jinja_env(jinja_env) -> None: | ||||||||||
# """ | ||||||||||
# Customize the jinja env. | ||||||||||
# | ||||||||||
# Notes | ||||||||||
# ----- | ||||||||||
# See https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.Environment | ||||||||||
# """ | ||||||||||
# jinja_env.globals["project_name"] = project | ||||||||||
# | ||||||||||
# | ||||||||||
# autoapi_prepare_jinja_env = prepare_jinja_env | ||||||||||
|
||||||||||
# -- Options for HTML output ------------------------------------------------- | ||||||||||
html_short_title = html_title = "PyAEDT" | ||||||||||
|
@@ -379,4 +369,38 @@ def setup(app): | |||||||||
author, | ||||||||||
"manual", | ||||||||||
), | ||||||||||
] | ||||||||||
] | ||||||||||
|
||||||||||
def prepare_jinja_env(jinja_env) -> None: | ||||||||||
""" | ||||||||||
Customize the jinja env. | ||||||||||
|
||||||||||
Notes | ||||||||||
----- | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
See https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.Environment | ||||||||||
""" | ||||||||||
jinja_env.globals["project_name"] = project | ||||||||||
|
||||||||||
|
||||||||||
autoapi_prepare_jinja_env = prepare_jinja_env | ||||||||||
|
||||||||||
|
||||||||||
autoapi_type = "python" | ||||||||||
autoapi_dirs = ["../../pyaedt/"] | ||||||||||
autoapi_options = [ | ||||||||||
"members", | ||||||||||
"undoc-members", | ||||||||||
"show-inheritance", | ||||||||||
"show-module-summary", | ||||||||||
"special-members", | ||||||||||
] | ||||||||||
autoapi_template_dir = get_autoapi_templates_dir_relative_path(pathlib.Path(__file__)) | ||||||||||
suppress_warnings = ["autoapi.python_import_resolution"] | ||||||||||
exclude_patterns = [ | ||||||||||
"autoapi", | ||||||||||
"**/ExampleData*", | ||||||||||
"**/LaunchWorkbench*", | ||||||||||
] | ||||||||||
autoapi_root = "API" | ||||||||||
autoapi_python_use_implicit_namespaces = True | ||||||||||
autoapi_render_in_single_page = ["class", "enum", "exception"] |
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.