Skip to content

Commit de82de0

Browse files
author
steven varga
committed
Merge branch '282-docs-doxygen-reports-and-aliases' into staging
2 parents db16477 + 99a2e62 commit de82de0

209 files changed

Lines changed: 12803 additions & 23811 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,10 @@ permissions:
88
contents: write
99

1010
jobs:
11-
# MkDocs — conceptual docs, architecture pages, guides
12-
deploy-mkdocs:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout repo
16-
uses: actions/checkout@v6
17-
18-
- name: Set up Python
19-
uses: actions/setup-python@v6
20-
with:
21-
python-version: '3.x'
22-
23-
- name: Install MkDocs + Material theme
24-
run: pip install mkdocs mkdocs-material
25-
26-
- name: Build MkDocs site
27-
run: mkdocs build
28-
29-
- name: Deploy MkDocs to gh-pages root
30-
uses: peaceiris/actions-gh-pages@v4
31-
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_dir: ./site
34-
keep_files: true
35-
36-
# Doxygen — API reference generated from C++ headers
11+
# Doxygen — full project documentation site (API reference + curated
12+
# I/O+TOPICS axes + COOKBOOK + REPORTS, all generated from headers,
13+
# examples, and the doxy/docs/{index,aliases,curated,reports}/ markdown).
14+
# Publishes to the gh-pages root; MkDocs has been retired.
3715
deploy-doxygen:
3816
runs-on: ubuntu-latest
3917
steps:
@@ -45,13 +23,43 @@ jobs:
4523
sudo apt-get update -qq
4624
sudo apt-get install -y doxygen
4725
48-
- name: Build Doxygen API reference
49-
run: cd doxy && doxygen Doxyfile
26+
- name: Checkout repo (with full history so docs-build.sh can resolve git tags)
27+
run: |
28+
if ! git rev-parse --git-dir >/dev/null 2>&1; then
29+
echo "checkout missing — run actions/checkout@v4 above"
30+
exit 1
31+
fi
32+
# actions/checkout@v4 uses depth=1 by default; fetch tags so the
33+
# version-deriving git describe in docs-build.sh sees real releases.
34+
git fetch --tags --depth=0 origin || true
35+
36+
- name: Build Doxygen documentation (version from git tag, post-processed)
37+
run: scripts/docs-build.sh
38+
39+
- name: Summarise Doxygen warnings
40+
if: always()
41+
run: |
42+
log=doxy/docs/doxygen/warnings.log
43+
if [[ -f $log ]]; then
44+
count=$(wc -l < $log)
45+
echo "::notice::Doxygen warnings: $count lines (see uploaded artifact 'doxygen-warnings')"
46+
head -50 $log || true
47+
else
48+
echo "::notice::No Doxygen warnings log produced"
49+
fi
50+
51+
- name: Upload Doxygen warnings log
52+
if: always()
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: doxygen-warnings
56+
path: doxy/docs/doxygen/warnings.log
57+
if-no-files-found: ignore
58+
retention-days: 30
5059

51-
- name: Deploy Doxygen to gh-pages/api
60+
- name: Deploy Doxygen to gh-pages root
5261
uses: peaceiris/actions-gh-pages@v4
5362
with:
5463
github_token: ${{ secrets.GITHUB_TOKEN }}
55-
publish_dir: ./docs/doxygen/html
56-
destination_dir: api
64+
publish_dir: ./doxy/docs/doxygen/html
5765
keep_files: true

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,4 @@ data/
158158
# =============================================================================
159159
# Documentation build output
160160
# =============================================================================
161-
docs/docs/site
162-
site/
161+
doxy/docs/doxygen/

CMakeLists.txt

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ endif()
1616
# embeds it as PROJECT_VERSION rather than a stale hardcoded number. Falls
1717
# back to a placeholder when building from a tarball without git history.
1818
find_package(Git QUIET)
19-
set(H5CPP_PROJECT_VERSION "1.12.0")
19+
set(H5CPP_PROJECT_VERSION "1.12.7")
2020
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
2121
execute_process(
2222
COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0 --match "v[0-9]*"
@@ -453,25 +453,8 @@ string(TOLOWER "${CPACK_PACKAGE_FILE_NAME}" CPACK_PACKAGE_FILE_NAME)
453453
include(CPack)
454454

455455
# ─── Developer convenience targets ───────────────────────────────────────────
456-
find_program(MKDOCS_EXECUTABLE mkdocs)
457456
find_program(DOXYGEN_EXECUTABLE doxygen)
458457

459-
if(MKDOCS_EXECUTABLE)
460-
add_custom_target(docs COMMAND ${MKDOCS_EXECUTABLE} build --config-file ${CMAKE_SOURCE_DIR}/mkdocs.yml --site-dir ${CMAKE_BINARY_DIR}/site
461-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
462-
COMMENT "Building MkDocs documentation → build/site"
463-
VERBATIM
464-
)
465-
set(MKDOCS_DEV_ADDR "127.0.0.1:8000" CACHE STRING "host:port for mkdocs serve (docs-serve target)")
466-
add_custom_target(docs-serve COMMAND ${MKDOCS_EXECUTABLE} serve --livereload
467-
--dev-addr ${MKDOCS_DEV_ADDR}
468-
--config-file ${CMAKE_SOURCE_DIR}/mkdocs.yml
469-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
470-
COMMENT "Serving MkDocs with live reload at ${MKDOCS_DEV_ADDR} (Ctrl-C to stop)"
471-
VERBATIM
472-
)
473-
endif()
474-
475458
if(DOXYGEN_EXECUTABLE)
476459
add_custom_target(docs-doxygen COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
477460
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/doxy

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,21 @@ A pull request should:
111111
- document user-visible behavior changes
112112

113113
The preferred merge target for active development is `staging`. Release branches are promoted from `staging` after validation.
114+
115+
## Documentation — alias-first docstrings
116+
117+
H5CPP's API surface is built on overload sets (`h5::write` has ~40 overloads, `h5::read` ~30, `h5::create` ~20). Each carries the same `file_path`, `dataset_path`, `offset`, `stride`, `count`, `block`, `dxpl`, template parameter, return type. Without discipline, the same `@param` block ends up duplicated across dozens of docstrings — and a wording change requires dozens of edits.
118+
119+
To keep docstrings DRY, the project uses a controlled vocabulary of Doxygen aliases defined in `docs/links/*.txt`. Each alias is a single-token expansion that produces a fully-formed `@param` / `@tparam` / `@return` / `@see` block.
120+
121+
The full vocabulary catalog, standard docstring template, and workflow for adding new aliases live at [`docs/aliases.md`](docs/aliases.md).
122+
123+
### The rule
124+
125+
When writing or refactoring a docstring:
126+
127+
1. If a `@param` / `@tparam` / `@return` line you're about to write would repeat **≥ 5 times** across the codebase, use an existing alias from `docs/links/h5cpp.txt` — or add a new one there and reference it via `\name`.
128+
2. The chained-aliases line goes at the **end** of the comment, after any `\code` block. Order: `\par_*``\tpar_*``\returns_*``\sa_*`.
129+
3. New aliases land in the same commit as their first use. Update `docs/aliases.md` so the catalog stays in sync.
130+
131+
The canonical example is `h5cpp/H5Dread.hpp`. The standard template is in [`docs/aliases.md`](docs/aliases.md).

docs/architecture-core.md

Lines changed: 0 additions & 113 deletions
This file was deleted.

0 commit comments

Comments
 (0)