Skip to content

Add units to RotationalStiffness, VolumePerLength, ForcePerLength - #776

Merged
angularsen merged 6 commits into
angularsen:masterfrom
ajphall:add-rotation-stiffness-volume-per-length-force-per-length-units
Apr 5, 2020
Merged

Add units to RotationalStiffness, VolumePerLength, ForcePerLength#776
angularsen merged 6 commits into
angularsen:masterfrom
ajphall:add-rotation-stiffness-volume-per-length-force-per-length-units

Conversation

@ajphall

Copy link
Copy Markdown
Contributor

In addition to adding the additional units I also made a change in the VolumePerLength BaseDimensions to change it from L=3 to L=2. I'm not sure if I misunderstood something, but if its m^3 / m then I'm not sure how it can be L=3. Maybe you did this to avoid ambiguity with area? I checked in the original PR (#604) and cannot find any explanation why its like this.

@angularsenangularsen left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Verified all the conversions.
A couple suggestions to rename some units. Make sure to run generate-code.bat once more and you probably have to manually rename the properties in the test code.

Comment threadCommon/UnitDefinitions/RotationalStiffness.json Outdated
Comment threadCommon/UnitDefinitions/RotationalStiffness.json Outdated
Comment threadCommon/UnitDefinitions/RotationalStiffness.json Outdated
Comment threadUnitsNet.Tests/CustomCode/ForcePerLengthTests.cs
Comment threadUnitsNet.Tests/CustomCode/RotationalStiffnessTests.cs Outdated
Comment threadUnitsNet.Tests/CustomCode/VolumePerLengthTests.cs
@codecov-io

codecov-io commented Apr 5, 2020

Copy link
Copy Markdown

Codecov Report

Merging #776 into master will increase coverage by 0.34%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@## master #776 +/- ##
==========================================
+ Coverage 63.47% 63.82% +0.34% 
==========================================
Files 278 278 Lines 41087 41477 +390 ==========================================
+ Hits 26081 26471 +390 
Misses 15006 15006 
Impacted FilesCoverage Δ
UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs100.00% <ø> (ø)
...eneratedCode/NumberToForcePerLengthExtensions.g.cs100.00% <100.00%> (ø)
...tedCode/NumberToRotationalStiffnessExtensions.g.cs100.00% <100.00%> (ø)
...neratedCode/NumberToVolumePerLengthExtensions.g.cs100.00% <100.00%> (ø)
...tsNet/GeneratedCode/Quantities/ForcePerLength.g.cs66.12% <100.00%> (+5.84%)⬆️
.../GeneratedCode/Quantities/RotationalStiffness.g.cs70.88% <100.00%> (+18.89%)⬆️
...sNet/GeneratedCode/Quantities/VolumePerLength.g.cs54.43% <100.00%> (+2.11%)⬆️
UnitsNet/GeneratedCode/UnitConverter.g.cs100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c00d9d...656ddaa. Read the comment docs.

@ajphall

Copy link
Copy Markdown
ContributorAuthor

Thanks for tidying up the tests..looks much better!

I updated the unit naming in the Rotational Stiffness as suggested. I also updated the names of some of the other units in the same file to keep everything following a consistent convention.

{
"SingularName": "PoundForceFootPerDegrees",
"PluralName": "PoundForceFeetPerDegrees",
"SingularName": "PoundForceFootPerDegree",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Great initiative, however this would be a breaking change and not something we can do.
I propose reverting these and adding a comment in #563 to address it there.

"XmlDoc": "Volume, typically of fluid, that a container can hold within a unit of length.",
"BaseDimensions": {
"L": 3
"L": 2

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Good catch

@angularsenangularsen changed the title Add additional RotationalStiffness and VolumePerLength units. Add additional prefixes to ForcePerLengthAdd units to RotationalStiffness, VolumePerLength, ForcePerLengthApr 5, 2020
@angularsen
angularsen merged commit 9f652ec into angularsen:masterApr 5, 2020
@angularsen

Copy link
Copy Markdown
Owner

Thanks a lot, a new nuget is on the way.

Release UnitsNet/4.58.0 · angularsen/UnitsNet

@ajphall

Copy link
Copy Markdown
ContributorAuthor

Great, thanks a lot. I will make a note in the linked issue as requested.

Sign up for freeto 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

@ajphall@codecov-io@angularsen