summaryrefslogtreecommitdiff
path: root/src/hydrilla/builder
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-02-09 14:41:05 +0100
committerWojtek Kosior <koszko@koszko.org>2022-02-09 14:41:05 +0100
commit456ad6c0760329943f4f8e2b2b7dc0e260cba128 (patch)
tree8a2310e8e9c7e515284c4f29169602482be870a6 /src/hydrilla/builder
parent8c65ebbddf7a3929b82848efa8f404d8ea56200a (diff)
downloadhydrilla-builder-456ad6c0760329943f4f8e2b2b7dc0e260cba128.tar.gz
hydrilla-builder-456ad6c0760329943f4f8e2b2b7dc0e260cba128.zip
include new schemas in package and in tests
Diffstat (limited to 'src/hydrilla/builder')
-rw-r--r--src/hydrilla/builder/build.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hydrilla/builder/build.py b/src/hydrilla/builder/build.py
index dae5579..3503f7a 100644
--- a/src/hydrilla/builder/build.py
+++ b/src/hydrilla/builder/build.py
@@ -35,7 +35,7 @@ import jsonschema
from .. import util
-index_json_schema = util.load_schema('package_source-1.schema.json')
+index_validator = util.validator_for('package_source-1.schema.json')
class FileReferenceError(Exception):
"""
@@ -275,8 +275,8 @@ class Build:
item_list.append(new_item_obj)
- return dict([(prop, new_item_obj[prop])
- for prop in ('type', 'identifier', 'version')])
+ props_in_ref = ('type', 'identifier', 'version', 'long_name')
+ return dict([(prop, new_item_obj[prop]) for prop in props_in_ref])
def _process_index_json(self, index_obj: dict):
"""
@@ -285,7 +285,7 @@ class Build:
files and computed definitions of the source package and items defined
in it.
"""
- jsonschema.validate(index_obj, index_json_schema)
+ index_validator.validate(index_obj)
self.source_name = index_obj['source_name']