Codebase Hygiene¶
This pillar covers the engineering practices that give Caliper a codebase that a new engineer can read, build, change and release with confidence.
The roadmap graph shows how these features depend on features in other pillars.
In Progress¶
- HYG-07 Generated API Reference. The docs generate the Python and C API reference from the docstrings and the header comments, and thus the reference always matches the code.
Planned¶
- HYG-01 Style Tooling. The code follows one style in each language, with .clang-format, .clang-tidy, .editorconfig, ruff for Python, and ESLint with a formatter for the web code checked in and run by CI.
- HYG-02 Pre-Commit Hooks. A pre-commit configuration runs the style tools on the changed files of each commit, and thus a style error stops the commit before it reaches CI.
- HYG-03 Commit Convention. Every commit message has a subject line of at most 72 characters and puts the detail in the body, as RULES.md and the contributing guide state.
- HYG-04 Release Tags and Changelog. The tags mark only releases, with the leftover rebase backup tags deleted, version tags for the app, the SDK, Caliper LIB and Caliper Embed, and a CHANGELOG that records each release.
- HYG-05 Top-Level Layout Cleanup. The top level of the repository holds only maintained folders, with the tracked dump/shelved/ folder removed, demos/ folded into examples/ and the build folders at the root ignored.
- HYG-06 Showcase Applets Repository. The hand-built showcase applets move out of the core repository into the separate applets repository, and the core repository keeps none of them.
- HYG-08 Branch Auto-Delete. GitHub deletes the branch of a pull request when the pull request merges, and thus the branch list shows only open work.
- HYG-09 Ownership and Security Files. A CODEOWNERS file names the reviewers for each part of the repository, and a SECURITY.md file tells people how to report a vulnerability.
- HYG-10 Large File Splits. Each of the largest sources is split into focused files: src/host/renderer/vulkan_renderer.cpp (4,157 lines), src/host/net/hub.cpp, src/host/builder/side_chat.cpp, src/main.cpp, src/host/builder/builder_pane_draw.cpp and tests/gfx/gfx_main.cpp.
- HYG-11 Issue Tracking and Review. Each planned feature has a GitHub issue that the registry links through its issue field, and a person reviews each pull request before it merges.
- HYG-12 Docs Page Check. A script with tests checks every docs page against the page template, and the docs workflow runs it before the strict build and fails on any page that breaks a rule.