Project

General

Profile

« Previous | Next » 

Revision 456ad6c0

Added by koszko over 1 year ago

include new schemas in package and in tests

View differences:

src/hydrilla/builder/build.py
35 35

  
36 36
from .. import util
37 37

  
38
index_json_schema = util.load_schema('package_source-1.schema.json')
38
index_validator = util.validator_for('package_source-1.schema.json')
39 39

  
40 40
class FileReferenceError(Exception):
41 41
    """
......
275 275

  
276 276
        item_list.append(new_item_obj)
277 277

  
278
        return dict([(prop, new_item_obj[prop])
279
                     for prop in ('type', 'identifier', 'version')])
278
        props_in_ref = ('type', 'identifier', 'version', 'long_name')
279
        return dict([(prop, new_item_obj[prop]) for prop in props_in_ref])
280 280

  
281 281
    def _process_index_json(self, index_obj: dict):
282 282
        """
......
285 285
        files and computed definitions of the source package and items defined
286 286
        in it.
287 287
        """
288
        jsonschema.validate(index_obj, index_json_schema)
288
        index_validator.validate(index_obj)
289 289

  
290 290
        self.source_name = index_obj['source_name']
291 291

  

Also available in: Unified diff