From 47d3741aa3d9e330e052c9a5963c9f0a627b41dc Mon Sep 17 00:00:00 2001 From: Marc Foley Date: Thu, 1 Jul 2021 09:25:09 +0100 Subject: [PATCH] Builder schema: Allow floats in STAT table Fixes #382 --- Lib/gftools/builder/schema.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Lib/gftools/builder/schema.py b/Lib/gftools/builder/schema.py index 4490ea1e0..61dd1bd0f 100644 --- a/Lib/gftools/builder/schema.py +++ b/Lib/gftools/builder/schema.py @@ -7,6 +7,7 @@ MapPattern, Str, Int, + Float, Seq, YAMLError, Optional, @@ -21,11 +22,11 @@ "values": Seq( Map({ "name": Str(), - "value": Int(), - Optional("nominalValue"): Int(), - Optional("linkedValue"): Int(), - Optional("rangeMinValue"): Int(), - Optional("rangeMaxValue"): Int(), + "value": Int() | Float(), + Optional("nominalValue"): Int() | Float(), + Optional("linkedValue"): Int() | Float(), + Optional("rangeMinValue"): Int() | Float(), + Optional("rangeMaxValue"): Int() | Float(), Optional("flags"): Int() }) ) @@ -36,7 +37,7 @@ Map({ "name": Str(), Optional("flags"): Int(), - "location": MapPattern(Str(), Int()), + "location": MapPattern(Str(), Int() | Float()), }) ) @@ -44,7 +45,7 @@ Map({ Optional("familyName"): Str(), Optional("styleName"): Str(), - "coordinates": MapPattern(Str(), Int()), + "coordinates": MapPattern(Str(), Int() | Float()), }) ))