Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add units to RotationalStiffness, VolumePerLength, ForcePerLength #776

Conversation

ajphall
Copy link
Contributor

@ajphall ajphall commented Apr 2, 2020

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.

Copy link
Owner

@angularsen angularsen left a comment

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.

@codecov-io
Copy link

codecov-io commented Apr 5, 2020

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 Files Coverage Δ
UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs 100.00% <ø> (ø)
...eneratedCode/NumberToForcePerLengthExtensions.g.cs 100.00% <100.00%> (ø)
...tedCode/NumberToRotationalStiffnessExtensions.g.cs 100.00% <100.00%> (ø)
...neratedCode/NumberToVolumePerLengthExtensions.g.cs 100.00% <100.00%> (ø)
...tsNet/GeneratedCode/Quantities/ForcePerLength.g.cs 66.12% <100.00%> (+5.84%) ⬆️
.../GeneratedCode/Quantities/RotationalStiffness.g.cs 70.88% <100.00%> (+18.89%) ⬆️
...sNet/GeneratedCode/Quantities/VolumePerLength.g.cs 54.43% <100.00%> (+2.11%) ⬆️
UnitsNet/GeneratedCode/UnitConverter.g.cs 100.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
Contributor Author

ajphall commented Apr 5, 2020

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.

@@ -22,8 +22,8 @@
]
},
{
"SingularName": "PoundForceFootPerDegrees",
"PluralName": "PoundForceFeetPerDegrees",
"SingularName": "PoundForceFootPerDegree",
Copy link
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.

@@ -3,7 +3,7 @@
"BaseUnit": "CubicMeterPerMeter",
"XmlDoc": "Volume, typically of fluid, that a container can hold within a unit of length.",
"BaseDimensions": {
"L": 3
"L": 2
Copy link
Owner

Choose a reason for hiding this comment

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

Good catch

@angularsen angularsen changed the title Add additional RotationalStiffness and VolumePerLength units. Add additional prefixes to ForcePerLength Add units to RotationalStiffness, VolumePerLength, ForcePerLength Apr 5, 2020
@angularsen angularsen merged commit 9f652ec into angularsen:master Apr 5, 2020
@angularsen
Copy link
Owner

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

Release UnitsNet/4.58.0 · angularsen/UnitsNet

@ajphall
Copy link
Contributor Author

ajphall commented Apr 5, 2020

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

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