docs: add Doxygen/Breathe infrastructure for C++ API reference - #413
Merged
Merged
Conversation
Wires up Doxygen XML generation + Breathe Sphinx extension so that C++ API documentation from header comments renders in the existing Sphinx/readthedocs site at docs/api.rst. - docs/Doxyfile: Doxygen config (XML-only output, internal headers excluded) - docs/conf.py: runs Doxygen as subprocess, adds breathe extension - docs/api.rst: stub C++ API reference page (expanded by subsequent PRs) - docs/index.rst: replace external cxx-api link with internal api.rst - docs/requirements.txt: add breathe >= 4.35 - .readthedocs.yaml: add apt_packages: [doxygen] - .gitignore: exclude docs/_doxygen/ (generated) Builds on prior work in project-gemmi#402 (Paul Emsley / pemsley). Co-authored-by: C. Vonrhein / CV-GPhL
This was referenced Apr 22, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 22, 2026
Closed
Member
Member
|
somehow i'm notable to merge it |
Member
|
i'mtrying tomerge sll these PRs, but I'm not able |
Member
|
@keitaroyam can you try? |
Collaborator
|
What's happening? Why so many PRs? |
Member
|
Clemens
Clemens adds Doxygen comments |
Member
Author
|
Sorry about that barrage of PRs ... I thought it made more sense to split them into (reasonably) logical blocks since it is/was quite a lot. |
This was referenced May 22, 2026
keitaroyam
pushed a commit
that referenced
this pull request
May 29, 2026
Restores the initialization of GridMeta::spacegroup = nullptr that was inadvertently removed in PR #418. This fixes undefined behavior when the space group pointer is accessed before being explicitly set. Part of comprehensive fix for initialization removals introduced in Doxygen documentation PR series (#413-#422).
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Adds the build infrastructure needed to generate a C++ API reference from
Doxygen comments in `include/gemmi/*.hpp` and render it within the existing
Sphinx/readthedocs documentation site.
This is PR 1 of a planned series of 10 PRs. PRs 2–10 add full Doxygen
comments to all public headers and depend on this PR being merged first —
they will expand `docs/api.rst` and have no meaning without the build pipeline
established here.
What this PR does
Internal/data-only headers (`ace_*.hpp`, `acedrg_tables.hpp`, `mc_tables.hpp`,
`eig3.hpp`, `cc_adj.hpp`, `ccp4ener.hpp`) are excluded.
adds the `breathe` Sphinx extension and its configuration.
This stub will grow with each subsequent PR in this series.
with an internal link to the new `api.rst` page.
Planned PR series (all depend on this PR)
Relationship to PR #402
This PR is the first in a series building on Paul Emsley's PR #402 (pemsley). As requested
by @wojdyr in the discussion there, the Doxygen configuration lives under `docs/` alongside
the existing Sphinx configuration rather than under `include/gemmi/`. The `doxy-sphinx/`
directory from PR #402 is not included here.
Build verification
```
cd docs && make html # runs Doxygen then Sphinx; api.html ~600KB
```
Verified locally: doxygen 1.9.8, breathe 4.36.0, Sphinx 9.1.0, ubuntu-24.04.
Test plan