Skip to content

Commit

Permalink
Fix building documentation in CI (#1008)
Browse files Browse the repository at this point in the history
* Remove clang runtime packages from `documentation.yml`
* Convert `Path` to `str` where needed
* Fix `AttributeError` with `compounddefTypeSub`
  • Loading branch information
yut23 authored Jan 16, 2025
1 parent 44c1136 commit 685b3bc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install graphviz libclang1-11 libclang-cpp11
sudo apt-get install graphviz
- name: Install doxygen from SourceForge binary archives
env:
Expand Down
2 changes: 1 addition & 1 deletion breathe/parser/compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ class FileIOError(Exception):
def parse(inFilename):

try:
doc = minidom.parse(inFilename)
doc = minidom.parse(str(inFilename))
except OSError as e:
raise FileIOError(e)
except ExpatError as e:
Expand Down
2 changes: 1 addition & 1 deletion breathe/parser/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class FileIOError(Exception):

def parse(inFilename):
try:
doc = minidom.parse(inFilename)
doc = minidom.parse(str(inFilename))
except OSError as e:
raise FileIOError(e)
except ExpatError as e:
Expand Down
2 changes: 1 addition & 1 deletion breathe/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def process(
doxygen_aliases: Dict[str, str],
) -> str:
name = auto_project_info.name()
full_paths = [auto_project_info.abs_path_to_source_file(f) for f in files]
full_paths = [str(auto_project_info.abs_path_to_source_file(f)) for f in files]

options = "\n".join("%s=%s" % pair for pair in doxygen_options.items())
aliases = "\n".join(
Expand Down
5 changes: 4 additions & 1 deletion breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,10 @@ def content(contentnode):
assert isinstance(sig, addnodes.desc_signature)

# Insert the member name for use in Sphinx-generated table of contents.
member_name = node.get_name()
if node.node_type == "compounddef":
member_name = node.compoundname
else:
member_name = node.name
if obj_type == "function":
member_name += "()"
sig.attributes["_toc_name"] = member_name
Expand Down

0 comments on commit 685b3bc

Please sign in to comment.