Repository navigation
refactor!: extract optional metric conversions - #37
Merged
Merged
Conversation
Move catalogue conversions into DimensionalQuantities.Extensions.Metric while retaining quantity identities and SI bases in core. Generate compiled extensions at build time and release both packages with symbols and Source Link. BREAKING CHANGE: Catalogue conversions now require DimensionalQuantities.Extensions.Metric and its namespace. Core retains the aliases, arithmetic, and generic SI conversion APIs.
Remove the build console and custom execution target. Generate Metric extensions during compilation and organise conversion, API, and package tests around their owning components.
ScottishTapWater
added a commit
that referenced
this pull request
Oct 25, 2026
## Summary Adds the opt-in `DimensionalQuantities.Extensions.Imperial` package on top of #37. It provides British and US customary conversions for length, area, volume, mass, speed, force, pressure, energy, power, and absolute Fahrenheit temperature. US and Imperial liquid measures have distinct method names; the BTU helper uses the International Table definition. The provider generates no SI-prefixed helpers. Core gains package-neutral `Speed` and `Force` quantity names. The package checker now validates every extension included in the solution, and the README shows how to use Imperial conversions. ## Verification - Release solution build: 0 warnings, 0 errors. - Full suite: 1,001 tests passed, including six Imperial tests and a packaged consumer test. - `dotnet pack` produced runtime and symbol packages; package layout check passed. - `dotnet format --verify-no-changes --no-restore` passed for changed C# files. - Independent production and test reviews found no actionable issues. Conversion definitions follow [NIST SP 811](https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors/nist-guide-si-appendix-b8), its [International Table BTU footnote](https://www.nist.gov/pml/special-publication-811/nist-guide-si-footnotes), and the [UK Units of Measurement Regulations](https://www.legislation.gov.uk/uksi/1995/1804/schedule/made).
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
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.
Summary
DimensionalQuantities.Extensions.Metricpackage.Verification
Breaking change
Catalogue conversions such as
Voltage.FromVolts,AsWatts, and catalogue-specificFromPrefixedUnits/AsPrefixedUnitsrequireDimensionalQuantities.Extensions.Metricandusing DimensionalQuantities.Extensions.Metric;.Core retains quantity aliases, SI base helpers, arithmetic and generic SI conversion APIs. No new unit systems are shipped in this PR.