Skip to content

Add units to ForceChangeRate, PressureChangeRate, fix abbreviations #914

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

Merged
merged 3 commits into from
Apr 9, 2021

Conversation

n-tiz
Copy link
Contributor

@n-tiz n-tiz commented Apr 1, 2021

Add new units:

  • ForceChangeRate: PoundForcePerMinute and PoundForcePerSecond
  • PressureChangeRate: PoundForcePerSquareInchPerSecond and PoundForcePerSquareInchPerMinute

Add new abbreviations:

  • Pressure: PoundForcePerSquareInch (ksi)

Fixed translation:

  • PressureChangeRate : Russians abbreviations for units per minutes

… and fix translations

Add new units:
- ForceChangeRate: PoundForcePerMinute and PoundForcePerSecond
- PressureChangeRate: PoundForcePerSquareInchPerSecond and PoundForcePerSquareInchPerMinute

Add new abbreviations:
- Pressure: PoundForcePerSquareInch (ksi)

Fixed translation:
- PressureChangeRate : Russians abbreviations for units per minutes
@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #914 (0f2fa80) into master (6bd8b26) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #914     +/-   ##
========================================
+ Coverage    82.7%   82.8%   +0.1%     
========================================
  Files         291     291             
  Lines       44035   44148    +113     
========================================
+ Hits        36415   36528    +113     
  Misses       7620    7620             
Impacted Files Coverage Δ
UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs 100.0% <ø> (ø)
...neratedCode/NumberToForceChangeRateExtensions.g.cs 100.0% <100.0%> (ø)
...atedCode/NumberToPressureChangeRateExtensions.g.cs 100.0% <100.0%> (ø)
UnitsNet/GeneratedCode/Quantities/Force.g.cs 83.7% <100.0%> (ø)
...sNet/GeneratedCode/Quantities/ForceChangeRate.g.cs 82.4% <100.0%> (+1.5%) ⬆️
...t/GeneratedCode/Quantities/PressureChangeRate.g.cs 81.7% <100.0%> (+2.5%) ⬆️
UnitsNet/GeneratedCode/UnitConverter.g.cs 100.0% <100.0%> (ø)
...GeneratedCode/NumberToMagneticFieldExtensions.g.cs 100.0% <0.0%> (ø)
UnitsNet/QuantityFormatter.cs 94.9% <0.0%> (+0.5%) ⬆️
... and 1 more

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 6bd8b26...0f2fa80. Read the comment docs.

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.

Looks almost good to go, just a few observations.

…undsForce definition

Remove the KiloPoundForce unit definition replaced by Kilo prefixe in PoundForce (and abbreviations for this prefixe)
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.

Just one minor question, then this should be ready.

"Abbreviations": [ "кипф", "койка", "К" ]
}
]
},
Copy link
Owner

Choose a reason for hiding this comment

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

Nice that you merged these two definitions. Support for Prefixes was added long after this unit was added.

{
"Culture": "en-US",
"Abbreviations": [ "psi/s", "lb/in²/s" ],
"AbbreviationsForPrefixes": { "Kilo": ["kipf/in²/s", "ksi/s" ]}
Copy link
Owner

Choose a reason for hiding this comment

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

Is ksi/s more widely used than kipf/in2/s? If so, consider swapping the order of these. Seems more consistent with psi/s being the first choice, too.

The first abbreviation is the one used by ToString() when no custom formatting is specified: https://github.com/angularsen/UnitsNet/wiki/String-Formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you're right (that's what I think too), but actually i just copied the abbreviations from PoundForcePerSquareInch in Pressure.json

To keep it logical, i think we should change PoundForcePerSquareInch definition too, but as you said, the first abbreviation is used by ToString(), so it could introduce some breaking (even if i never see "kipf/in²" in any standard/document).

What do you think i should do?

Copy link
Owner

Choose a reason for hiding this comment

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

I think we can risk a minor breaking change and swap the order of Pressure too, for the sake of consistency.

…te, KilopoundForcePerSquareInchPerSecond and KilopoundForcePerSquareInch (ksi and kipf/in²)

ksi is now the first (and default )
 abbreviation rather than kipf/in²
@angularsen angularsen changed the title Adding units (ForceChangeRate and PressureChangeRate), abbreviations, and fix translations Add units to ForceChangeRate, PressureChangeRate, fix abbreviations Apr 9, 2021
@angularsen angularsen merged commit 7b742aa into angularsen:master Apr 9, 2021
@angularsen
Copy link
Owner

Thanks a lot! Nuget is on the way out.

Release UnitsNet/4.89.0 · angularsen/UnitsNet

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.

2 participants