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

Replaced 'L' with 'l' for liter abbreviations #1503

Open
wants to merge 6 commits into
base: release/v6
Choose a base branch
from

Conversation

Jagailo
Copy link
Contributor

@Jagailo Jagailo commented Jan 20, 2025

When I was reading the article on adding new units I noticed this line:

Use abbreviations defined by SI Unit System, such as l instead of L for liters

I ran a script and about half of the "liters" use L and the other half use l. Even within the same quantity, different liters are used:
image

In this pull request I replaced L with l according to abbreviation naming conventions. Open to any suggestions on how else this could be handled.

angularsen and others added 6 commits January 2, 2025 11:50
…en#1484)

Fixes angularsen#1423

`UnitParser.Parse<LengthUnit>("MM")` fails due to matching both
`Megameter` and `Millimeter` in case-insensitive matching, but matches
neither of them in the case-sensitive fallback. It was confusing to get
`UnitsNotFoundException` in this case, since case-insensitive usually
works for most units.

### Changes
- Handle this case and throw `AmbiguousUnitParseException` instead of
`UnitNotFoundException`
- Describe the case-insensitive units that matched
- Fix existing test
`Parse_WithMultipleCaseInsensitiveMatchesButNoExactMatches_ThrowsUnitNotFoundException`
- Skip retrying with fallback culture if no specific `formatProvider`
was given
CI build failed due net7.0 no longer being available.
Fixes CI build due to net7 no longer being available.

New convention for target frameworks:
- netstandard2.0
- latest LTS version (net8.0)
- any newer STS versions (net9.0)
**AreaMomentOfInertia:**
> Use superscript (cm², m³) instead of cm^2, m^3

**MolarEntropy:**
> Use · for products (N·m instead of Nm, N*m or N.m)

**SpecificEntropy:**
> Use · for products (N·m instead of Nm, N*m or N.m)

Using parentheses for mathematically correct display; using the correct
symbol for degrees Celsius

**SpecificFuelConsumption:**
It looks like some unusual multiplication sign was used

**WarpingMomentOfInertia:**
> Use superscript (cm², m³) instead of cm^2, m^3

---

For ^4 and ^6 UnitParser.NormalizeUnitString() will handle this
situation

---------

Co-authored-by: Alexey Yagelo <[email protected]>
Co-authored-by: Andreas Gullberg Larsen <[email protected]>
Copy link

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@angularsen
Copy link
Owner

Sorry for no response on this one, I'm positive to make this change, but please retarget the PR for release/v6 branch. It's probably not a breaking change per-se, but it feels like something that belongs in the next major version bump.

@Jagailo Jagailo changed the base branch from master to release/v6 March 25, 2025 20:51
@Jagailo
Copy link
Contributor Author

Jagailo commented Mar 25, 2025

Moved to another branch

@angularsen
Copy link
Owner

There are some merge conflicts to handle after changing target branch.

Depending on your comfort level with Git it may be easier to just start over and manually copy the changes and re-generate. I believe most of your changes should still work for release/v6, and the conflicts are mostly related to the generated code.

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