Skip to content

add C# UnitTabulator and Rust unit_converter#1254

Open
jrdouceur wants to merge 12 commits intomainfrom
johndo/unit-conversion
Open

add C# UnitTabulator and Rust unit_converter#1254
jrdouceur wants to merge 12 commits intomainfrom
johndo/unit-conversion

Conversation

@jrdouceur
Copy link
Contributor

@jrdouceur jrdouceur commented Feb 24, 2026

This PR implements this proposal: QUDT Unit Conversion Library.docx

@jrdouceur
Copy link
Contributor Author

@copilot

This comment was marked as outdated.

@jrdouceur jrdouceur marked this pull request as ready for review February 24, 2026 23:22
Copilot AI review requested due to automatic review settings February 24, 2026 23:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new unit conversion capability across the repo by introducing a Rust azure_iot_operations_facilities crate (with a UnitConverter + generated unit tables) and a new .NET Azure.Iot.Operations.UnitTabulator tool to generate the Rust unit metadata from QUDT Turtle resources.

Changes:

  • Introduces azure_iot_operations_facilities Rust crate with get_converter API, conversion errors, and tests.
  • Adds generated Rust lookup tables for UNECE ECE codes and QUDT unit conversion metadata.
  • Adds a new .NET UnitTabulator project (T4-based) to read QUDT TTL resources and emit the Rust tables; wires it into codegen2/codegen.sln.

Reviewed changes

Copilot reviewed 20 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rust/azure_iot_operations_facilities/src/unit_converter.rs Core Rust unit conversion API, parsing rules, and unit tests
rust/azure_iot_operations_facilities/src/unit_converter/ece_codes.rs Generated UNECE → QUDT unit-name mapping table
rust/azure_iot_operations_facilities/src/lib.rs Exposes unit converter module + re-exports public API
rust/azure_iot_operations_facilities/tests/unit_converter_tests.rs Integration tests for converter and error cases
rust/azure_iot_operations_facilities/gen.sh Helper script to run UnitTabulator and format generated Rust
rust/azure_iot_operations_facilities/Cargo.toml New Rust crate manifest
rust/Cargo.toml Adds the new crate to the Rust workspace members
codegen2/src/Azure.Iot.Operations.UnitTabulator/** New .NET tool to read QUDT TTL and generate Rust ece_codes.rs + unit_infos.rs
codegen2/codegen.sln Adds UnitTabulator project to the codegen2 solution

@jrdouceur jrdouceur force-pushed the johndo/unit-conversion branch from c264a46 to 369e5c7 Compare February 26, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants