Skip to content

Commit 165597b

Browse files
authored
Merge pull request #148 from CitrineInformatics/feature/inch-pounds
Add inch-pounds to default unit set
2 parents b8960a5 + 4f1cfb3 commit 165597b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

gemd/units/citrine_en.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ centimeter_H2O = centimeter * water * g_0 = cmH2O = cm_H2O
352352
# Torque
353353
[torque] = [force] * [length]
354354
foot_pound = foot * force_pound = ft_lb = footpound
355+
inch_pound = inch * force_pound = in_lb = inchpound
355356

356357
# Viscosity
357358
[viscosity] = [pressure] * [time]

gemd/units/tests/test_parser.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ def test_parse_none():
4646
assert parse_units(None) is None
4747

4848

49+
def test_conversion():
50+
"""Tests that check if particular units are interoperable."""
51+
conversions = {"in_lb": "foot_pound"}
52+
for source, dest in conversions.items():
53+
assert convert_units(convert_units(1, source, dest), dest, source) == 1
54+
55+
4956
@contextmanager
5057
def _change_units(filename):
5158
try:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
setup(name='gemd',
5-
version='1.0.1',
5+
version='1.0.2',
66
url='http://github.com/CitrineInformatics/gemd-python',
77
description="Python binding for Citrine's GEMD data model",
88
author='Max Hutchinson',

0 commit comments

Comments
 (0)