How llnl/units works
Project type and purpose
• This is a C++ runtime units‐of‐measurement library that provides:
• A core header‐only + compiled-object “units” library (units/)
• A command-line converter app (converter/)
• A Python extension module (python/units_llnl)
• A lightweight HTTP conversion web service (webserver/)
• Full documentation (docs/) and testing/fuzzing harnesses
File structure
• Top‐level build: CMakeLists.txt drives the build of all components.
• Directories:
• units/ – core library sources & headers
• converter/ – CLI tool linking to core library
• python/ – CMake wrapper building Python extension units_llnl
• webserver/ – simple HTTP server binary, static HTML pages, Dockerfile
• test/ – C++ unit tests (googletest), example & find_package tests
• FuzzTargets/ – fuzz inputs, harnesses, Dockerfile for libFuzzer
• ThirdParty/ – vendored headers (CLI11, tinyxml2, googletest, CMake macros)
• docs/ – Sphinx sources, conf.py, make scripts for ReadTheDocs
• .ci/, .circleci/, .github/ – CI/CD pipelines (Azure DevOps, CircleCI, GitHub Actions)
• config/ – lint, format, spellcheck, code coverage CMake helpers
README for additional insights
• Describes runtime unit representation, string conversions, measurement types, Python wrapper, converter app, example usage.
• Builds as static/shared library targets (units::units, units::header_only).
• CI workflows for build/test/coverage/docs/deployment.
• Docker images published for converter and possibly webserver.
Elements
• Clear labels for every component and artifact (e.g. units::units, converter binary, units_llnl.so)
• Blue rectangles for core/library modules
• Green rectangles for consumer applications (CLI, Python, Web)
• Orange rectangles for infrastructure (Build System, CI/CD)
• Clouds for external services (GitHub, Azure DevOps)