Skip to content

Add robi and quebi binary prefixes per IEC 80000-13:2025#24

Merged
gimlichael merged 5 commits intocodebeltnet:mainfrom
aicia-bot:main
Apr 15, 2026
Merged

Add robi and quebi binary prefixes per IEC 80000-13:2025#24
gimlichael merged 5 commits intocodebeltnet:mainfrom
aicia-bot:main

Conversation

@aicia-bot
Copy link
Copy Markdown
Contributor

Extends Unitify binary prefixes to include robi (2^90) and quebi (2^100), aligning with the latest IEC 80000-13:2025 standard.

Changes:

  • BinaryPrefix.cs: Added Robi and Quebi properties.
  • PrefixTableExtensions.cs: Added RobiOrDefault and QuebiOrDefault methods.
  • BinaryPrefixTest.cs: Updated tests for new prefixes.

Copy link
Copy Markdown

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

Extends the Codebelt.Unitify binary prefix model to include the newly standardized IEC 80000-13:2025 binary prefixes robi (2^90) and quebi (2^100), and adds corresponding prefix-table lookup helpers plus test updates.

Changes:

  • Added BinaryPrefix.Robi and BinaryPrefix.Quebi, and extended BinaryPrefix.BinaryPrefixes to include them.
  • Added RobiOrDefault / QuebiOrDefault extension methods to PrefixTableExtensions.
  • Updated BinaryPrefixTest to validate new multipliers and the full prefix sequence.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/Codebelt.Unitify/BinaryPrefix.cs Adds Robi/Quebi prefixes and includes them in the exported binary prefix sequence, updating XML docs to IEC 80000-13:2025.
src/Codebelt.Unitify/PrefixTableExtensions.cs Adds RobiOrDefault and QuebiOrDefault lookup helpers on PrefixTable.
test/Codebelt.Unitify/BinaryPrefixTest.cs Extends tests to cover Robi/Quebi multipliers and asserts the ordered binary prefix sequence.

Comment thread src/Codebelt.Unitify/BinaryPrefix.cs
Comment on lines +335 to +348
public static IPrefixUnit RobiOrDefault(this PrefixTable prefixes)
{
return prefixes.SingleOrDefault(p => p.Prefix.Symbol == BinaryPrefix.Robi.Symbol);
}

/// <summary>
/// Returns the unit with the Quebi prefix or the default value if not found.
/// </summary>
/// <param name="prefixes">The table of multiple units.</param>
/// <returns>The unit with the Quebi prefix or the default value.</returns>
public static IPrefixUnit QuebiOrDefault(this PrefixTable prefixes)
{
return prefixes.SingleOrDefault(p => p.Prefix.Symbol == BinaryPrefix.Quebi.Symbol);
}
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

The new RobiOrDefault / QuebiOrDefault extension methods are not covered by tests, while similar *OrDefault methods are exercised in existing storage tests. Adding a small focused test (e.g., a minimal PrefixTable implementation containing Robi/Quebi prefix units) would help prevent accidental breakage/regressions in these lookups.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

@gimlichael gimlichael merged commit 1533ce1 into codebeltnet:main Apr 15, 2026
23 checks passed
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.

3 participants