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

Handle units containing 'degree' and 'per' correctly #56

Merged
merged 5 commits into from Oct 21, 2018
Merged

Handle units containing 'degree' and 'per' correctly #56

merged 5 commits into from Oct 21, 2018

Conversation

nielstron
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Sep 27, 2018

Pull Request Test Coverage Report for Build 55

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 99.072%

Totals Coverage Status
Change from base Build 32: 0.005%
Covered Lines: 1174
Relevant Lines: 1185

💛 - Coveralls

def test_unit_handling_fractional():
test_cases = {
'pound per square inch': 'pounds per square inch',
'pound-force per square inch': 'pound-forces per square inch',
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bad example, I think the real plural is something like "pounds-force per square inch"!

Copy link
Contributor Author

@nielstron nielstron Sep 27, 2018

Choose a reason for hiding this comment

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

No I think this is correct:
"pound-force (plural pound-forces)" from Wiktionary

I do agree though that at first sight this does not sound correct...

Copy link
Contributor

Choose a reason for hiding this comment

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

Here's the Oxford English Dictionary:

image

None of the other 10 dictionaries I checked show a plural form at all.

Google Books has 66 results for "pounds force per inch".

But only two results for "pound forces per inch".

The plural form on Wiktionary was added when the en-noun template was simply added, without taking care of the special-case plural:

{{en-noun|head=[[pound]]-[[force]]}}

https://en.wiktionary.org/w/index.php?title=pound-force&diff=13830692&oldid=13487437

I've fixed Wiktionary.

Copy link
Contributor

Choose a reason for hiding this comment

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

Metric is so much easier :)

Copy link
Contributor Author

@nielstron nielstron Sep 27, 2018

Choose a reason for hiding this comment

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

Alright, fixed pluralization of 'pound-force' (and 'pound-weight' I hope) too

test_cases = {
# Heat transfer coefficient unit
'watt per square meter degree celsius': 'watts per square meter degree celsius',
'degree celsius per hour': 'degrees celsius per hour'
Copy link
Contributor

Choose a reason for hiding this comment

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

Big C in "Celsius"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This needs #55 then to be merged into master to work.

@jaraco jaraco merged commit 8d79440 into jaraco:master Oct 21, 2018
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.

None yet

4 participants