Repository: michaeljones/breathe
Branch: main
Commit: 021d6e52e8e2
Files: 468
Total size: 1.0 MB
Directory structure:
gitextract_1kiyib7g/
├── .github/
│ ├── FUNDING.yml
│ ├── dependabot.yml
│ └── workflows/
│ ├── cache_doxygen.yml
│ ├── create-release.yml
│ ├── documentation.yml
│ ├── lint.yml
│ └── unit_tests.yml
├── .gitignore
├── .readthedocs.yaml
├── .ruff.toml
├── CHANGELOG.rst
├── CONTRIBUTING.rst
├── CONTRIBUTORS.rst
├── LICENSE
├── MANIFEST.in
├── Makefile
├── README.rst
├── breathe/
│ ├── README.rst
│ ├── __init__.py
│ ├── apidoc.py
│ ├── cpp_util.py
│ ├── directives/
│ │ ├── __init__.py
│ │ ├── class_like.py
│ │ ├── content_block.py
│ │ ├── file.py
│ │ ├── function.py
│ │ ├── index.py
│ │ ├── item.py
│ │ └── setup.py
│ ├── exception.py
│ ├── file_state_cache.py
│ ├── filetypes.py
│ ├── finder/
│ │ ├── __init__.py
│ │ ├── compound.py
│ │ ├── factory.py
│ │ └── index.py
│ ├── parser.py
│ ├── path_handler.py
│ ├── process.py
│ ├── project.py
│ └── renderer/
│ ├── __init__.py
│ ├── filter.py
│ ├── mask.py
│ ├── sphinxrenderer.py
│ └── target.py
├── breathe-apidoc.py
├── documentation/
│ ├── .gitignore
│ ├── Makefile
│ ├── compare
│ ├── environment.yaml
│ ├── make.bat
│ └── source/
│ ├── _static/
│ │ └── breathe.css
│ ├── autofile.rst
│ ├── autoindex.rst
│ ├── class.rst
│ ├── code/
│ │ ├── groups.h
│ │ ├── namespaces.h
│ │ ├── nested_list_1.h
│ │ ├── nested_list_2.h
│ │ ├── nested_list_3.h
│ │ ├── nested_list_4.h
│ │ ├── nested_list_5.h
│ │ └── nutshell.h
│ ├── codeblocks.rst
│ ├── codeguide.rst
│ ├── concept.rst
│ ├── conf.py
│ ├── contributing.rst
│ ├── credits.rst
│ ├── customcss.rst
│ ├── define.rst
│ ├── differences.rst
│ ├── directives.rst
│ ├── domains.rst
│ ├── dot_graphs.rst
│ ├── doxygen.rst
│ ├── embeddedrst.rst
│ ├── enum.rst
│ ├── enumvalue.rst
│ ├── file.rst
│ ├── function.rst
│ ├── group.rst
│ ├── groups.rst
│ ├── index.rst
│ ├── inline.rst
│ ├── latexmath.rst
│ ├── lists.rst
│ ├── markups.rst
│ ├── members.rst
│ ├── namespace.rst
│ ├── page.rst
│ ├── quickstart.rst
│ ├── readthedocs.rst
│ ├── specific.rst
│ ├── spelling_wordlist.txt
│ ├── struct.rst
│ ├── tables.rst
│ ├── template.rst
│ ├── testpages.rst
│ ├── tinyxml.rst
│ ├── typedef.rst
│ ├── union.rst
│ └── variable.rst
├── examples/
│ ├── doxygen/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── afterdoc.cfg
│ │ ├── afterdoc.h
│ │ ├── author.cfg
│ │ ├── author.cpp
│ │ ├── autolink.cfg
│ │ ├── autolink.cpp
│ │ ├── class.cfg
│ │ ├── class.h
│ │ ├── concept.cfg
│ │ ├── concept.h
│ │ ├── define.cfg
│ │ ├── define.h
│ │ ├── diagrams.cfg
│ │ ├── diagrams_a.h
│ │ ├── diagrams_b.h
│ │ ├── diagrams_c.h
│ │ ├── diagrams_d.h
│ │ ├── diagrams_e.h
│ │ ├── docstring.cfg
│ │ ├── docstring.py
│ │ ├── enum.cfg
│ │ ├── enum.h
│ │ ├── example.cfg
│ │ ├── example.cpp
│ │ ├── example_test.cpp
│ │ ├── file.cfg
│ │ ├── file.h
│ │ ├── func.cfg
│ │ ├── func.h
│ │ ├── group.cfg
│ │ ├── group.cpp
│ │ ├── include.cfg
│ │ ├── include.cpp
│ │ ├── interface.cfg
│ │ ├── interface.h
│ │ ├── jdstyle.cfg
│ │ ├── jdstyle.cpp
│ │ ├── make.bat
│ │ ├── manual.c
│ │ ├── manual.cfg
│ │ ├── memgrp.cfg
│ │ ├── memgrp.cpp
│ │ ├── overload.cfg
│ │ ├── overload.cpp
│ │ ├── page.cfg
│ │ ├── page.doc
│ │ ├── par.cfg
│ │ ├── par.cpp
│ │ ├── parblock.cfg
│ │ ├── parblock.cpp
│ │ ├── pyexample.cfg
│ │ ├── pyexample.py
│ │ ├── qtstyle.cfg
│ │ ├── qtstyle.cpp
│ │ ├── relates.cfg
│ │ ├── relates.cpp
│ │ ├── restypedef.cfg
│ │ ├── restypedef.cpp
│ │ ├── structcmd.cfg
│ │ ├── structcmd.h
│ │ ├── tag.cfg
│ │ ├── tag.cpp
│ │ ├── templ.cfg
│ │ └── templ.cpp
│ └── specific/
│ ├── .gitignore
│ ├── Makefile
│ ├── alias.cfg
│ ├── alias.h
│ ├── array.cfg
│ ├── array.h
│ ├── auto.cfg
│ ├── auto_class.h
│ ├── auto_function.h
│ ├── c_enum.cfg
│ ├── c_enum.h
│ ├── c_file.cfg
│ ├── c_file.h
│ ├── c_macro.cfg
│ ├── c_macro.h
│ ├── c_struct.cfg
│ ├── c_struct.h
│ ├── c_typedef.cfg
│ ├── c_typedef.h
│ ├── c_union.cfg
│ ├── c_union.h
│ ├── class.cfg
│ ├── class.cpp
│ ├── class.h
│ ├── code_blocks.cfg
│ ├── code_blocks.h
│ ├── cpp_anon.cfg
│ ├── cpp_anon.h
│ ├── cpp_concept.cfg
│ ├── cpp_concept.h
│ ├── cpp_constexpr_hax.cfg
│ ├── cpp_constexpr_hax.h
│ ├── cpp_enum.cfg
│ ├── cpp_enum.h
│ ├── cpp_friendclass.cfg
│ ├── cpp_friendclass.h
│ ├── cpp_function.cfg
│ ├── cpp_function.h
│ ├── cpp_function_lookup.cfg
│ ├── cpp_function_lookup.h
│ ├── cpp_inherited_members.cfg
│ ├── cpp_inherited_members.h
│ ├── cpp_ns_template_specialization.cfg
│ ├── cpp_ns_template_specialization.h
│ ├── cpp_trailing_return_type.cfg
│ ├── cpp_trailing_return_type.h
│ ├── cpp_union.cfg
│ ├── cpp_union.h
│ ├── decl_impl.cfg
│ ├── decl_impl.cpp
│ ├── decl_impl.h
│ ├── define.cfg
│ ├── define.h
│ ├── dot_graphs.cfg
│ ├── dot_graphs.h
│ ├── dotfile.dot
│ ├── enum.cfg
│ ├── enum.h
│ ├── fixedwidthfont.cfg
│ ├── fixedwidthfont.h
│ ├── functionOverload.cfg
│ ├── functionOverload.h
│ ├── group.cfg
│ ├── group.h
│ ├── headerfile.cfg
│ ├── headerfile.h
│ ├── headings.cfg
│ ├── headings.h
│ ├── image.cfg
│ ├── image.h
│ ├── inheritance.cfg
│ ├── inheritance.h
│ ├── inline.cfg
│ ├── inline.h
│ ├── interface.cfg
│ ├── interface.h
│ ├── latexmath.cfg
│ ├── latexmath.h
│ ├── links.cfg
│ ├── links.h
│ ├── lists.cfg
│ ├── lists.h
│ ├── make.bat
│ ├── membergroups.cfg
│ ├── membergroups.h
│ ├── members.cfg
│ ├── members.h
│ ├── multifile/
│ │ ├── one/
│ │ │ └── Util.h
│ │ └── two/
│ │ └── Util.h
│ ├── multifile.cfg
│ ├── name.cfg
│ ├── name.h
│ ├── namespacefile.cfg
│ ├── namespacefile.h
│ ├── nutshell.cfg
│ ├── nutshell.h
│ ├── parameters.cfg
│ ├── parameters.h
│ ├── programlisting.cfg
│ ├── programlisting.h
│ ├── programlistinginclude.txt
│ ├── qtsignalsandslots.cfg
│ ├── qtsignalsandslots.h
│ ├── rst.cfg
│ ├── rst.h
│ ├── simplesect.cfg
│ ├── simplesect.h
│ ├── struct.cfg
│ ├── struct.h
│ ├── struct_function.cfg
│ ├── struct_function.h
│ ├── tables.cfg
│ ├── tables.h
│ ├── template_class.cfg
│ ├── template_class.h
│ ├── template_class_non_type.cfg
│ ├── template_class_non_type.h
│ ├── template_function.cfg
│ ├── template_function.h
│ ├── template_specialisation.cfg
│ ├── template_specialisation.h
│ ├── template_type_alias.cfg
│ ├── template_type_alias.h
│ ├── typedef.cfg
│ ├── typedef.h
│ ├── union.cfg
│ ├── union.h
│ ├── userdefined.cfg
│ ├── userdefined.h
│ ├── using_in_ns.cfg
│ ├── using_in_ns.h
│ ├── xrefsect.cfg
│ └── xrefsect.h
├── make.bat
├── pyproject.toml
├── scripts/
│ ├── doxygen_cache.py
│ └── generate_tests_results.py
├── tests/
│ ├── conftest.py
│ ├── data/
│ │ ├── arange.xml
│ │ ├── auto/
│ │ │ ├── auto_class.h
│ │ │ ├── auto_function.h
│ │ │ ├── compare.xml
│ │ │ └── input.rst
│ │ ├── classSample.xml
│ │ ├── docutils.css
│ │ ├── ellipsis.xml
│ │ ├── examples/
│ │ │ ├── README.rst
│ │ │ ├── doxyfile_template
│ │ │ ├── test_alias/
│ │ │ │ ├── alias.h
│ │ │ │ ├── compare.xml
│ │ │ │ ├── extra_dox_opts.txt
│ │ │ │ └── input.rst
│ │ │ ├── test_array/
│ │ │ │ ├── array.h
│ │ │ │ ├── compare.xml
│ │ │ │ └── input.rst
│ │ │ ├── test_c_enum/
│ │ │ │ ├── c_enum.h
│ │ │ │ ├── compare.xml
│ │ │ │ └── input.rst
│ │ │ ├── test_c_file/
│ │ │ │ ├── c_file.h
│ │ │ │ ├── compare.xml
│ │ │ │ └── input.rst
│ │ │ ├── test_class/
│ │ │ │ ├── class.cpp
│ │ │ │ ├── class.h
│ │ │ │ ├── compare.xml
│ │ │ │ └── input.rst
│ │ │ ├── test_code_blocks/
│ │ │ │ ├── code_blocks.h
│ │ │ │ ├── compare.xml
│ │ │ │ └── input.rst
│ │ │ ├── test_cpp_concept/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── cpp_concept.h
│ │ │ │ └── input.rst
│ │ │ ├── test_cpp_enum/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── cpp_enum.h
│ │ │ │ └── input.rst
│ │ │ ├── test_cpp_friendclass/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── cpp_friendclass.h
│ │ │ │ └── input.rst
│ │ │ ├── test_cpp_function/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── cpp_function.h
│ │ │ │ └── input.rst
│ │ │ ├── test_cpp_inherited_members/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── cpp_inherited_members.h
│ │ │ │ ├── extra_dox_opts.txt
│ │ │ │ └── input.rst
│ │ │ ├── test_cpp_trailing_return_type/
│ │ │ │ ├── compare-1.11.0.xml
│ │ │ │ ├── compare.xml
│ │ │ │ ├── cpp_trailing_return_type.h
│ │ │ │ └── input.rst
│ │ │ ├── test_define/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── define.h
│ │ │ │ └── input.rst
│ │ │ ├── test_diagrams/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── diagrams_a.h
│ │ │ │ ├── diagrams_b.h
│ │ │ │ ├── diagrams_c.h
│ │ │ │ ├── diagrams_d.h
│ │ │ │ ├── diagrams_e.h
│ │ │ │ ├── extra_dox_opts.txt
│ │ │ │ └── input.rst
│ │ │ ├── test_dot_graphs/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── dot_graphs.h
│ │ │ │ ├── dotfile.dot
│ │ │ │ └── input.rst
│ │ │ ├── test_group/
│ │ │ │ ├── compare-1.10.0.xml
│ │ │ │ ├── compare.xml
│ │ │ │ ├── group.h
│ │ │ │ └── input.rst
│ │ │ ├── test_group_content_only/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── group_content_only.hpp
│ │ │ │ └── input.rst
│ │ │ ├── test_group_member_ref/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── group.cpp
│ │ │ │ └── input.rst
│ │ │ ├── test_headings/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── extra_dox_opts.txt
│ │ │ │ ├── headings.h
│ │ │ │ └── input.rst
│ │ │ ├── test_html_entities/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── entities.h
│ │ │ │ └── input.rst
│ │ │ ├── test_image/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── image.h
│ │ │ │ └── input.rst
│ │ │ ├── test_inheritance/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── inheritance.h
│ │ │ │ └── input.rst
│ │ │ ├── test_inline/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── inline.h
│ │ │ │ └── input.rst
│ │ │ ├── test_latexmath/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── latexmath.h
│ │ │ ├── test_links/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── links.h
│ │ │ ├── test_lists/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── lists.h
│ │ │ ├── test_membergroups/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── membergroups.h
│ │ │ ├── test_param_dirs/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── param_dirs.h
│ │ │ ├── test_qtsignalsandslots/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── qtsignalsandslots.h
│ │ │ ├── test_rst/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── rst.h
│ │ │ ├── test_simplesect/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── simplesect.h
│ │ │ ├── test_tables/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── tables.h
│ │ │ ├── test_template_class_non_type/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── template_class_non_type.h
│ │ │ ├── test_template_function/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── template_function.h
│ │ │ ├── test_template_type_alias/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── template_type_alias.h
│ │ │ ├── test_union/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── union.h
│ │ │ ├── test_userdefined/
│ │ │ │ ├── compare.xml
│ │ │ │ ├── input.rst
│ │ │ │ └── userdefined.h
│ │ │ └── test_xrefsect/
│ │ │ ├── compare.xml
│ │ │ ├── extra_dox_opts.txt
│ │ │ ├── input.rst
│ │ │ └── xrefsect.h
│ │ └── multi_project/
│ │ ├── A/
│ │ │ └── stuff.h
│ │ ├── B/
│ │ │ └── stuff.h
│ │ ├── C/
│ │ │ └── stuff.h
│ │ ├── compare.xml
│ │ └── input.rst
│ ├── runtests.sh
│ ├── test_examples.py
│ ├── test_filters.py
│ ├── test_parser.py
│ ├── test_renderer.py
│ ├── test_utils.py
│ └── warnings/
│ ├── Makefile
│ ├── make.bat
│ └── source/
│ ├── class.rst
│ ├── conf.py
│ ├── define.rst
│ ├── function.rst
│ ├── group.rst
│ └── index.rst
└── xml_parser_generator/
├── make_parser.py
├── module_template.py.in
├── schema.json
├── setuptools_builder.py
└── stubs_template.pyi.in
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: breathe-doc
patreon: # Replace with a single Patreon username
open_collective: breathe
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
================================================
FILE: .github/workflows/cache_doxygen.yml
================================================
name: download and cache Doxygen
on:
workflow_call
jobs:
install:
runs-on: ubuntu-latest
concurrency:
group: linux-doxygen-${{ matrix.doxygen-version }}-cache
strategy:
fail-fast: false
matrix:
doxygen-version: ['1.9.4', '1.9.7']
steps:
- uses: actions/cache/restore@v4
id: cache-doxygen
with:
path: doxygen-bin-arc
key: ${{ runner.os }}-doxygen-${{ matrix.doxygen-version }}
lookup-only: true
restore-keys: |
${{ runner.os }}-doxygen-
# TODO: Change to using github release downloads if possible
- name: download Doxygen from SF binary archives
if: steps.cache-doxygen.outputs.cache-hit != 'true'
run: |
mkdir doxygen-bin-arc && cd doxygen-bin-arc
curl -L https://sourceforge.net/projects/doxygen/files/rel-${{ matrix.doxygen-version }}/doxygen-${{ matrix.doxygen-version }}.linux.bin.tar.gz > doxygen.tar.gz
- uses: actions/cache/save@v4
if: steps.cache-doxygen.outputs.cache-hit != 'true'
with:
path: doxygen-bin-arc
key: ${{ steps.cache-doxygen.outputs.cache-primary-key }}
================================================
FILE: .github/workflows/create-release.yml
================================================
name: Create release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FORCE_COLOR: "1"
UV_SYSTEM_PYTHON: "1" # make uv do global installs
jobs:
publish-pypi:
runs-on: ubuntu-latest
name: PyPI Release
environment: release
if: github.repository_owner == 'breathe-doc'
permissions:
id-token: write # for PyPI trusted publishing
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: latest
enable-cache: false
- name: Install Ruff
uses: astral-sh/ruff-action@v3
with:
args: --version
version: 0.9.2
- name: Install build dependencies (pypa/build, twine)
# Install jinja2 to make the parser - probably better to install it via
# the Sphinx dependency in the pyproject.toml file but I don't know how
# to do that at the moment
run: uv pip install build "twine>=5.1" "jinja2>=3.1.6" setuptools
- name: Generate parser
run: |
make parser
make format-parser
- name: Build distribution
run: python -m build
- name: Check distribution
run: |
twine check --strict dist/*
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
================================================
FILE: .github/workflows/documentation.yml
================================================
name: Build documentation
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
DOXYGEN_VERSION: 1.9.4
FORCE_COLOR: "1"
jobs:
cache-doxygen:
uses: ./.github/workflows/cache_doxygen.yml
build:
needs: cache-doxygen
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3"
cache: 'pip'
- name: Install apt dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install graphviz
- uses: actions/cache/restore@v4
id: cache-doxygen
with:
path: doxygen-bin-arc
fail-on-cache-miss: true
key: ${{ runner.os }}-doxygen-${{ env.DOXYGEN_VERSION }}
- name: Install doxygen
# at some point actions/cache/restore@4 started unpacking doxygen.tar.gz
# automatically and I don't know why -- Rouslan
run: |
cd doxygen-bin-arc
if test -d doxygen; then
cd doxygen
else
gunzip doxygen.tar.gz
tar xf doxygen.tar
cd doxygen-${{ env.DOXYGEN_VERSION }}
fi
sudo make install
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --editable .[build]
python -m pip install .[docs]
# Remove the version of breathe that is automatically installed by the previous commands
# as it confuses the build. This build should pick up breathe from the repo source
python -m pip uninstall --yes breathe
- name: Build the documentation
run: |
make parser
make html
rm documentation/build/html/.buildinfo
- uses: actions/upload-artifact@v5
with:
name: docs build artifacts
path: |
documentation/build/html
examples/*/*/xml
================================================
FILE: .github/workflows/lint.yml
================================================
name: Lint source code
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FORCE_COLOR: "1"
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install Ruff
uses: astral-sh/ruff-action@v3
with:
args: --version
version: 0.9.2
- name: Install dependencies
# "--editable" is needed so that _parser.py is placed in the local folder
# where pytest will import from
run: |
python -m pip install --upgrade pip
python -m pip install --editable ".[build]"
- name: Generate parser
run: |
make parser
make format-parser
- name: Lint with Ruff
run: ruff check --output-format=github
- name: Format with Ruff
run: ruff format --diff
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3"
- name: Install dependencies
# "--editable" is needed so that _parser.py is placed in the local folder
# where pytest will import from
run: |
python -m pip install --upgrade pip
python -m pip install --editable ".[build]"
python -m pip install --editable ".[lint]"
- name: Generate parser
run: make parser
- name: Type check with mypy
run: mypy --warn-redundant-casts --warn-unused-ignores breathe tests
twine:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3"
- name: Install dependencies
# "--editable" is needed so that _parser.py is placed in the local folder
# where pytest will import from
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade twine build
python -m pip install --editable ".[build]"
- name: Generate parser
run: make parser
- name: Lint with twine
run: |
python -m build .
twine check dist/*
================================================
FILE: .github/workflows/unit_tests.yml
================================================
name: Tests
on:
pull_request:
paths:
- ".github/workflows/unit_tests.yml"
- "breathe/**"
- "tests/**"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FORCE_COLOR: "1"
PYTHONDEVMODE: "1" # -X dev
PYTHONWARNDEFAULTENCODING: "1" # -X warn_default_encoding
jobs:
cache-doxygen:
uses: ./.github/workflows/cache_doxygen.yml
test:
needs: cache-doxygen
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
doxygen-version:
- '1.9.4'
- '1.9.7'
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
sphinx-version:
- '6.2'
- '7.0'
- '7.1'
- '7.2' # Ubuntu 24.04
# version 7.3 broke up the domain modules into packages, changing
# where some classes had to be imported from
- '7.3'
- '7.4' # Ubuntu 24.10
- '8.0'
- '8.1' # Ubuntu 25.04
- '8.2' # Ubuntu 25.04
exclude:
- python-version: '3.9'
sphinx-version: '8.0'
- python-version: '3.9'
sphinx-version: '8.1'
- python-version: '3.9'
sphinx-version: '8.2'
- python-version: '3.9'
sphinx-version: 'latest'
- python-version: '3.10'
sphinx-version: '8.2'
- python-version: '3.10'
sphinx-version: 'latest'
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Sphinx ${{ matrix.sphinx-version }}
if: matrix.sphinx-version != 'latest'
run: |
python -m pip install -Iv Sphinx==${{ matrix.sphinx-version }}
- name: Install Sphinx master
if: matrix.sphinx-version == 'latest'
run: |
python -m pip install "Sphinx @ git+https://github.com/sphinx-doc/sphinx.git@master"
- uses: actions/cache/restore@v4
id: cache-doxygen
with:
path: doxygen-bin-arc
fail-on-cache-miss: true
key: ${{ runner.os }}-doxygen-${{ matrix.doxygen-version }}
- name: Install doxygen
# at some point actions/cache/restore@4 started unpacking doxygen.tar.gz
# automatically and I don't know why -- Rouslan
run: |
cd doxygen-bin-arc
if test -d doxygen; then
cd doxygen
else
gunzip doxygen.tar.gz
tar xf doxygen.tar
cd doxygen-${{ matrix.doxygen-version }}
fi
sudo make install
- name: Install dependencies
# "--editable" is needed so that _parser.py is placed in the local
# folder where pytest will import from
run: |
pip install --upgrade pip
pip install --editable .[build]
pip install --editable .[test]
- name: Generate parser
run: |
make parser
- name: Test with pytest
if: matrix.sphinx-version != 'latest'
run: python -m pytest -vv
env:
PYTHONWARNINGS: "error" # treat all warnings as errors
- name: Test with pytest
if: matrix.sphinx-version == 'latest'
run: python -m pytest -vv
================================================
FILE: .gitignore
================================================
*.pyc
/.project
/.pydevproject
build/
/dist
/breathe.egg-info
/.mypy_cache
# Folder for placing stuff to be ignored
/ignored
# My virtual env folder
/python-2.7.4
# Test folder for building simple examples of the documentation
/simple
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
## Directory-based project format
.idea/
# if you remove the above rule, at least ignore user-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# and these sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
## File-based project format
*.ipr
*.iws
*.iml
## Additional for IntelliJ
out/
# generated by mpeltonen/sbt-idea plugin
.idea_modules/
# generated by JIRA plugin
atlassian-ide-plugin.xml
# generated by Crashlytics plugin (for Android Studio and Intellij)
com_crashlytics_export_strings.xml
# modified by build process
examples/doxygen/example.tag
examples/specific/dot_graphs/xml/dotfile.dot
# generated in editable install
/breathe/_parser.py
================================================
FILE: .readthedocs.yaml
================================================
version: 2
python:
version: 3
sphinx:
builder: html
configuration: documentation/source/conf.py
fail_on_warning: false
conda:
environment: documentation/environment.yaml
================================================
FILE: .ruff.toml
================================================
target-version = "py39" # Pin Ruff to Python 3.9
line-length = 100
output-format = "full"
[format]
preview = true
quote-style = "double"
[lint]
preview = true
ignore = [
"UP031", # Use format specifiers instead of percent format
]
select = [
"C4", # flake8-comprehensions
# "B", # flake8-bugbear
# "D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"LOG", # flake8-logging
# "N", # pep8-naming
"PERF", # perflint
"PGH", # pygrep-hooks
"PT", # flake8-pytest-style
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle
]
[lint.per-file-ignores]
"breathe/parser/{compound,index}super.py" = [
"E266", # Too many leading `#` before block comment
]
"examples/doxygen/pyexample.py" = [
"E266", # Too many leading `#` before block comment
]
[lint.flake8-quotes]
inline-quotes = "double"
[lint.flake8-type-checking]
exempt-modules = []
strict = true
[lint.flake8-tidy-imports]
ban-relative-imports = "all"
[lint.isort]
forced-separate = [
"tests",
]
required-imports = [
"from __future__ import annotations",
]
[lint.pydocstyle]
convention = "pep257"
ignore-decorators = ["typing.overload"]
ignore-var-parameters = true
================================================
FILE: CHANGELOG.rst
================================================
Change Log
----------
Inspired by `Keepachangelog.com `__.
- 2025-07-08 - **Breathe v5.0.0a5**
Adjust create-release process to include ruff for formatting generated ``_parser.py`` file.
- 2025-07-08 - **Breathe v5.0.0a4**
Adjust create-release process to try to generate ``_parser.py`` file.
- 2025-07-08 - **Breathe v5.0.0a3**
Adjust create-release process to try to generate ``_parser.py`` file.
- 2025-07-08 - **Breathe v5.0.0a2**
- Removed sphinx_csharp git-based dependency
`#1035 `__
- 2025-07-08 - **Breathe v5.0.0a1**
Alpha release of v5. Contains a significant refactor of the internal logic.
Thanks to @JasperCraeghs and @Rouslan.
- Merging long standing refactor branches
`#1029 `__
- Performance improvements, new tests, more typing annotations and miscellaneous fixes
`#967 `__
- Support members in a Doxygen 1.9.7 group
`#934 `__
- Fix docstring missing quotes
`#1020 `__
- Fix docstring missing quotes
`#1020 `__
- Fix some incorrect indents in the document
`#1032 `__
- Enable imgconverter extension to fix LaTeX documentation build
`#1027 `__
- Bump astral-sh/setup-uv from 5 to 6 in the github-actions group
`#1025 `__
- 2025-02-22 - **Breathe v4.36.0**
- Update `test_renderer` so that tests pass with Sphinx 7.2.
`#976 `__
- Fix PosixPath issue with Sphinx 7.2.
`#964 `__
- Avoid `RemovedInSphinx80Warning` in path-manipulation code.
`#977 `__
- Require Sphinx 7.2 or later, Python 3.9 or later,
and Doxygen 1.9.2 or later.
`#887 `__,
`#946 `__
`#955 `__
- Begin to use pathlib.
- Resolve full title for doxygenpage and doxygengroup
and allow for omitting the title all together
`#939 `__
- Insert signature name for use with Sphinx Table of Contents
`#959 `__
- Fix test failure with latest Sphinx master.
`#1010 `__
- Fix error in template specialization with qualified arguments
`#1010 `__
- 2023-02-28 - **Breathe v4.35.0**
- Pull lone literal blocks in paragraphs up to produce correct doctree.
`#833 `__
- Fix tests for changes in Sphinx 5.3.
`#865 `__
- Bump Python requirement to 3.7.
`#866 `__
- Support Sphinx 6.
`#885 `__
- Support ``:sort:`` option to sort sections by name.
`#879 `__
- 2022-06-20 - **Breathe v4.34.0**
- Treat .unparsed as plain text.
`#806 `__
- Remove unneeded type: ignore annotations.
`#813 `__
- Fix internal ``NodeFinder`` visitor for when non-Docutils nodes are
present in the content of a directive.
`#812 `__
- Rename lint workflow.
`#814 `__
- Type check pygments and limit docutils stub version.
`#819 `__
- Convert dot files' relative path to absolute.
`#821 `__
- CI, update Sphinx versions to test.
`#834 `__
- CI, update for Sphinx 5.0.1.
`#846 `__
- Fix inconsistency in example.
`#843 `__
- Fix C# enum rendering crash.
`#849 `__
- Drop Sphinx 3 support, add Sphinx 5 support.
`#850 `__
- CICD: Disable python 3.6 for Sphinx master tests.
`#853 `__
- Populate default include text-node's data field instead of raw-source.
`#828 `__
- 2022-02-14 - **Breathe v4.33.1**
- Avoid warning about multiple graphviz directives.
`#804 `__
- 2022-02-14 - **Breathe v4.33.0**
- Fix duplicate ``static`` in variable declarations.
`#794 `__
- Update CICD for Sphinx 4.4.0 series.
`#795 `__
- Pin version of black in CICD and reformat files.
`#792 `__
- Fix code block highlighting.
`#760 `__
- Refactoring, cleanup and typing improvements.
`#802 `__
- Doxygen dot graphs to Sphinx graphviz.
`#757 `__
- Support externally hosted images.
`#705 `__
- Address a peculiarity in Doxygen aliases in doc.
`#770 `__
- Add flag to doxygengroup, doxygennamespace to display only the description.
`#718 `__
- Add support for MD block quotes with attribution(s).
`#759 `__
- 2022-01-30 - **Breathe v4.32.0**
- Added ``breathe_doxygen_aliases`` config variable.
`#729 `__
- Render ``\remark``/``\remarks`` and ``\see``/``\sa`` using Sphinx/Docutils
admonition style nodes.
`#756 `__
- Render C++ scoped enums differently than unscoped enums, and with their
underlying type.
`#753 `__
- Render ``\retval`` lists using dedicated field list when Sphinx >= 4.3 is
used.
`#749 `__
- Make ``.. doxygenfunction`` handle function template specializations.
`#750 `__
- Properly handle field-lists and admonitions in the detailed description of
classes and functions.
`#764 `__
- Add ``:confval:`breathe_show_include``` to control whether ``#include``
lines are shown. Defaults to ``True``.
`#725 `__
- Fix sys.path adjustment in doc config.
`#734 `__
- Fix sphinx renderer variable and function visitors for C#.
`#737 `__
- Fix sphinx renderer class visitor for C#.
`#738 `__
- Auto-format python code with black.
`#743 `__
- Extend flake8 and address some style issues.
`#745 `__
- Fix black formatting warning.
`#747 `__
- Update Sphinx and Python versions tested against.
`#765 `__
- Fix friend functions for older Doxygen versions.
`#769 `__
- Doxygen >= 1.9.2 supports C++20 concepts, add support for them.
`#779 `__
- Change the way directives are added to adhere to the interface,
e.g., avoiding myst-parser to crash.
`#780 `__
- Improved list of included files (with cross-references for local includes).
`#763 `__
- Update flake8 and mypy related stuff.
`#781 `__
- Update readme with logo and sponsorship info.
`#784 `__
- Store version number in both setup.py and __init__.py.
`#789 `__
- CICD: lint: continue with other jobs if black fails.
`#791 `__
- 2021-09-14 - **Breathe v4.31.0**
- Collapse multiple retvals into a single bullet list. `#697 `__
- Fix mypy issues on CI. `#731 `__
- Print usage message from 'compare' doc script. `#727 `__
- Test against Sphinx 4.0.3, 4.1.2 and 4.1.x branch. `#721 `__
- Fix duplicate ``static`` in function declarations. `#717 `__ `#720 `__
- Directive refactoring. `#698 `__
- Handle parsing errors. `#711 `__
- Make doxygenfunction more robust when matching parameters. `#722 `__ `#723 `__
- Separate, link and style the changelog. `#735 `__
- Update changelog and readme ahead of release. `#739 `__
- CICD: Track Sphinx 4.2.x development series. `#741 `__
- 2021-05-06 - **Breathe v4.30.0**
- Fix retval rendering. `#687 `__
- Correctly label example as C. `#690 `__
- apidoc: add -m, --members option flag. `#694 `__
- 2021-04-30 - **Breathe v4.29.2**
- Remove stale six dep. `#682 `__
- Render fields with multiple names instead of crashing. `#685 `__
- Start pytest via module instead of exe. `#686 `__
- 2021-04-23 - **Breathe v4.29.1**
- Splice out parameter direction in field lists. `#675 `__
- Fixes for Sphinx v4. `#676 `__
- Fix paragraph in paragraph rendering. `#678 `__
- Strip names before lookup in doxygenfunction. `#679 `__
- When rendering template params, insert name by parsing. `#681 `__
- 2021-04-09 - **Breathe v4.29.0**
- Do not add inline modifier for C#. `#668 `__
- Use add_css_file instead of deprecated/removed add_stylesheet. `#669 `__
- Use native docutils for field lists, notes, and warnings. `#670 `__
- Handle directives returning no nodes on error. `#672 `__
- 2021-03-29 - **Breathe v4.28.0**
- Code and documentation for membergroups and members-only options. `#637 `__
- Add example.tag to gitignore as it gets modified during build process. `#644 `__
- Add support for content-only flag when rendering pages. `#645 `__
- When rendering a section, add target after title. `#647 `__
- Render pages content in order. `#651 `__
- Adds an ID to the rubric created for each section of a group. `#658 `__
- Add missing getter and setter for C#. `#661 `__
- Add support for rowspan/colspan to tables. `#642 `__
- 2021-02-16 - **Breathe v4.27.0**
- Add various specifiers to functions and variables. `#628 `__
- Add multiply inherited class for PHP objects. `#630 `__
- Initial support for table rendering. `#632 `__
- Add rendering of \section, \subsection and \subsubsection. `#635 `__
- Sphinx 3.5 compatibility. `#640 `__
- Fix linking to sections. `#639 `__
- Add table examples to documentation. `#638 `__
- 2021-01-21 - **Breathe v4.26.1**
- Fix doxygenfile causing duplicate IDs for unspecified sections. `#622 `__
- Fixes for doxygenfunction (friend keyword, friend class, arg checks). `#623 `__
- 2021-01-08 - **Breathe v4.26.0**
- Add test for ellipsis ('...') in args. `#610 `__
- Sphinx 3.4.x compatibility. `#617 `__
- Adapt friendclass to Doxygen 1.9. `#618 `__
- 2020-12-16 - **Breathe v4.25.1**
- Addendum to #606, for functions with '...'. `#609 `__
- 2020-12-15 - **Breathe v4.25.0**
- Add support for \parblock parsing and rendering. `#603 `__
- Allow lookup in doxygenfunction without writing param names. `#606 `__
- 2020-12-01 - **Breathe v4.24.1**
- Fix anchors on pages generated by Doxygen >= 1.8.17. `#602 `__
- 2020-11-15 - **Breathe v4.24.0**
- Update CI for Sphinx 3.3.x and fix test mock. `#597 `__
- Add support for xrefitem based page generation (doxygenpage). `#596 `__
- 2020-10-20 - **Breathe v4.23.0**
- Add initial xrefsect support. `#589 `__
- 2020-09-26 - **Breathe v4.22.1**
- Fix anonymous struct/union usage in C domain. `#585 `__
- 2020-09-19 - **Breathe v4.22.0**
- Fix Read the Docs build (again). `#576 `__
- New boolean `breathe_show_enumvalue_initializer` option specifying
whether value of enumvalue should be displayed. `#581 `__
- 2020-09-10 - **Breathe v4.21.0**
- Fix Read the Docs build. `#567 `__
- Document doxygenclass template specialisation spacing. `#570 `__
- Update upper Sphinx release to <3.4. `#571 `__
- Reuse breathe.__version__ in setup.py. `#572 `__
- Document :inner: for the doxygengroup section. `#573 `__
- Add support for verbatim inline elements. `#560 `__
- Fix wrong refid when Doxygen SEPARATE_MEMBER_PAGES is YES. `#566 `__
- 2020-08-19 - **Breathe v4.20.0**
- Allow Sphinx 3.2. `#561 `__
- Update CI scripts with new Sphinx versions. `#552 `__
- Add support for C# using sphinx-csharp. `#550 `__
- Doc, fix typo, :source: -> :project:. `#551 `__
- Add support for innergroup. `#556 `__
- Avoid duplicate doxygen targets when debug tracing. `#563 `__
- Remove Travis badge from README file. `#564 `__
- 2020-06-17 - **Breathe v4.19.2**
- Fix crash when visiting typedef. `#547 `__
- 2020-06-08 - **Breathe v4.19.1**
- Mark package as compatible with Sphinx 3.1.
- 2020-06-07 - **Breathe v4.19.0**
- Refactoring. `#528 `__
- Make debug config variables available in conf.py. `#533 `__
- Fix warning formatting for function lookup. `#535 `__
- Correctly reverse nested namespaces in get_qualification. `#540 `__
- 2020-05-10 - **Breathe v4.18.1**
- Fix friend class rendering and allow friend struct. `#522 `__
- Add extern examples to doc and remove variable hack. `#526 `__
- Render function candidates without using Sphinx directives. `#524 `__
- 2020-05-02 - **Breathe v4.18.0**
- Support tiles in verbatim blocks. `#517 `__
- 2020-05-01 - **Breathe v4.17.0**
- Scoped rendering, better integration with Sphinx, misc fixes. `#512 `__
- 2020-04-19 - **Breathe v4.16.0**
- Strictly depend on Sphinx's minor version. `#498 `__
- Simplifications and fixes, use more of modern Sphinx natively. `#503 `__
- Add section option to the doxygen(auto)file directive. `#501 `__
- Fix link generation when enum is inside a group (enum FQDN). `#508 `__
- Fix creation of LaTeX math formulas. `#506 `__
- Improve documentation for doxygen(auto)file section option. `#509 `__
- 2020-04-07 - **Breathe v4.15.0**
- Add license file to distribution. `#492 `__
- Update for Sphinx 3. `#491 `__
- 2020-04-07 - **Breathe v4.14.2**
- Add GitHub actions. `#474 `__
- Fixes to use Sphinx 2.4.4. `#486 `__
- Add nose to python development requirements. #484.
- Switch to pytest from nose. `#487 `__
- 2020-02-02 - **Breathe v4.14.1**
- Use sphinx core instead of mathbase ext. `#469 `__
- Fix test failure for Sphinx >= 2.2.2. `#472 `__
- Update travis to Sphinx 2.3.1. `#471 `__
- 2019-11-26 - **Breathe v4.14.0**
- Add events attribute to MockApp. `#452 `__
- Add bit field support for C/C++. `#454 `__
- Add alias and variable template support. `#461 `__
- 2019-08-01 - **Breathe v4.13.1**
- Fix for template method pointer parameter issue. `#449 `__
- 2019-04-23 - **Breathe v4.13.0**.post0
- Drop support for python 2, require Sphinx >= 2.0. `#432 `__
- 2019-04-21 - **Breathe v4.13.0**
- Adapt to upcoming Sphinx 2.0. `#411 `__
- Add support for rendering parameter direction information. `#428 `__
- 2019-03-15 - **Breathe v4.12.0**
- Adapt to Sphinx 1.8. `#410 `__
- Let Sphinx handle more things. `#412 `__
- Use standard windows EOL for batch file. `#417 `__
- Fix flake8 F632 warnings. `#418 `__
- Update dep versions in readme, setup, requirements. `#419 `__
- Add option to render function parameters after the description. `#421 `__
- Remove spurious "typedef" in type declaration when using "using". `#424 `__
- 2018-12-11 - **Breathe v4.11.1**
- Sphinxrenderer: handle typeless parameters gracefully. `#404 `__
- 2018-10-31 - **Breathe v4.11.0**
- Fix typo in quickstart. `#393 `__
- Add support for QtSignals. `#401 `__
- 2018-08-07 - **Breathe v4.10.0**
- Explicitly use Sphinx 1.7.5 for CI and dev. `#385 `__
- Print filename when printing ParserException. `#390 `__
- 2018-06-03 - **Breathe v4.9.1**
- Don't append separator for paragraph type. `#382 `__
- 2018-06-01 - **Breathe v4.9.0**
- Render newlines as separate paragraphs. `#380 `__
- 2018-05-26 - **Breathe v4.8.0**
- Add quiet option to apidoc. `#375 `__
- Add PHP domain. `#351 `__
- Keep templates on adjacent lines. `#300 `__
- Show reference qualification for methods. `#332 `__
- Adapt tests/CI to newest Sphinx version. `#377 `__
- More robust name regex in renderer. `#370 `__
- Show base classes using Sphinx's cpp domain. `#295 `__
- Fix domain detection when rendering groups. `#365 `__
- Return parallel_{read,write}_safe true for Sphinx's -j. `#376 `__
- 2017-10-09 - **Breathe v4.7.3**
- Support for enums in the cpp domain.
- Handle case where compoundref does not have a refid value associated.
- 2017-08-15 - **Breathe v4.7.2**
- Fix issue with packaging on Python 2.7 with wheels.
- 2017-08-13 - **Breathe v4.7.1**
- Fixed bug regarding code snippets inside Doxygen comments.
- 2017-08-09 - **Breathe v4.7.0**
- New `outtypes` option to prevent documenting namespace and files
- New boolean `breathe_show_define_initializer` option specifying whether
value of macros should be displayed.
- New boolean `breathe_use_project_refids` option controlling whether the
refids generated by breathe for doxygen elements contain the project name
or not.
- Fixed
- Support for Sphinx 1.6
- 2017-02-25 - **Breathe v4.6.0**
- Support for the Interface directive
- Display the contents of defines
- 2017-02-12 - **Breathe v4.5.0**
- Improve handling of c typedefs
- Support new `desc_signature_line` node
- Add `--project` flag to breathe-apidoc helper
- Dropped testing for Python 3.3 and added 3.6
- 2016-11-13 - **Breathe v4.4.0**
- Improve single line parameter documentation rendering
- 2016-11-05 - **Breathe v4.3.1**
- Version bump package confusion with wheel release
- 2016-11-05 - **Breathe v4.3.0**
- Rewritten rendering approach to use the visitor pattern
- Dropped support for 2.6 & added testing for 3.5
- Fixed
- Issue with running breathe-apidoc for the first time.
- Improved handling of qualifiers, eg. const & volatile.
- Supports functions in structs
- Supports auto-doxygen code path on Windows
- 2016-03-19 - **Breathe v4.2.0**
- Added
- Output links to a class' parents & children.
- Support for Sphinx's `needs_extensions` config option.
- breathe-apidoc script for generating ReStructuredText stub files with
Breathe directives from doxygen xml files.
- Fixed
- Handling default values in parameter declarations
- Output order not being reproducible due to iteration over Set.
- Handling of multiple pointers and references
- `SEVERE: Duplicate ID` warnings when using function overloads.
- Use project name for link references when using default project. So we use
the project name instead of 'project0'.
- 2015-08-27 - **Breathe v4.1.0**
- Added
- ``breathe_doxygen_config_options`` config variable which allows for adding
more config lines to the doxygen file used for the auto-directives.
- Fixed
- Display of array & array reference parameters for functions.
- Handling of links to classes with template arguments.
- Handling of unnamed enums in C.
- Naming of template parameter section.
- Finding functions that are within groups.
- Rendering of 'typename' and 'class' keywords for templates.
- 2015-04-02 - **Breathe v4.0.0**
- Significant work on the code base with miminal reStructureText interface
changes. To be documented.
- 2014-11-09 - **Breathe v3.2.0**
- Nothing Added, Deprecated or Removed
- Fixed
- Changed docutils/Sphinx node usage to fix latex/pdf output.
- When checking for path separators check for both ``/`` and ``\``
regardless of the platform.
- ``KeyError`` when using ``auto`` directives without specifying the
``:project:`` option even though the default project config setting was
set.
- Use of ``doxygenfunction`` no longer inappropriately triggers the
duplicate target check and fails to output link targets.
- Support for inline urls in the doxygen comments.
- Support for array notation in function parameters.
- Reduced intention by changing ``section-defs`` to use ``container`` &
``rubric`` nodes rather than ``desc`` nodes with signatures & content. Now
headings like 'Public Functions' appear inline with their subject matter.
- 2014-09-07 - **Breathe v3.1.0**
- Nothing Deprecated or Removed
- Added
- The ``doxygenclass`` directive can now reference template specialisations
by specifying the specialisation in the argument name.
- Fixed
- Displaying function parameters for Qt slots output. Previously they were
missing even though Qt Slots are essentially just functions.
- Displaying headings from doxygen comments as emphasized text.
- Crash when generating warning about being unable to find a define,
variable, enum, typedef or union.
- Only output the definition name for a function parameter if the declartion
name is not available. Previously, where they were both available we were
getting two names next to each other for no good reason.
- 2014-08-04 - **Breathe v3.0.0**
- Improve output of const, volatile, virtual and pure-virtual keywords.
- Fix css class output for HTML so that object types rather than names are
output as the css classes. eg. 'function' instead of 'myFunction'.
- Fix issue with Breathe getting confused over functions appearing in header
and implementation files.
- Improve matching for overloaded functions when using ``doxygenfunction``
directive. Also, provide a list of potential matches when no match is found.
- Improved ``:members:`` implementation to handle inner classes properly.
- Updated ``doxygenstruct`` to share the ``doxygenclass`` implementation path
which grants it the options from ``doxygenclass`` directive.
- Added ``:outline:`` option support to ``doxygengroup`` &
``doxygennamespace`` directives.
- Added ``doxygennamespace`` directive.
- Added ``:undoc-members:`` option to ``doxygenclass`` & ``doxygengroup``
directives.
- **Breaking change**: Removed ``:sections:`` option for ``doxygenclass`` &
``doxygengroup`` directives and replaced it with ``:members:``,
``:protected-members:`` and ``:private-members:``, and changed
``breathe_default_sections`` config variable to ``breathe_default_members``.
This is designed to more closely match the Sphinx autodoc functionality and
interface.
- 2014-06-15 - **Breathe v2.0.0**
- Add compare script for checking changes to documentation caused by changes
in the implementation.
- Switched to ``https`` reference for MathJax Javascript.
- **Breaking change**: Change ``autodoxygen*`` directives to require
explicitly declared source files in the ``conf.py`` rather than attempting
to detect them from the directive arguments.
- Switch documentation hosting to ReadTheDocs.org.
- **Breaking change**: Switch to assuming all relative paths are relative to
the directory holding the ``conf.py`` file. Previously, it would assume they
were relative to the user's current working directory. This breaks projects
which use separate build & source directories.
- Add ``doxygenunion`` directive.
- Add ``doxygengroup`` directive.
- Add support for lists in the output. They were previously ignored.
- Updated implementation to use the docutils nodes that Sphinx does where
possible.
- 2014-06-01 - **Breathe v1.2.0**
- Change log not recorded.
================================================
FILE: CONTRIBUTING.rst
================================================
Contributing
============
Firstly, thank you for making it this far. We really appreciate anyone who even
thinks about reporting an issue or helping out with the code or docs. It is kind
of you to take the time.
Please Provide an Example
-------------------------
If you're having trouble with how the contents of a particular Doxygen comment
or a particular set of code is being processed then please provide an example of
the in question.
Ideally as a pull-request with additions to the `examples/specific` folder but
feel free to provide the comment content in your issue instead.
It really helps to accelerate development if we have examples to work from.
================================================
FILE: CONTRIBUTORS.rst
================================================
Contributors
============
Many thanks to everyone that has contributed to the project.
- `Andne `_
- `arximboldi `_
- `D4N `_
- `dean0x7d `_
- `dg-dboehi `_
- `eric-wieser `_
- `fetzerch `_
- `gmarull `_
- `hidmic `_
- `ishitatsuyuki `_
- `jakobandersen `_
- `mattip `_
- `michaeljones `_
- `nijel `_
- `olitheolix `_
- `pczerkas `_
- `queezythegreat `_
- `remyleone `_
- `rhssk `_
- `rogerbarton `_
- `ropg `_
- `rscohn2 `_
- `rweickelt `_
- `SylvainCorlay `_
- `t-b `_
- `Tiwalun `_
- `utzig `_
- `vermeeren `_
- `vitaut `_
- `xuhongxu96 `_
And many more via issues and suggestions.
================================================
FILE: LICENSE
================================================
// BSD license, modified to remove the organisation as there isn't one.
Copyright (c) 2009, Michael Jones
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The names of its contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: MANIFEST.in
================================================
recursive-include xml_parser_generator *.py *.in *.json
include requirements/*.txt tests/*.py
graft tests/data
exclude breathe/_parser.py
global-exclude *.py[cod]
================================================
FILE: Makefile
================================================
RM = rm -f
GENERATED_MOD = breathe/_parser.py
.PHONY: all
all: html pdf
.PHONY: html
html: data
$(MAKE) -C documentation html
.PHONY: pdf
pdf: data
$(MAKE) -C documentation latexpdf
.PHONY: data
data:
$(MAKE) -C examples/doxygen all
$(MAKE) -C examples/tinyxml all
$(MAKE) -C examples/specific all
$(GENERATED_MOD): \
xml_parser_generator/schema.json \
xml_parser_generator/module_template.py.in \
xml_parser_generator/make_parser.py
python3 xml_parser_generator/setuptools_builder.py
.PHONY: parser
parser: $(GENERATED_MOD)
.PHONY: format-parser
format-parser:
ruff format $(GENERATED_MOD)
.PHONY: distclean
distclean: clean
$(MAKE) -C documentation clean
$(RM) $(GENERATED_MOD)
.PHONY: clean
clean:
$(MAKE) -C examples/doxygen $@
$(MAKE) -C examples/tinyxml $@
$(MAKE) -C examples/specific $@
.PHONY: test
test: $(GENERATED_MOD)
cd tests && python3 -m pytest -v --maxfail=1
.PHONY: dev-test
dev-test: $(GENERATED_MOD)
cd tests && PYTHONPATH=../:$(PYTHONPATH) python3 -m pytest -v
.PHONY: ruff
ruff:
ruff check
ruff format
.PHONY: type-check
type-check: $(GENERATED_MOD)
mypy --warn-redundant-casts --warn-unused-ignores breathe tests
================================================
FILE: README.rst
================================================
.. image:: https://www.breathe-doc.org/img/logo.svg
:align: center
:alt: Breathe logo
:width: 200
:height: 200
:target: https://www.breathe-doc.org
Breathe
=======
**Your technical docs, beautifully integrated**
.. image:: https://github.com/breathe-doc/breathe/actions/workflows/unit_tests.yml/badge.svg
:target: https://github.com/breathe-doc/breathe/actions/workflows/unit_tests.yml
:alt: Build Status
Website_ • Documentation_ • Sponsor_
**Sponsor**: If you benefit from using Breathe as a company or an individual, you
can financially support the Breathe project with recurring or one off
contributions via `Open Collective `_.
.. _Website: https://www.breathe-doc.org/
.. _Documentation: https://breathe.readthedocs.io/en/latest/
.. _Sponsor: https://opencollective.com/breathe
----
Breathe is a Sphinx plugin providing beautifully integrated Doxygen output in
your user-facing documentation. It allows you to combine Doxygen's excellent
technical understanding of your code base with the superb long form
documentation output of the Sphinx system.
For Packagers
-------------
- Breathe packages on PyPI are PGP signed for Breathe >= v4.28.0.
- Breathe tarballs on GitHub are PGP signed for Breathe >= v4.29.0.
Download
--------
Breathe is available from github and `PyPI, the Python Package Index
`_. It can be installed with::
pip install breathe
Documentation
-------------
The documentation is available `here `__. Thank
you to the people running `Read the Docs `_ for such an
excellent service.
The source for the documentation is in the ``documentation`` folder if you want
to built it and read it locally.
Testing
-------
The testsuite can be run with::
make dev-test
The documentation also does a good effort of covering the available
functionality with different examples. To build the documentation, run::
make
This will run doxygen over the example code and then run the Breathe
documentation. View the results at::
documentation/build/html/index.html
Further to this if you want to compare the current documentation output against
a previous state in order to check for regressions there is a ``compare`` script
in the ``documentation`` folder. It takes two arguments which are two commit
references that you'd like to compare. This means that all your changes have to
be committed first. Also the script does not resolve state dependent references
like ``HEAD`` so provide concrete commit references like sha1s or branch names.
A typical example is to compare your current branch output to master::
# Make sure all your changes are committed first
cd documentation
./compare master my-branch
This will do a checkout and build at each commit and then run ``meld`` against
the resulting directories so you can see the differences introduced by your
branch.
Requirements
------------
Breathe requires Python 3.9+, Sphinx 7.2+, and Doxygen 1.9.2+.
Mailing List Archives
---------------------
The archive for the Google groups list can be found
`here `__.
The previous mailing list was on `librelist.com `__ and the
archives are available `here `__.
Please post new questions as GitHub issues.
Projects Using Breathe
----------------------
Examples of projects that use Breathe:
- `PyTorch `_
- `OpenPilot `_
- `XGBoost `_
- `NumPy `_
- `Mozilla's DeepSpeech `_
- `Microsoft's LightGBM `_
- `PyBind11 `_
- `Ceph `_
- `Apache Arrow `_
- `LVGL `_
- `Espressif IoT Development Framework `_
- `Zephyr Project `_
- `Plaid ML `_
- `Sony's Neural Network Libraries `_
- `fmt `_
Release
-------
1. Update `CHANGELOG.rst` and create the git tag (`vX.Y.Z`).
2. Push the tag to GitHub.
3. The `create-release.yml` workflow will publish the release to PyPI.
4. Go to https://github.com/breathe-doc/breathe/tags, select the new tag,
and click the "Create release from tag" button to publish a GitHub release.
Maintainers
-----------
Breathe is currently maintained by `vermeeren `_ & `jakobandersen `_
and was formerly maintained by `michaeljones `_
& `vitaut `_.
See `CONTRIBUTORS `_ for the full list.
Acknowledgements
----------------
- Dimitri van Heesch for `Doxygen `_.
- Georg Brandl for `Sphinx `_.
- David Goodger for `Docutils `_ and reStructuredText.
Changelog
---------
See the `CHANGELOG.rst
`_
================================================
FILE: breathe/README.rst
================================================
breathe
=======
- **Subpackages**
- **directive** - Contains some rst directive definitions. These were split out
of `directives.py` when it started to become too large.
- **finder** - Provides classes for finding nodes within the set of xml
files generated by doxygen. Finders are generally used in the `run` methods of
the directives to find the xml node which is then passed to the renderer to
create the output.
- **renderer** - Provides classes for rendering an xml node from the doxygen xml
into docutils rst nodes which can be used by Sphinx. Breathe should ideally
only produce rst nodes and not concern itself with the final output (html,
latex, etc.)
- **Submodules**
- **directives** - Contains the definitions of some of the directives. The rest
are in the files in the `directive` folder. It also contains all the set up
code which registers with Sphinx and wires together all the various factories.
- **parser** - Contains code for parsing the doxygen xml into a tree of Python
objects. Most of its content is imported from `_parser`, which is generated
automatically when Breathe is built.
- **process** - Contains the code responsible for running the `doxygen` process
when using the `autodoxygen` directives.
- **project** - Handles the concept of a `Project` which is the breathe term for
a folder full of doxygen xml files.
- **exception** - Contains the base class for all custom exceptions.
================================================
FILE: breathe/__init__.py
================================================
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from sphinx.application import Sphinx
__version__ = "5.0.0a5"
def setup(app: Sphinx):
from breathe.directives.setup import setup as directive_setup
from breathe.file_state_cache import setup as file_state_cache_setup
from breathe.renderer.sphinxrenderer import setup as renderer_setup
directive_setup(app)
file_state_cache_setup(app)
renderer_setup(app)
return {"version": __version__, "parallel_read_safe": True, "parallel_write_safe": True}
================================================
FILE: breathe/apidoc.py
================================================
"""
breathe.apidoc
~~~~~~~~~~~~~~
Parses doxygen XML tree looking for C/C++ modules and creates ReST files
appropriately to create code documentation with Sphinx. It also creates a
modules index (See TYPEDICT below.).
This is derived from the "sphinx-autopackage" script, which is:
Copyright 2008 Société des arts technologiques (SAT),
http://www.sat.qc.ca/
:copyright: Originally by Sphinx Team, C++ modifications by Tatsuyuki Ishi
:license: BSD, see LICENSE for details.
"""
from __future__ import annotations
import argparse
import os
import sys
import xml.etree.ElementTree
from pathlib import Path
from breathe import __version__
# Reference: Doxygen XSD schema file, CompoundKind only
# Only what breathe supports are included
# Translates identifier to English
TYPEDICT = {
"class": "Class",
"interface": "Interface",
"struct": "Struct",
"union": "Union",
"file": "File",
"namespace": "Namespace",
"group": "Group",
}
# Types that accept the :members: option.
MEMBERS_TYPES = ["class", "group", "interface", "namespace", "struct"]
def print_info(msg, args):
if not args.quiet:
print(msg)
def write_file(name, text, args):
"""Write the output file for module/package ."""
fname = Path(args.destdir, f"{name}.{args.suffix}")
if args.dryrun:
print_info("Would create file %s." % fname, args)
return
if not args.force and fname.is_file():
print_info("File %s already exists, skipping." % fname, args)
else:
print_info("Creating file %s." % fname, args)
fname.parent.mkdir(parents=True, exist_ok=True)
try:
orig = fname.read_text(encoding="utf-8")
if orig == text:
print_info("File %s up to date, skipping." % fname, args)
return
except FileNotFoundError:
# Don't mind if it isn't there
pass
fname.write_text(text, encoding="utf-8")
def format_heading(level, text):
"""Create a heading of [1, 2 or 3 supported]."""
underlining = ["=", "-", "~"][level - 1] * len(text)
return "%s\n%s\n\n" % (text, underlining)
def format_directive(package_type, package, args):
"""Create the breathe directive and add the options."""
directive = ".. doxygen%s:: %s\n" % (package_type, package)
if args.project:
directive += " :project: %s\n" % args.project
if args.members and package_type in MEMBERS_TYPES:
directive += " :members:\n"
return directive
def create_package_file(package, package_type, package_id, args):
"""Build the text of the file and write the file."""
# Skip over types that weren't requested
if package_type not in args.outtypes:
return
text = format_heading(1, "%s %s" % (TYPEDICT[package_type], package))
text += format_directive(package_type, package, args)
write_file(Path(package_type, package_id), text, args)
def create_modules_toc_file(key, value, args):
"""Create the module's index."""
if not Path(args.destdir, key).is_dir():
return
text = format_heading(1, "%s list" % value)
text += ".. toctree::\n"
text += " :glob:\n\n"
text += " %s/*\n" % key
write_file("%slist" % key, text, args)
def recurse_tree(args):
"""
Look for every file in the directory tree and create the corresponding
ReST files.
"""
index = xml.etree.ElementTree.parse(Path(args.rootpath, "index.xml"))
# Assuming this is a valid Doxygen XML
for compound in index.getroot():
create_package_file(
compound.findtext("name"), compound.get("kind"), compound.get("refid"), args
)
class TypeAction(argparse.Action):
def __init__(self, option_strings, dest, **kwargs):
super().__init__(option_strings, dest, **kwargs)
self.default = TYPEDICT.keys()
self.metavar = ",".join(TYPEDICT.keys())
def __call__(self, parser, namespace, values, option_string=None):
assert isinstance(values, str)
value_list = values.split(",")
for value in value_list:
if value not in TYPEDICT:
raise ValueError("%s not a valid option" % value)
setattr(namespace, self.dest, value_list)
def main():
"""Parse and check the command line arguments."""
parser = argparse.ArgumentParser(
description="""\
Parse XML created by Doxygen in and create one reST file with
breathe generation directives per definition in the .
Note: By default this script will not overwrite already created files.""",
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.add_argument(
"-o",
"--output-dir",
action="store",
dest="destdir",
help="Directory to place all output",
required=True,
)
parser.add_argument(
"-f", "--force", action="store_true", dest="force", help="Overwrite existing files"
)
parser.add_argument(
"-m",
"--members",
action="store_true",
dest="members",
help="Include members for types: %s" % MEMBERS_TYPES,
)
parser.add_argument(
"-n",
"--dry-run",
action="store_true",
dest="dryrun",
help="Run the script without creating files",
)
parser.add_argument(
"-T",
"--no-toc",
action="store_true",
dest="notoc",
help="Don't create a table of contents file",
)
parser.add_argument(
"-s",
"--suffix",
action="store",
dest="suffix",
help="file suffix (default: rst)",
default="rst",
)
parser.add_argument(
"-p",
"--project",
action="store",
dest="project",
help="project to add to generated directives",
)
parser.add_argument(
"-g",
"--generate",
action=TypeAction,
dest="outtypes",
help="types of output to generate, comma-separated list",
)
parser.add_argument(
"-q", "--quiet", action="store_true", dest="quiet", help="suppress informational messages"
)
parser.add_argument(
"--version", action="version", version="Breathe (breathe-apidoc) %s" % __version__
)
parser.add_argument("rootpath", type=str, help="The directory contains index.xml")
args = parser.parse_args()
args.suffix = args.suffix.removeprefix(".")
if not os.path.isdir(args.rootpath):
print("%s is not a directory." % args.rootpath, file=sys.stderr)
sys.exit(1)
if "index.xml" not in os.listdir(args.rootpath):
print("%s does not contain a index.xml" % args.rootpath, file=sys.stderr)
sys.exit(1)
if not os.path.isdir(args.destdir):
if not args.dryrun:
os.makedirs(args.destdir)
args.rootpath = os.path.abspath(args.rootpath)
recurse_tree(args)
if not args.notoc:
for key in args.outtypes:
create_modules_toc_file(key, TYPEDICT[key], args)
# So program can be started with "python -m breathe.apidoc ..."
if __name__ == "__main__":
main()
================================================
FILE: breathe/cpp_util.py
================================================
from __future__ import annotations
import re
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Iterator
RE_NAME_PART = re.compile(r"([<>()[\]]|::)")
def _check_pair(dest: list[str], tokens: Iterator[str], start: str, end: str) -> bool:
if dest[-1] == start:
for tok in tokens:
dest.append(tok)
if tok == end:
break
# If we're inside angle brackets, we assume "<" and ">" are brackets
# and not comparison operators. Once we're inside other brackets, we
# only need to worry about recursive brackets and can ignore the
# other types.
if start == "<":
_check_all_pairs(dest, tokens)
else:
_check_pair(dest, tokens, start, end)
return True
return False
def _check_all_pairs(dest: list[str], tokens: Iterator[str]) -> None:
if not _check_pair(dest, tokens, "<", ">"):
if not _check_pair(dest, tokens, "(", ")"):
if not _check_pair(dest, tokens, "[", "]"):
_check_pair(dest, tokens, "{", "}")
def split_name(name: str) -> list[str]:
"""Split a qualified C++ name into the namespace components.
E.g. turn "A::D::E<(F>G::H),(I