-
Notifications
You must be signed in to change notification settings - Fork 0
DLS for defining units #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ystem Migrates unit definitions from C++ macros to a Ruby DSL, with a new gen-units script to generate C++ headers. Updates CMake to manage the unit generation and build process for lib, tests, examples, and fuzz. Includes new unit definitions for various physical quantities.
Refactor unit definition, generation, and testing infrastructure. Introduce DSL validation, move utilities, and add comprehensive CI workflows.
Refactor unit definition, generation, and testing infrastructure. Introduce DSL validation, move utilities, and add comprehensive CI workflows.
Refactor `bin/gen-units` to generate a `units_catalog.md` file for Doxygen, enhancing documentation of physical quantities, units, and conversions. Update CMake to include this catalog in the build process and modify CI workflows to validate its presence and content. Improve `README.md` and `mainpage.md` to reflect the new documentation structure and clarify library consumption.
Refactor `bin/gen-units` to generate a `units_catalog.md` file for Doxygen, enhancing documentation of physical quantities, units, and conversions. Update CMake to include this catalog in the build process and modify CI workflows to validate its presence and content. Improve `README.md` and `mainpage.md` to reflect the new documentation structure and clarify library consumption.
Refactor: Change nlohmann-json3-dev to libtclap-dev in ci.yml and full_analysis.yml.
Replaced direct usage of C++ standard library components with explicit std:: qualification (e.g., 'std::string' instead of 'string', 'std::cout' instead of 'cout', 'std::endl' instead of 'endl', 'std::domain_error' instead of 'domain_error'). This refactoring improves code clarity, avoids potential naming conflicts, and ensures consistent best practices across the codebase, affecting source, test, and utility files.
Add acceleration, capacitance, charge, dynamic viscosity, energy, force, kinematic viscosity, mass, mass flow, resistance, torque, voltage, and volume physical quantities with their respective units and conversions. Refactor `Unit` and `PhysicalQuantity` internals, including symbol normalization and alias handling. Remove old `Imakefile`s and `depend.sh` scripts, migrating to CMake-based build. Enhance CMake build with Clang `gcc-install-dir` detection, fuzzing smoke tests, and improved test/documentation configurations. Update Doxygen documentation and `README.md` to reflect new DSL validation rules and API structure.
Refactor error handling to use ah-uconv-errors.H for uconv-specific exceptions, mirroring ah-errors.H. Update `uconv.H`, `unititem.H`, `all-units.cc`, and `gen-units` to utilize the new error macros, improving consistency and clarity of error messages.
- CMake: Add `UCONV_CLANG_GCC_TOOLCHAIN` variable to support `--gcc-toolchain` - CI: Verify Clang supports `--gcc-install-dir` before using it
…and improve text formatting
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Title
Fix compilation errors and translate examples to English
Description
This branch addresses several compilation errors and warnings encountered when building the project (specifically with C++20), and updates the examples to use English.
Detailed Changes
Compilation Fixes in
include/uconv.H:length + width). Added explicit template overloads foroperator+andoperator-in theQuantityclass that acceptQuantity<U>, preventing conflicting implicit conversions toVtlQuantity.static_castWarnings: Removed an unnecessaryconstqualifier in thestatic_castwithinPhysicalQuantity::searchthat was generating warnings.nodiscardWarnings: Suppressed the warning for ignoring the return value ofinsertinUnitConverterby casting it tovoid.Fixes in Unit Definitions (
include/units/temperature.H):\degreeto\\degree) that were preventing the temperature units from compiling correctly.Examples Update (
Examples/basic_conversion.cc):largo->length,ancho->width, etc.) to English.