Skip to content

Commit 960509c

Browse files
author
steven varga
committed
Merge branch 'staging' into release
2 parents 713fd85 + f094912 commit 960509c

1,614 files changed

Lines changed: 294903 additions & 25317 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/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,14 @@ jobs:
845845
'*/test/*' \
846846
'*/thirdparty/*' \
847847
'*/examples/*' \
848+
'*/h5cpp/H5Zpipeline_pool.hpp' \
848849
--ignore-errors unused,mismatch,inconsistent \
849850
--output-file coverage.info
851+
# H5Zpipeline_pool.hpp is excluded TEMPORARILY: the FAPL worker pool
852+
# never reaches the write/read dispatch (H5Fget_access_plist drops the
853+
# inserted property), so pool_pipeline_t is unreachable through the
854+
# public API and reads as 0% dead code. Tracked in #286 — remove this
855+
# exclusion once activation is fixed and the pool path is exercised.
850856
851857
rm coverage.full.info
852858
lcov --gcov-tool /usr/bin/gcov-14 --list coverage.info

.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: 25 additions & 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]*"
@@ -226,6 +226,30 @@ if(MSVC)
226226
target_compile_options(h5cpp INTERFACE /Zc:__cplusplus)
227227
endif()
228228

229+
# The h5cpp-compiler reflection annotations ([[h5::doc]], [[h5::chunk]],
230+
# [[h5::compress]], [[h5::name]], [[h5::ignore]], ...) live in the `h5::`
231+
# attribute namespace. A plain compiler — i.e. one not running the h5cpp-compiler
232+
# preprocessing pass — does not know that namespace, ignores the attributes, and
233+
# emits -Wattributes for every annotated struct. Declare the namespace
234+
# intentional so consumers that annotate their own types build cleanly. Scoped
235+
# to `h5::` where the compiler supports it (GCC 11+); Clang/older GCC fall back
236+
# to the broader unknown-attribute switch; MSVC silences C5030. Guarded by
237+
# check_cxx_compiler_flag so unsupported toolchains are left untouched. (#291)
238+
if(MSVC)
239+
target_compile_options(h5cpp INTERFACE /wd5030)
240+
else()
241+
include(CheckCXXCompilerFlag)
242+
check_cxx_compiler_flag("-Wno-attributes=h5::" H5CPP_HAS_WNO_ATTRIBUTES_NS)
243+
if(H5CPP_HAS_WNO_ATTRIBUTES_NS)
244+
target_compile_options(h5cpp INTERFACE -Wno-attributes=h5::)
245+
else()
246+
check_cxx_compiler_flag("-Wno-unknown-attributes" H5CPP_HAS_WNO_UNKNOWN_ATTRIBUTES)
247+
if(H5CPP_HAS_WNO_UNKNOWN_ATTRIBUTES)
248+
target_compile_options(h5cpp INTERFACE -Wno-unknown-attributes)
249+
endif()
250+
endif()
251+
endif()
252+
229253
if(H5CPP_HAVE_ROS3_VFD)
230254
target_compile_definitions(h5cpp INTERFACE H5CPP_HAVE_ROS3_VFD=1)
231255
endif()
@@ -453,25 +477,8 @@ string(TOLOWER "${CPACK_PACKAGE_FILE_NAME}" CPACK_PACKAGE_FILE_NAME)
453477
include(CPack)
454478

455479
# ─── Developer convenience targets ───────────────────────────────────────────
456-
find_program(MKDOCS_EXECUTABLE mkdocs)
457480
find_program(DOXYGEN_EXECUTABLE doxygen)
458481

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-
475482
if(DOXYGEN_EXECUTABLE)
476483
add_custom_target(docs-doxygen COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
477484
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).

CTestCustom.cmake

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,20 @@ set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1048576)
22
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 1048576)
33
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 100)
44
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 100)
5+
6+
# Coverage scope — restrict the CDash Coverage step to the h5cpp library
7+
# headers only. Without these excludes CTest folds every instrumented
8+
# .gcda it can find into the dashboard, so vendored thirdparty libraries,
9+
# the test harness, and the example translation units inflate the LOC
10+
# denominator and bury the real library figure (observed: 9276 LOC counted
11+
# vs. 2453 library lines). These patterns are POSIX regexes matched against
12+
# the absolute source path and mirror the lcov --remove list in the CI
13+
# coverage job (ci.yml) so CDash and Codecov report the same number.
14+
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
15+
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
16+
"/thirdparty/"
17+
"/test/"
18+
"/examples/"
19+
"/usr/"
20+
"/CMakeFiles/"
21+
)

docs/architecture-core.md

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

0 commit comments

Comments
 (0)