Repository: ESSS/barril

Issue:
Unit 'St' is not valid for quantity type 'volume per time per length'.
* Barril version: 1.10.0
* Python version: 3.6.7
* Operating System: Ubuntu 20.10

### Description

- `St` (Stokes) is one of the basic unit used by the kinematic viscosity magnitude. 
- Barril supports `cSt` (a variant of Stoke), but doesn't recognize the central unit. 

### What I Did

The following error is raised when I try to add a category with the `St` unit into the unit database.

```
E   ValueError: unit 'St' is not valid for quantity type 'volume per time per length'.
E   Quantity units: ['Mcf/d.ft', 'Mm3/d.m', 'Mm3/h.m', 'bbl/d.ft', 'cSt', 'cm2/s', 'ft2/d', 'ft2/h', 'ft2/s', 'galUK/hr.ft', 'galUK/hr.in', 'galUK/min.ft', 'galUS/hr.ft', 'galUS/hr.in', 'galUS/min.ft', 'in2/s', 'm2/d', 'm2/h', 'm2/s', 'm3/d.m', 'm3/h.m', 'm3/s.ft', 'm3/s.m', 'mm2/s']
```

Discussion:

Patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 21465bd..3fb83c7 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,3 +1,8 @@
+UNRELEASED
+------------------
+
+* Add new unit: "Stokes" (``St``).
+
 1.10.0 (2020-10-22)
 -------------------
 
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 23d7e2c..cb3085d 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -101,9 +101,9 @@ Before you submit a pull request, check that it meets these guidelines:
 2. If the pull request adds functionality, the docs should be updated. Put
    your new functionality into a function with a docstring, and add the
    feature to the list in README.rst.
-3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check
-   https://travis-ci.org/ESSS/barril/pull_requests
-   and make sure that the tests pass for all supported Python versions.
+3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy.
+   Check the `Actions` tab on GitHub and make sure that the tests pass for
+   all supported Python versions.
 
 Tips
 ----
diff --git a/src/barril/units/posc.py b/src/barril/units/posc.py
index e48c763..adc920f 100644
--- a/src/barril/units/posc.py
+++ b/src/barril/units/posc.py
@@ -1923,6 +1923,16 @@ def FillUnitDatabaseWithPosc(db=None, fill_categories=True, override_categories=
     db.AddUnit(
         "time", "ten milli second", "cs", f_base_to_unit, f_unit_to_base, default_category=None
     )
+    f_unit_to_base = MakeCustomaryToBase(0.0, 0.0001, 1.0, 0.0)
+    f_base_to_unit = MakeBaseToCustomary(0.0, 0.0001, 1.0, 0.0)
+    db.AddUnit(
+        "volume per time per length",
+        "Stoke",
+        "St",
+        f_base_to_unit,
+        f_unit_to_base,
+        default_category=None,
+    )
     f_unit_to_base = MakeCustomaryToBase(0.0, 0.000001, 1.0, 0.0)
     f_base_to_unit = MakeBaseToCustomary(0.0, 0.000001, 1.0, 0.0)
     db.AddUnit(
@@ -13961,6 +13971,7 @@ def FillUnitDatabaseWithPosc(db=None, fill_categories=True, override_categories=
             valid_units=[
                 "m2/s",
                 "cm2/s",
+                "St",
                 "cSt",
                 "ft2/h",
                 "ft2/s",
@@ -13984,6 +13995,7 @@ def FillUnitDatabaseWithPosc(db=None, fill_categories=True, override_categories=
             valid_units=[
                 "m2/s",
                 "cm2/s",
+                "St",
                 "cSt",
                 "ft2/h",
                 "ft2/s",


Test patch:
diff --git a/src/barril/units/_tests/test_posc.py b/src/barril/units/_tests/test_posc.py
index e341e04..ce7009e 100644
--- a/src/barril/units/_tests/test_posc.py
+++ b/src/barril/units/_tests/test_posc.py
@@ -188,6 +188,22 @@ def testPoscMassPerEnergy(unit_database_posc):
     assert approx(abs(default.GetValue("lbm/Btu") - 1.0 / 0.0004299226139295), 7) == 0
 
 
+def testKinematicViscosity(unit_database_posc):
+    default = units.Scalar("kinematic viscosity", 1, "m2/s")
+    assert default.GetQuantityType() == "volume per time per length"
+    assert approx(abs(default.value - 1.0), 7) == 0
+    assert approx(abs(default.GetValue("cm2/s") - 10000.0), 7) == 0
+    assert approx(abs(default.GetValue("St") - 10000.0), 7) == 0
+    assert approx(abs(default.GetValue("cSt") - 1000000.0), 7) == 0
+    assert approx(abs(default.GetValue("ft2/h") - 318750.077500155), 7) == 0
+    assert approx(abs(default.GetValue("ft2/s") - 10.763910416709722), 7) == 0
+    assert approx(abs(default.GetValue("in2/s") - 1550.0031000062002), 7) == 0
+    assert approx(abs(default.GetValue("m2/h") - 3600.0), 7) == 0
+    assert approx(abs(default.GetValue("mm2/s") - 1000000.0), 7) == 0
+    assert approx(abs(default.GetValue("m2/d") - 86400.0), 7) == 0
+    assert approx(abs(default.GetValue("ft2/d") - 930001.8600037199), 7) == 0
+
+
 def testCreateVolumeQuantityFromLengthQuantity(unit_database_posc):
     unit_database = unit_database_posc
     length_units = unit_database.GetValidUnits("length")