'config': { 'type': 'object', 'default': {}, 'properties': { 'shared_linking': { 'type': 'string', 'enum': ['rpath', 'runpath'] }, 'install_tree': { 'anyOf': [ { 'type': 'object', 'properties': union_dicts( {'root': {'type': 'string'}}, {'padded_length': {'oneOf': [ {'type': 'integer', 'minimum': 0}, {'type': 'boolean'}]}}, spack.schema.projections.properties, ), }, {'type': 'string'} # deprecated ], }, 'install_hash_length': {'type': 'integer', 'minimum': 1}, 'install_path_scheme': {'type': 'string'}, # deprecated 'build_stage': { 'oneOf': [ {'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}], },
union_dicts( # merged configuration scope schemas spack.schema.merged.properties, # extra environment schema properties { 'include': { 'type': 'array', 'default': [], 'items': { 'type': 'string' }, }, 'develop': { 'type': 'object', 'default': {}, 'additionalProperties': False, 'patternProperties': { r'\w[\w-]*': { 'type': 'object', 'additionalProperties': False, 'properties': { 'spec': { 'type': 'string' }, 'path': { 'type': 'string' }, }, }, }, }, 'definitions': { 'type': 'array', 'default': [], 'items': { 'type': 'object', 'properties': { 'when': { 'type': 'string' } }, 'patternProperties': { r'^(?!when$)\w*': spec_list_schema } } }, 'specs': spec_list_schema, 'view': { 'anyOf': [{ 'type': 'boolean' }, { 'type': 'string' }, { 'type': 'object', 'patternProperties': { r'\w+': { 'required': ['root'], 'additionalProperties': False, 'properties': { 'root': { 'type': 'string' }, 'link': { 'type': 'string', 'pattern': '(roots|all)', }, 'link_type': { 'type': 'string' }, 'select': { 'type': 'array', 'items': { 'type': 'string' } }, 'exclude': { 'type': 'array', 'items': { 'type': 'string' } }, 'projections': projections_scheme } } } }] }, 'concretization': { 'type': 'string', 'enum': ['together', 'separately'], 'default': 'separately' } })
union_dicts( # merged configuration scope schemas spack.schema.merged.properties, # extra environment schema properties { 'include': { 'type': 'array', 'items': { 'type': 'string' }, }, 'specs': { # Specs is a list of specs, which can have # optional additional properties in a sub-dict 'type': 'array', 'default': [], 'additionalProperties': False, 'items': { 'anyOf': [ { 'type': 'string' }, { 'type': 'null' }, { 'type': 'object' }, ] } } })
"""Schema for configuration merged into one file. .. literalinclude:: ../spack/schema/merged.py :lines: 39- """ from llnl.util.lang import union_dicts import spack.schema.compilers import spack.schema.config import spack.schema.mirrors import spack.schema.modules import spack.schema.packages import spack.schema.repos import spack.schema.upstreams #: Properties for inclusion in other schemas properties = union_dicts( spack.schema.compilers.properties, spack.schema.config.properties, spack.schema.mirrors.properties, spack.schema.modules.properties, spack.schema.packages.properties, spack.schema.repos.properties, spack.schema.upstreams.properties) #: Full schema with metadata schema = { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack merged configuration file schema', 'type': 'object', 'additionalProperties': False, 'properties': properties, }
import spack.schema.bootstrap import spack.schema.cdash import spack.schema.compilers import spack.schema.config import spack.schema.container import spack.schema.gitlab_ci import spack.schema.mirrors import spack.schema.modules import spack.schema.packages import spack.schema.repos import spack.schema.upstreams #: Properties for inclusion in other schemas properties = union_dicts( spack.schema.bootstrap.properties, spack.schema.cdash.properties, spack.schema.compilers.properties, spack.schema.config.properties, spack.schema.container.properties, spack.schema.gitlab_ci.properties, spack.schema.mirrors.properties, spack.schema.modules.properties, spack.schema.packages.properties, spack.schema.repos.properties, spack.schema.upstreams.properties) #: Full schema with metadata schema = { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack merged configuration file schema', 'type': 'object', 'additionalProperties': False, 'properties': properties, }
core_shared_properties = union_dicts( runner_attributes_schema_items, { 'bootstrap': { 'type': 'array', 'items': { 'anyOf': [ { 'type': 'string', }, { 'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': { 'name': { 'type': 'string', }, 'compiler-agnostic': { 'type': 'boolean', 'default': False, }, }, }, ], }, }, 'mappings': { 'type': 'array', 'items': { 'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': { 'match': { 'type': 'array', 'items': { 'type': 'string', }, }, 'runner-attributes': runner_selector_schema, }, }, }, 'service-job-attributes': runner_selector_schema, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, }, )
'default': {}, 'additionalProperties': False, 'properties': union_dicts( # merged configuration scope schemas spack.schema.merged.properties, # extra environment schema properties { 'include': { 'type': 'array', 'items': { 'type': 'string' }, }, 'specs': { # Specs is a list of specs, which can have # optional additional properties in a sub-dict 'type': 'array', 'default': [], 'additionalProperties': False, 'items': { 'anyOf': [ {'type': 'string'}, {'type': 'null'}, {'type': 'object'}, ] } } } ) } }
'type': 'object', 'default': {}, 'properties': { 'shared_linking': { 'type': 'string', 'enum': ['rpath', 'runpath'] }, 'install_tree': { 'anyOf': [ { 'type': 'object', 'properties': union_dicts( {'root': { 'type': 'string' }}, spack.schema.projections.properties, ), }, { 'type': 'string' } # deprecated ], }, 'install_hash_length': { 'type': 'integer', 'minimum': 1 }, 'install_path_scheme': { 'type': 'string' }, # deprecated
""" from llnl.util.lang import union_dicts import spack.schema.compilers import spack.schema.config import spack.schema.mirrors import spack.schema.modules import spack.schema.packages import spack.schema.repos #: Properties for inclusion in other schemas properties = union_dicts( spack.schema.compilers.properties, spack.schema.config.properties, spack.schema.mirrors.properties, spack.schema.modules.properties, spack.schema.packages.properties, spack.schema.repos.properties ) #: Full schema with metadata schema = { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack merged configuration file schema', 'definitions': spack.schema.modules.definitions, 'type': 'object', 'additionalProperties': False, 'properties': properties, }