Skip to content

api-docs/io-utils: Doxygen docs for I/O utilities, primitives, and stragglers#422

Merged
wojdyr merged 31 commits into
project-gemmi:masterfrom
CV-GPhL:api-docs/io-utils
Apr 23, 2026
Merged

api-docs/io-utils: Doxygen docs for I/O utilities, primitives, and stragglers#422
wojdyr merged 31 commits into
project-gemmi:masterfrom
CV-GPhL:api-docs/io-utils

Conversation

@CV-GPhL
Copy link
Copy Markdown
Contributor

@CV-GPhL CV-GPhL commented Apr 23, 2026

Summary

Adds Doxygen /// API documentation to 22 headers covering I/O infrastructure,
low-level primitives, and miscellaneous utilities:

I/O and filesystem:

  • dirwalk.hpp — directory traversal with PDB code expansion, type-alias walkers
  • fileutil.hpp — file open helpers, byte-swap utilities, CharArray buffer
  • fstream.hpp — RAII file stream wrappers with UTF-8 path support
  • gz.hpp — gzip stream (GzStream, MaybeGzipped)
  • input.hpp — unified input source abstraction (AnyStream, FileStream, MemoryStream, BasicInput)
  • glob.hpp — glob pattern matching
  • logger.hpp — severity-level callback logger
  • pdb_id.hpp — PDB code validation and path expansion

Utilities:

  • util.hpp — 50+ string and container helpers (split, join, trim, case-insensitive compare, vector ops)
  • span.hpp — span and mutable-vector-span view types
  • iterator.hpp — bidirectional iterator policies (stride, indirect, unique, grouping, filter)
  • fail.hppfail(), sys_fail(), unreachable() error utilities
  • atof.hpp — fast locale-independent float parsing (fast_float wrapper)
  • atox.hpp — string-to-integer and character classification helpers
  • version.hppGEMMI_VERSION constant

Stragglers:

  • addends.hpp — anomalous scattering correction addends
  • bond_idx.hpp — bond index for topology queries
  • dsn6.hpp — DSN6/BRIX electron density map reader
  • enumstr.hpp — enum↔string conversion helpers
  • sprintf.hppsnprintf_z, sprintf_z, to_str, to_chars_z wrappers
  • stats.hppVariance, Covariance, Correlation, DataStats
  • pymol_select.hpp — PyMOL selection language compiler and atom selector

docs/api.rst updated with three new sections.

Test plan

  • Doxygen build produces no warnings for documented entities
  • @param names verified against actual C++ signatures
  • No GEMMI_DLL macros removed
  • No functional code changes
  • psimpl implementation namespace not exposed in public docs (only base Node class documented)

🤖 Generated with Claude Code

C. Vonrhein and others added 30 commits April 23, 2026 11:23
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
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
'\0' (null char) means skip expansion; avoid misleading 'non-null' wording.

Co-authored-by: C. Vonrhein / CV-GPhL
- input.hpp: replace '@param Ignored' with @details for unnamed param
- logger.hpp: remove duplicated plain-text block before @brief

Co-authored-by: C. Vonrhein / CV-GPhL
Adds three sections: I/O and Filesystem Utilities, Low-level Primitives,
and Miscellaneous, covering all 22 headers documented in PR 10.

Co-authored-by: C. Vonrhein / CV-GPhL
conf.py runs Doxygen when available (which it is on VS2022 workers)
and conditionally loads breathe when the XML output dir exists.
Without breathe installed, the Sphinx build fails with an ImportError.

Co-authored-by: C. Vonrhein / CV-GPhL
@wojdyr wojdyr merged commit 09a57e8 into project-gemmi:master Apr 23, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants