Skip to content

Commit

Permalink
Bump version 0.10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Sep 4, 2023
1 parent 2c751e7 commit 4613c65
Showing 1 changed file with 28 additions and 23 deletions.
51 changes: 28 additions & 23 deletions src/ansys_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This is the ansys-sphinx-theme module."""
import logging
import pathlib
from typing import Any, Dict

Expand All @@ -9,7 +10,7 @@
from ansys_sphinx_theme.extension.linkcode import DOMAIN_KEYS, sphinx_linkcode_resolve
from ansys_sphinx_theme.latex import generate_404 # noqa: F401

__version__ = "0.10.5"
__version__ = "0.10.6"

# Declare the fundamental paths of the theme
THIS_PATH = pathlib.Path(__file__).parent.resolve()
Expand Down Expand Up @@ -158,28 +159,32 @@ def fix_edit_link_page(link: str) -> str:

if "_autosummary" in pagename:
for obj_node in list(doctree.findall(addnodes.desc)):
domain = obj_node.get("domain")
for signode in obj_node:
if not isinstance(signode, addnodes.desc_signature):
continue
# Convert signode to a specified format
info = {}
for key in DOMAIN_KEYS.get(domain, []):
value = signode.get(key)
if not value:
value = ""
info[key] = value
if not info:
continue
# This is an API example
return sphinx_linkcode_resolve(
domain=domain,
info=info,
library=f"{github_user}/{github_repo}",
source_path=github_source,
github_version=kind,
edit=True,
)
try:
domain = obj_node.get("domain")
for signode in obj_node:
if not isinstance(signode, addnodes.desc_signature):
continue
# Convert signode to a specified format
info = {}
for key in DOMAIN_KEYS.get(domain, []):
value = signode.get(key)
if not value:
value = ""
info[key] = value
if not info:
continue
# This is an API example
return sphinx_linkcode_resolve(
domain=domain,
info=info,
library=f"{github_user}/{github_repo}",
source_path=github_source,
github_version=kind,
edit=True,
)
except ValueError as e:
logging.debug(f"An error occurred: {e}") # Log the exception as debug info
return link

elif "autoapi" in pagename:
for obj_node in list(doctree.findall(addnodes.desc)):
Expand Down

0 comments on commit 4613c65

Please sign in to comment.