Repository navigation
Fix calorie heat transfer coefficient abbreviations - #1749
Open
HuzaifaChaudary wants to merge 1 commit into
Open
HuzaifaChaudary wants to merge 1 commit into
HuzaifaChaudary wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
CaloriePerHourSquareMeterDegreeCelsiushad thekcal/…abbreviations , and since it also has theKiloprefix , the generated kilocalorie unit gotkkcal/…:so
HeatTransferCoefficient.Parse("1 kcal/(h·m²·°C)")returned 1 calorie per hour , 0.00116 W/(m²·K) instead of 1.163 , and a kilocalorie value printed askkcal/(h·m²·°C). the conversion factors were right , only the names were off by the prefix .the calorie unit now has
cal/…and the generated kilocalorie onekcal/…, the same patternHeatFluxuses forkcal/(h·m²). the change is inHeatTransferCoefficient.json, the rest isgenerate-codeoutput . the regeneratedHeatTransferCoefficientTestsBasehad"4.2 kkcal/(h·m²·°C)"as the expected kilocalorie string before , with the old resource file 84 of its 266 tests fail , with the new one all pass .UnitsNet.Testson net10.0 , macOS : 52558 passed , the 2FeetInchesTestsde-CH failures happen on master too ( ICU group separator ) .found by converting one of every unit to its base unit with UnitsNet's own formulas and with pint , then looking at what disagreed . the other differences were definitions ,
Year365vs pint's 365.25 days and the like , this was the one real bug . I also checked that eachFromBaseToUnitFuncinverts itsFromUnitToBaseFuncfor the 758 units defined in the json files , they all do , up to floating point rounding .