Skip to content

Commit

Permalink
Remove unparseable attributes from all nodes (#14780)
Browse files Browse the repository at this point in the history
In my initial pass through enabling Breathe I tried to leave a minimal footprint of external modification to the generated files. In this particular case it looks like the problematic attributes can appear in more places than I originally observed. I never observed this behavior in that PR, but I don't know if these now appear due to something that merged after #13846 or something else changing in the environment (e.g. a Sphinx or doxygen behavior etc). Nonetheless, blanket wiping these is the simpler and safer option. The docs build successfully locally with this change.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #14780
  • Loading branch information
vyasr authored Jan 18, 2024
1 parent 66c3e8e commit c0a9510
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/cudf/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ def clean_definitions(root):
# All of these in type declarations cause Breathe to choke.
# For friend, see https://github.com/breathe-doc/breathe/issues/916
strings_to_remove = ("__forceinline__", "CUDF_HOST_DEVICE", "decltype(auto)", "friend")
for field in (".//type", ".//definition"):
for type_ in root.findall(field):
if type_.text is not None:
for string in strings_to_remove:
type_.text = type_.text.replace(string, "")

for node in root.iter():
for string in strings_to_remove:
if node.text is not None:
node.text = node.text.replace(string, "")
if node.tail is not None:
node.tail = node.tail.replace(string, "")

def clean_all_xml_files(path):
for fn in glob.glob(os.path.join(path, "*.xml")):
Expand Down

0 comments on commit c0a9510

Please sign in to comment.