spack.schema package

Submodules

spack.schema.bootstrap module

Schema for bootstrap.yaml configuration file.

spack.schema.bootstrap.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'bootstrap': {'properties': {'enable': {'type': 'boolean'}, 'root': {'type': 'string'}, 'sources': {'items': {'additionalProperties': False, 'properties': {'metadata': {'type': 'string'}, 'name': {'type': 'string'}}, 'required': ['name', 'metadata'], 'type': 'object'}, 'type': 'array'}, 'trusted': {'patternProperties': {'\\w[\\w-]*': {'type': 'boolean'}}, 'type': 'object'}}, 'type': 'object'}}, 'title': 'Spack bootstrap configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.buildcache_spec module

Schema for a buildcache spec.yaml file

    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack buildcache specfile schema",
    "type": "object",
    "additionalProperties": False,
    "properties": {
        "buildinfo": {
            "type": "object",
            "additionalProperties": False,
            "required": ["relative_prefix"],
            "properties": {
                "relative_prefix": {"type": "string"},
                "relative_rpaths": {"type": "boolean"},
            },
        },
        "spec": {
            "type": "object",
            "additionalProperties": True,
            "items": spack.schema.spec.properties,
        },
        "binary_cache_checksum": {
            "type": "object",
            "properties": {
                "hash_algorithm": {"type": "string"},
                "hash": {"type": "string"},
            },
        },
        "buildcache_layout_version": {"type": "number"},
    },
}

spack.schema.cdash module

Schema for cdash.yaml configuration file.

#: Properties for inclusion in other schemas
properties = {
    "cdash": {
        "type": "object",
        "additionalProperties": False,
        "required": ["build-group", "url", "project", "site"],
        "patternProperties": {
            r"build-group": {"type": "string"},
            r"url": {"type": "string"},
            r"project": {"type": "string"},
            r"site": {"type": "string"},
        },
    },
}


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack cdash configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.cdash.properties = {'cdash': {'additionalProperties': False, 'patternProperties': {'build-group': {'type': 'string'}, 'project': {'type': 'string'}, 'site': {'type': 'string'}, 'url': {'type': 'string'}}, 'required': ['build-group', 'url', 'project', 'site'], 'type': 'object'}}

Properties for inclusion in other schemas

spack.schema.cdash.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'cdash': {'additionalProperties': False, 'patternProperties': {'build-group': {'type': 'string'}, 'project': {'type': 'string'}, 'site': {'type': 'string'}, 'url': {'type': 'string'}}, 'required': ['build-group', 'url', 'project', 'site'], 'type': 'object'}}, 'title': 'Spack cdash configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.compilers module

Schema for compilers.yaml configuration file.

#: Properties for inclusion in other schemas
properties = {
    "compilers": {
        "type": "array",
        "items": [
            {
                "type": "object",
                "additionalProperties": False,
                "properties": {
                    "compiler": {
                        "type": "object",
                        "additionalProperties": False,
                        "required": ["paths", "spec", "modules", "operating_system"],
                        "properties": {
                            "paths": {
                                "type": "object",
                                "required": ["cc", "cxx", "f77", "fc"],
                                "additionalProperties": False,
                                "properties": {
                                    "cc": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                    "cxx": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                    "f77": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                    "fc": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                },
                            },
                            "flags": {
                                "type": "object",
                                "additionalProperties": False,
                                "properties": {
                                    "cflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                    "cxxflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                    "fflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                    "cppflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                    "ldflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                    "ldlibs": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                                },
                            },
                            "spec": {"type": "string"},
                            "operating_system": {"type": "string"},
                            "target": {"type": "string"},
                            "alias": {"anyOf": [{"type": "string"}, {"type": "null"}]},
                            "modules": {
                                "anyOf": [{"type": "string"}, {"type": "null"}, {"type": "array"}]
                            },
                            "implicit_rpaths": {
                                "anyOf": [
                                    {"type": "array", "items": {"type": "string"}},
                                    {"type": "boolean"},
                                ]
                            },
                            "environment": spack.schema.environment.definition,
                            "extra_rpaths": {
                                "type": "array",
                                "default": [],
                                "items": {"type": "string"},
                            },
                        },
                    }
                },
            }
        ],
    }
}


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack compiler configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.compilers.properties = {'compilers': {'items': [{'type': 'object', 'additionalProperties': False, 'properties': {'compiler': {'type': 'object', 'additionalProperties': False, 'required': ['paths', 'spec', 'modules', 'operating_system'], 'properties': {'paths': {'type': 'object', 'required': ['cc', 'cxx', 'f77', 'fc'], 'additionalProperties': False, 'properties': {'cc': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cxx': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'f77': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'fc': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}}, 'flags': {'type': 'object', 'additionalProperties': False, 'properties': {'cflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cxxflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'fflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cppflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ldflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ldlibs': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}}, 'spec': {'type': 'string'}, 'operating_system': {'type': 'string'}, 'target': {'type': 'string'}, 'alias': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'modules': {'anyOf': [{'type': 'string'}, {'type': 'null'}, {'type': 'array'}]}, 'implicit_rpaths': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}}, {'type': 'boolean'}]}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}, 'extra_rpaths': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}}}], 'type': 'array'}}

Properties for inclusion in other schemas

spack.schema.compilers.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'compilers': {'items': [{'type': 'object', 'additionalProperties': False, 'properties': {'compiler': {'type': 'object', 'additionalProperties': False, 'required': ['paths', 'spec', 'modules', 'operating_system'], 'properties': {'paths': {'type': 'object', 'required': ['cc', 'cxx', 'f77', 'fc'], 'additionalProperties': False, 'properties': {'cc': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cxx': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'f77': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'fc': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}}, 'flags': {'type': 'object', 'additionalProperties': False, 'properties': {'cflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cxxflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'fflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cppflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ldflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ldlibs': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}}, 'spec': {'type': 'string'}, 'operating_system': {'type': 'string'}, 'target': {'type': 'string'}, 'alias': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'modules': {'anyOf': [{'type': 'string'}, {'type': 'null'}, {'type': 'array'}]}, 'implicit_rpaths': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}}, {'type': 'boolean'}]}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}, 'extra_rpaths': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}}}], 'type': 'array'}}, 'title': 'Spack compiler configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.concretizer module

Schema for concretizer.yaml configuration file.

    "concretizer": {
        "type": "object",
        "additionalProperties": False,
        "properties": {
            "reuse": {"type": "boolean"},
            "enable_node_namespace": {"type": "boolean"},
            "targets": {
                "type": "object",
                "properties": {
                    "host_compatible": {"type": "boolean"},
                    "granularity": {"type": "string", "enum": ["generic", "microarchitectures"]},
                },
            },
            "unify": {
                "oneOf": [{"type": "boolean"}, {"type": "string", "enum": ["when_possible"]}]
            },
        },
    }
}


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack concretizer configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.concretizer.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'concretizer': {'additionalProperties': False, 'properties': {'enable_node_namespace': {'type': 'boolean'}, 'reuse': {'type': 'boolean'}, 'targets': {'properties': {'granularity': {'enum': ['generic', 'microarchitectures'], 'type': 'string'}, 'host_compatible': {'type': 'boolean'}}, 'type': 'object'}, 'unify': {'oneOf': [{'type': 'boolean'}, {'type': 'string', 'enum': ['when_possible']}]}}, 'type': 'object'}}, 'title': 'Spack concretizer configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.config module

Schema for config.yaml configuration file.

import spack.schema.projections

#: Properties for inclusion in other schemas
properties = {
    "config": {
        "type": "object",
        "default": {},
        "properties": {
            "flags": {
                "type": "object",
                "properties": {
                    "keep_werror": {"type": "string", "enum": ["all", "specific", "none"]},
                },
            },
            "shared_linking": {
                "anyOf": [
                    {"type": "string", "enum": ["rpath", "runpath"]},
                    {
                        "type": "object",
                        "properties": {
                            "type": {"type": "string", "enum": ["rpath", "runpath"]},
                            "bind": {"type": "boolean"},
                        },
                    },
                ]
            },
            "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"}}],
            },
            "test_stage": {"type": "string"},
            "extensions": {"type": "array", "items": {"type": "string"}},
            "template_dirs": {"type": "array", "items": {"type": "string"}},
            "license_dir": {"type": "string"},
            "source_cache": {"type": "string"},
            "misc_cache": {"type": "string"},
            "connect_timeout": {"type": "integer", "minimum": 0},
            "verify_ssl": {"type": "boolean"},
            "suppress_gpg_warnings": {"type": "boolean"},
            "install_missing_compilers": {"type": "boolean"},
            "debug": {"type": "boolean"},
            "checksum": {"type": "boolean"},
            "deprecated": {"type": "boolean"},
            "locks": {"type": "boolean"},
            "dirty": {"type": "boolean"},
            "build_language": {"type": "string"},
            "build_jobs": {"type": "integer", "minimum": 1},
            "ccache": {"type": "boolean"},
            "concretizer": {"type": "string", "enum": ["original", "clingo"]},
            "db_lock_timeout": {"type": "integer", "minimum": 1},
            "package_lock_timeout": {
                "anyOf": [{"type": "integer", "minimum": 1}, {"type": "null"}],
            },
            "allow_sgid": {"type": "boolean"},
            "binary_index_root": {"type": "string"},
            "url_fetch_method": {"type": "string", "enum": ["urllib", "curl"]},
            "additional_external_search_paths": {"type": "array", "items": {"type": "string"}},
            "binary_index_ttl": {"type": "integer", "minimum": 0},
        },
        "deprecatedProperties": {
            "properties": ["module_roots"],
            "message": "config:module_roots has been replaced by "
            "modules:[module set]:roots and is ignored",
            "error": False,
        },
    },
}


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack core configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}


def update(data):
    """Update the data in place to remove deprecated properties.

    Args:
        data (dict): dictionary to be updated

    Returns:
        True if data was changed, False otherwise
    """
    # currently deprecated properties are
    # install_tree: <string>
    # install_path_scheme: <string>
    # updated: install_tree: {root: <string>,
    #                         projections: <projections_dict}
    # root replaces install_tree, projections replace install_path_scheme
    changed = False

    install_tree = data.get("install_tree", None)
    if isinstance(install_tree, str):
        # deprecated short-form install tree
        # add value as `root` in updated install_tree
        data["install_tree"] = {"root": install_tree}
        changed = True

    install_path_scheme = data.pop("install_path_scheme", None)
    if install_path_scheme:
        projections_data = {"projections": {"all": install_path_scheme}}

        # update projections with install_scheme
        # whether install_tree was updated or not
        # we merge the yaml to ensure we don't invalidate other projections
        update_data = data.get("install_tree", {})
        update_data = spack.config.merge_yaml(update_data, projections_data)
        data["install_tree"] = update_data
        changed = True

    use_curl = data.pop("use_curl", None)
    if use_curl is not None:
        data["url_fetch_method"] = "curl" if use_curl else "urllib"
        changed = True

    shared_linking = data.get("shared_linking", None)
    if isinstance(shared_linking, str):
        # deprecated short-form shared_linking: rpath/runpath
        # add value as `type` in updated shared_linking
        data["shared_linking"] = {"type": shared_linking, "bind": False}
        changed = True

    return changed
spack.schema.config.properties = {'config': {'default': {}, 'deprecatedProperties': {'error': False, 'message': 'config:module_roots has been replaced by modules:[module set]:roots and is ignored', 'properties': ['module_roots']}, 'properties': {'additional_external_search_paths': {'items': {'type': 'string'}, 'type': 'array'}, 'allow_sgid': {'type': 'boolean'}, 'binary_index_root': {'type': 'string'}, 'binary_index_ttl': {'minimum': 0, 'type': 'integer'}, 'build_jobs': {'minimum': 1, 'type': 'integer'}, 'build_language': {'type': 'string'}, 'build_stage': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, 'ccache': {'type': 'boolean'}, 'checksum': {'type': 'boolean'}, 'concretizer': {'enum': ['original', 'clingo'], 'type': 'string'}, 'connect_timeout': {'minimum': 0, 'type': 'integer'}, 'db_lock_timeout': {'minimum': 1, 'type': 'integer'}, 'debug': {'type': 'boolean'}, 'deprecated': {'type': 'boolean'}, 'dirty': {'type': 'boolean'}, 'extensions': {'items': {'type': 'string'}, 'type': 'array'}, 'flags': {'properties': {'keep_werror': {'enum': ['all', 'specific', 'none'], 'type': 'string'}}, 'type': 'object'}, 'install_hash_length': {'minimum': 1, 'type': 'integer'}, 'install_missing_compilers': {'type': 'boolean'}, 'install_path_scheme': {'type': 'string'}, 'install_tree': {'anyOf': [{'type': 'object', 'properties': {'root': {'type': 'string'}, 'padded_length': {'oneOf': [{'type': 'integer', 'minimum': 0}, {'type': 'boolean'}]}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}}}, {'type': 'string'}]}, 'license_dir': {'type': 'string'}, 'locks': {'type': 'boolean'}, 'misc_cache': {'type': 'string'}, 'package_lock_timeout': {'anyOf': [{'type': 'integer', 'minimum': 1}, {'type': 'null'}]}, 'shared_linking': {'anyOf': [{'type': 'string', 'enum': ['rpath', 'runpath']}, {'type': 'object', 'properties': {'type': {'type': 'string', 'enum': ['rpath', 'runpath']}, 'bind': {'type': 'boolean'}}}]}, 'source_cache': {'type': 'string'}, 'suppress_gpg_warnings': {'type': 'boolean'}, 'template_dirs': {'items': {'type': 'string'}, 'type': 'array'}, 'test_stage': {'type': 'string'}, 'url_fetch_method': {'enum': ['urllib', 'curl'], 'type': 'string'}, 'verify_ssl': {'type': 'boolean'}}, 'type': 'object'}}

Properties for inclusion in other schemas

spack.schema.config.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'config': {'default': {}, 'deprecatedProperties': {'error': False, 'message': 'config:module_roots has been replaced by modules:[module set]:roots and is ignored', 'properties': ['module_roots']}, 'properties': {'additional_external_search_paths': {'items': {'type': 'string'}, 'type': 'array'}, 'allow_sgid': {'type': 'boolean'}, 'binary_index_root': {'type': 'string'}, 'binary_index_ttl': {'minimum': 0, 'type': 'integer'}, 'build_jobs': {'minimum': 1, 'type': 'integer'}, 'build_language': {'type': 'string'}, 'build_stage': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, 'ccache': {'type': 'boolean'}, 'checksum': {'type': 'boolean'}, 'concretizer': {'enum': ['original', 'clingo'], 'type': 'string'}, 'connect_timeout': {'minimum': 0, 'type': 'integer'}, 'db_lock_timeout': {'minimum': 1, 'type': 'integer'}, 'debug': {'type': 'boolean'}, 'deprecated': {'type': 'boolean'}, 'dirty': {'type': 'boolean'}, 'extensions': {'items': {'type': 'string'}, 'type': 'array'}, 'flags': {'properties': {'keep_werror': {'enum': ['all', 'specific', 'none'], 'type': 'string'}}, 'type': 'object'}, 'install_hash_length': {'minimum': 1, 'type': 'integer'}, 'install_missing_compilers': {'type': 'boolean'}, 'install_path_scheme': {'type': 'string'}, 'install_tree': {'anyOf': [{'type': 'object', 'properties': {'root': {'type': 'string'}, 'padded_length': {'oneOf': [{'type': 'integer', 'minimum': 0}, {'type': 'boolean'}]}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}}}, {'type': 'string'}]}, 'license_dir': {'type': 'string'}, 'locks': {'type': 'boolean'}, 'misc_cache': {'type': 'string'}, 'package_lock_timeout': {'anyOf': [{'type': 'integer', 'minimum': 1}, {'type': 'null'}]}, 'shared_linking': {'anyOf': [{'type': 'string', 'enum': ['rpath', 'runpath']}, {'type': 'object', 'properties': {'type': {'type': 'string', 'enum': ['rpath', 'runpath']}, 'bind': {'type': 'boolean'}}}]}, 'source_cache': {'type': 'string'}, 'suppress_gpg_warnings': {'type': 'boolean'}, 'template_dirs': {'items': {'type': 'string'}, 'type': 'array'}, 'test_stage': {'type': 'string'}, 'url_fetch_method': {'enum': ['urllib', 'curl'], 'type': 'string'}, 'verify_ssl': {'type': 'boolean'}}, 'type': 'object'}}, 'title': 'Spack core configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.config.update(data)[source]

Update the data in place to remove deprecated properties.

Parameters

data (dict) – dictionary to be updated

Returns

True if data was changed, False otherwise

spack.schema.container module

Schema for the ‘container’ subsection of Spack environments.

spack.schema.container.container_schema = {'additionalProperties': False, 'properties': {'docker': {'additionalProperties': False, 'default': {}, 'type': 'object'}, 'extra_instructions': {'additionalProperties': False, 'properties': {'build': {'type': 'string'}, 'final': {'type': 'string'}}, 'type': 'object'}, 'format': {'enum': ['docker', 'singularity'], 'type': 'string'}, 'images': {'anyOf': [{'type': 'object', 'additionalProperties': False, 'properties': {'os': {'type': 'string'}, 'spack': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additional_properties': False, 'properties': {'url': {'type': 'string'}, 'ref': {'type': 'string'}, 'resolve_sha': {'type': 'boolean', 'default': False}, 'verify': {'type': 'boolean', 'default': False}}}]}}, 'required': ['os', 'spack']}, {'type': 'object', 'additionalProperties': False, 'properties': {'build': {'type': 'string'}, 'final': {'type': 'string'}}, 'required': ['build', 'final']}]}, 'labels': {'type': 'object'}, 'os_packages': {'additionalProperties': False, 'properties': {'build': {'items': {'type': 'string'}, 'type': 'array'}, 'command': {'enum': ['apt', 'yum'], 'type': 'string'}, 'final': {'items': {'type': 'string'}, 'type': 'array'}, 'update': {'type': 'boolean'}}, 'type': 'object'}, 'singularity': {'additionalProperties': False, 'default': {}, 'properties': {'help': {'type': 'string'}, 'runscript': {'type': 'string'}, 'startscript': {'type': 'string'}, 'test': {'type': 'string'}}, 'type': 'object'}, 'strip': {'default': True, 'type': 'boolean'}}, 'type': 'object'}

Schema for the container attribute included in Spack environments

spack.schema.cray_manifest module

Schema for Cray descriptive manifest: this describes a set of installed packages on the system and also specifies dependency relationships between them (so this provides more information than external entries in packages configuration).

This does not specify a configuration - it is an input format that is consumed and transformed into Spack DB records.

spack.schema.database_index module

Schema for database index.json file

                                    "oneOf": [
                                        {"type": "string"},
                                        {"type": "null"},
                                    ],
                                },
                                "installed": {"type": "boolean"},
                                "ref_count": {
                                    "type": "integer",
                                    "minimum": 0,
                                },
                                "explicit": {"type": "boolean"},
                                "installation_time": {
                                    "type": "number",
                                },
                            },
                        },
                    },
                },
                "version": {"type": "string"},
            },
        },
    },
}
spack.schema.database_index.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'database': {'additionalProperties': False, 'properties': {'installs': {'patternProperties': {'^[\\w\\d]{32}$': {'properties': {'explicit': {'type': 'boolean'}, 'installation_time': {'type': 'number'}, 'installed': {'type': 'boolean'}, 'path': {'oneOf': [{'type': 'string'}, {'type': 'null'}]}, 'ref_count': {'minimum': 0, 'type': 'integer'}, 'spec': {'spec': {'additionalProperties': False, 'properties': {'_meta': {'properties': {'version': {'type': 'number'}}, 'type': 'object'}, 'nodes': {'items': {'additionalProperties': False, 'properties': {'arch': {'additionalProperties': False, 'properties': {'platform': {}, 'platform_os': {}, 'target': {'oneOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name', 'vendor', 'features', 'generation', 'parents'], 'properties': {'name': {'type': 'string'}, 'vendor': {'type': 'string'}, 'features': {'type': 'array', 'items': {'type': 'string'}}, 'generation': {'type': 'integer'}, 'parents': {'type': 'array', 'items': {'type': 'string'}}}}]}}, 'type': 'object'}, 'build_hash': {'type': 'string'}, 'build_spec': {'additionalProperties': False, 'properties': {'hash': {'type': 'string'}, 'name': {'type': 'string'}}, 'required': ['name', 'hash'], 'type': 'object'}, 'compiler': {'additionalProperties': False, 'properties': {'name': {'type': 'string'}, 'version': {'type': 'string'}}, 'type': 'object'}, 'dependencies': {'patternProperties': {'\\w[\\w-]*': {'properties': {'hash': {'type': 'string'}, 'type': {'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}, 'develop': {'anyOf': [{'type': 'boolean'}, {'type': 'string'}]}, 'full_hash': {'type': 'string'}, 'hash': {'type': 'string'}, 'name': {'type': 'string'}, 'namespace': {'type': 'string'}, 'package_hash': {'type': 'string'}, 'parameters': {'additionalProperties': True, 'properties': {'cflags': {'items': {'type': 'string'}, 'type': 'array'}, 'cppflags': {'items': {'type': 'string'}, 'type': 'array'}, 'cxxflags': {'items': {'type': 'string'}, 'type': 'array'}, 'fflags': {'items': {'type': 'string'}, 'type': 'array'}, 'ldflags': {'items': {'type': 'string'}, 'type': 'array'}, 'ldlib': {'items': {'type': 'string'}, 'type': 'array'}, 'patches': {'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['cflags', 'cppflags', 'cxxflags', 'fflags', 'ldflags', 'ldlibs'], 'type': 'object'}, 'patches': {'items': {}, 'type': 'array'}, 'version': {'oneOf': [{'type': 'string'}, {'type': 'number'}]}}, 'required': ['version', 'arch', 'compiler', 'namespace', 'parameters'], 'type': 'object'}, 'type': 'array'}}, 'required': ['_meta', 'nodes'], 'type': 'object'}}}, 'type': 'object'}}, 'type': 'object'}, 'version': {'type': 'string'}}, 'required': ['installs', 'version'], 'type': 'object'}}, 'required': ['database'], 'title': 'Spack spec schema', 'type': 'object'}

Full schema with metadata

spack.schema.env module

Schema for env.yaml configuration file.

                        },
                    },
                    "exclude": {"type": "array", "items": {"type": "string"}},
                },
            },
            {"type": "string"},
            {"type": "null"},
        ]
    },
}

projections_scheme = spack.schema.projections.properties["projections"]

schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack environment file schema",
    "type": "object",
    "additionalProperties": False,
    "patternProperties": {
        "^env|spack$": {
            "type": "object",
            "default": {},
            "additionalProperties": False,
            "properties": 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|run)",
                                            },
                                            "link_type": {"type": "string"},
                                            "select": {
                                                "type": "array",
                                                "items": {"type": "string"},
                                            },
                                            "exclude": {
                                                "type": "array",
                                                "items": {"type": "string"},
                                            },
                                            "projections": projections_scheme,
                                        },
                                    }
                                },
                            },
                        ]
                    },
                },
            ),
        }
    },
}


def update(data):
    """Update the data in place to remove deprecated properties.

    Args:
        data (dict): dictionary to be updated

    Returns:
        True if data was changed, False otherwise
    """
    # There are not currently any deprecated attributes in this section
    # that have not been removed
    return False
spack.schema.env.keys = ('spack', 'env')

legal first keys in the schema

spack.schema.env.update(data)[source]

Update the data in place to remove deprecated properties.

Parameters

data (dict) – dictionary to be updated

Returns

True if data was changed, False otherwise

spack.schema.environment module

Schema for environment modifications. Meant for inclusion in other schemas.

spack.schema.environment.parse(config_obj)[source]

Returns an EnvironmentModifications object containing the modifications parsed from input.

Parameters

config_obj – a configuration dictionary conforming to the schema definition for environment modifications

spack.schema.gitlab_ci module

Schema for gitlab-ci.yaml configuration file.


image_schema = {
    "oneOf": [
        {"type": "string"},
        {
            "type": "object",
            "properties": {
                "name": {"type": "string"},
                "entrypoint": {
                    "type": "array",
                    "items": {
                        "type": "string",
                    },
                },
            },
        },
    ],
}

runner_attributes_schema_items = {
    "image": image_schema,
    "tags": {"type": "array", "items": {"type": "string"}},
    "variables": {
        "type": "object",
        "patternProperties": {
            r"[\w\d\-_\.]+": {
                "type": "string",
            },
        },
    },
    "before_script": {"type": "array", "items": {"type": "string"}},
    "script": {"type": "array", "items": {"type": "string"}},
    "after_script": {"type": "array", "items": {"type": "string"}},
}

runner_selector_schema = {
    "type": "object",
    "additionalProperties": False,
    "required": ["tags"],
    "properties": runner_attributes_schema_items,
}

remove_attributes_schema = {
    "type": "object",
    "additionalProperties": False,
    "required": ["tags"],
    "properties": {
        "tags": {"type": "array", "items": {"type": "string"}},
    },
}


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,
                            },
                        },
                    },
                ],
            },
        },
        "match_behavior": {"type": "string", "enum": ["first", "merge"], "default": "first"},
        "mappings": {
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": False,
                "required": ["match"],
                "properties": {
                    "match": {
                        "type": "array",
                        "items": {
                            "type": "string",
                        },
                    },
                    "remove-attributes": remove_attributes_schema,
                    "runner-attributes": runner_selector_schema,
                },
            },
        },
        "service-job-attributes": runner_selector_schema,
        "signing-job-attributes": runner_selector_schema,
        "rebuild-index": {"type": "boolean"},
        "broken-specs-url": {"type": "string"},
        "broken-tests-packages": {
            "type": "array",
            "items": {
                "type": "string",
            },
        },
    },
)

gitlab_ci_properties = {
    "anyOf": [
        {
            "type": "object",
            "additionalProperties": False,
            "required": ["mappings"],
            "properties": union_dicts(
                core_shared_properties,
                {
                    "enable-artifacts-buildcache": {
                        "type": "boolean",
                    },
                },
            ),
        },
        {
            "type": "object",
            "additionalProperties": False,
            "required": ["mappings"],
            "properties": union_dicts(
                core_shared_properties,
                {
                    "temporary-storage-url-prefix": {
                        "type": "string",
                    },
                },
            ),
        },
    ]
}

#: Properties for inclusion in other schemas
properties = {
    "gitlab-ci": gitlab_ci_properties,
}

#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack gitlab-ci configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.gitlab_ci.properties = {'gitlab-ci': {'anyOf': [{'type': 'object', 'additionalProperties': False, 'required': ['mappings'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}, 'bootstrap': {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'compiler-agnostic': {'type': 'boolean', 'default': False}}}]}}, 'match_behavior': {'type': 'string', 'enum': ['first', 'merge'], 'default': 'first'}, 'mappings': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': {'match': {'type': 'array', 'items': {'type': 'string'}}, 'remove-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}}}, 'runner-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}}}}, 'service-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'signing-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, 'broken-tests-packages': {'type': 'array', 'items': {'type': 'string'}}, 'enable-artifacts-buildcache': {'type': 'boolean'}}}, {'type': 'object', 'additionalProperties': False, 'required': ['mappings'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}, 'bootstrap': {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'compiler-agnostic': {'type': 'boolean', 'default': False}}}]}}, 'match_behavior': {'type': 'string', 'enum': ['first', 'merge'], 'default': 'first'}, 'mappings': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': {'match': {'type': 'array', 'items': {'type': 'string'}}, 'remove-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}}}, 'runner-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}}}}, 'service-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'signing-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, 'broken-tests-packages': {'type': 'array', 'items': {'type': 'string'}}, 'temporary-storage-url-prefix': {'type': 'string'}}}]}}

Properties for inclusion in other schemas

spack.schema.gitlab_ci.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'gitlab-ci': {'anyOf': [{'type': 'object', 'additionalProperties': False, 'required': ['mappings'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}, 'bootstrap': {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'compiler-agnostic': {'type': 'boolean', 'default': False}}}]}}, 'match_behavior': {'type': 'string', 'enum': ['first', 'merge'], 'default': 'first'}, 'mappings': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': {'match': {'type': 'array', 'items': {'type': 'string'}}, 'remove-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}}}, 'runner-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}}}}, 'service-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'signing-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, 'broken-tests-packages': {'type': 'array', 'items': {'type': 'string'}}, 'enable-artifacts-buildcache': {'type': 'boolean'}}}, {'type': 'object', 'additionalProperties': False, 'required': ['mappings'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}, 'bootstrap': {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'compiler-agnostic': {'type': 'boolean', 'default': False}}}]}}, 'match_behavior': {'type': 'string', 'enum': ['first', 'merge'], 'default': 'first'}, 'mappings': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': {'match': {'type': 'array', 'items': {'type': 'string'}}, 'remove-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}}}, 'runner-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}}}}, 'service-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'signing-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, 'broken-tests-packages': {'type': 'array', 'items': {'type': 'string'}}, 'temporary-storage-url-prefix': {'type': 'string'}}}]}}, 'title': 'Spack gitlab-ci configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.merged module

Schema for configuration merged into one file.

    spack.schema.upstreams.properties,
)


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack merged configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.merged.properties = {'bootstrap': {'properties': {'enable': {'type': 'boolean'}, 'root': {'type': 'string'}, 'sources': {'items': {'additionalProperties': False, 'properties': {'metadata': {'type': 'string'}, 'name': {'type': 'string'}}, 'required': ['name', 'metadata'], 'type': 'object'}, 'type': 'array'}, 'trusted': {'patternProperties': {'\\w[\\w-]*': {'type': 'boolean'}}, 'type': 'object'}}, 'type': 'object'}, 'cdash': {'additionalProperties': False, 'patternProperties': {'build-group': {'type': 'string'}, 'project': {'type': 'string'}, 'site': {'type': 'string'}, 'url': {'type': 'string'}}, 'required': ['build-group', 'url', 'project', 'site'], 'type': 'object'}, 'compilers': {'items': [{'type': 'object', 'additionalProperties': False, 'properties': {'compiler': {'type': 'object', 'additionalProperties': False, 'required': ['paths', 'spec', 'modules', 'operating_system'], 'properties': {'paths': {'type': 'object', 'required': ['cc', 'cxx', 'f77', 'fc'], 'additionalProperties': False, 'properties': {'cc': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cxx': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'f77': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'fc': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}}, 'flags': {'type': 'object', 'additionalProperties': False, 'properties': {'cflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cxxflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'fflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cppflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ldflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ldlibs': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}}, 'spec': {'type': 'string'}, 'operating_system': {'type': 'string'}, 'target': {'type': 'string'}, 'alias': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'modules': {'anyOf': [{'type': 'string'}, {'type': 'null'}, {'type': 'array'}]}, 'implicit_rpaths': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}}, {'type': 'boolean'}]}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}, 'extra_rpaths': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}}}], 'type': 'array'}, 'concretizer': {'additionalProperties': False, 'properties': {'enable_node_namespace': {'type': 'boolean'}, 'reuse': {'type': 'boolean'}, 'targets': {'properties': {'granularity': {'enum': ['generic', 'microarchitectures'], 'type': 'string'}, 'host_compatible': {'type': 'boolean'}}, 'type': 'object'}, 'unify': {'oneOf': [{'type': 'boolean'}, {'type': 'string', 'enum': ['when_possible']}]}}, 'type': 'object'}, 'config': {'default': {}, 'deprecatedProperties': {'error': False, 'message': 'config:module_roots has been replaced by modules:[module set]:roots and is ignored', 'properties': ['module_roots']}, 'properties': {'additional_external_search_paths': {'items': {'type': 'string'}, 'type': 'array'}, 'allow_sgid': {'type': 'boolean'}, 'binary_index_root': {'type': 'string'}, 'binary_index_ttl': {'minimum': 0, 'type': 'integer'}, 'build_jobs': {'minimum': 1, 'type': 'integer'}, 'build_language': {'type': 'string'}, 'build_stage': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, 'ccache': {'type': 'boolean'}, 'checksum': {'type': 'boolean'}, 'concretizer': {'enum': ['original', 'clingo'], 'type': 'string'}, 'connect_timeout': {'minimum': 0, 'type': 'integer'}, 'db_lock_timeout': {'minimum': 1, 'type': 'integer'}, 'debug': {'type': 'boolean'}, 'deprecated': {'type': 'boolean'}, 'dirty': {'type': 'boolean'}, 'extensions': {'items': {'type': 'string'}, 'type': 'array'}, 'flags': {'properties': {'keep_werror': {'enum': ['all', 'specific', 'none'], 'type': 'string'}}, 'type': 'object'}, 'install_hash_length': {'minimum': 1, 'type': 'integer'}, 'install_missing_compilers': {'type': 'boolean'}, 'install_path_scheme': {'type': 'string'}, 'install_tree': {'anyOf': [{'type': 'object', 'properties': {'root': {'type': 'string'}, 'padded_length': {'oneOf': [{'type': 'integer', 'minimum': 0}, {'type': 'boolean'}]}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}}}, {'type': 'string'}]}, 'license_dir': {'type': 'string'}, 'locks': {'type': 'boolean'}, 'misc_cache': {'type': 'string'}, 'package_lock_timeout': {'anyOf': [{'type': 'integer', 'minimum': 1}, {'type': 'null'}]}, 'shared_linking': {'anyOf': [{'type': 'string', 'enum': ['rpath', 'runpath']}, {'type': 'object', 'properties': {'type': {'type': 'string', 'enum': ['rpath', 'runpath']}, 'bind': {'type': 'boolean'}}}]}, 'source_cache': {'type': 'string'}, 'suppress_gpg_warnings': {'type': 'boolean'}, 'template_dirs': {'items': {'type': 'string'}, 'type': 'array'}, 'test_stage': {'type': 'string'}, 'url_fetch_method': {'enum': ['urllib', 'curl'], 'type': 'string'}, 'verify_ssl': {'type': 'boolean'}}, 'type': 'object'}, 'container': {'additionalProperties': False, 'properties': {'docker': {'additionalProperties': False, 'default': {}, 'type': 'object'}, 'extra_instructions': {'additionalProperties': False, 'properties': {'build': {'type': 'string'}, 'final': {'type': 'string'}}, 'type': 'object'}, 'format': {'enum': ['docker', 'singularity'], 'type': 'string'}, 'images': {'anyOf': [{'type': 'object', 'additionalProperties': False, 'properties': {'os': {'type': 'string'}, 'spack': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additional_properties': False, 'properties': {'url': {'type': 'string'}, 'ref': {'type': 'string'}, 'resolve_sha': {'type': 'boolean', 'default': False}, 'verify': {'type': 'boolean', 'default': False}}}]}}, 'required': ['os', 'spack']}, {'type': 'object', 'additionalProperties': False, 'properties': {'build': {'type': 'string'}, 'final': {'type': 'string'}}, 'required': ['build', 'final']}]}, 'labels': {'type': 'object'}, 'os_packages': {'additionalProperties': False, 'properties': {'build': {'items': {'type': 'string'}, 'type': 'array'}, 'command': {'enum': ['apt', 'yum'], 'type': 'string'}, 'final': {'items': {'type': 'string'}, 'type': 'array'}, 'update': {'type': 'boolean'}}, 'type': 'object'}, 'singularity': {'additionalProperties': False, 'default': {}, 'properties': {'help': {'type': 'string'}, 'runscript': {'type': 'string'}, 'startscript': {'type': 'string'}, 'test': {'type': 'string'}}, 'type': 'object'}, 'strip': {'default': True, 'type': 'boolean'}}, 'type': 'object'}, 'gitlab-ci': {'anyOf': [{'type': 'object', 'additionalProperties': False, 'required': ['mappings'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}, 'bootstrap': {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'compiler-agnostic': {'type': 'boolean', 'default': False}}}]}}, 'match_behavior': {'type': 'string', 'enum': ['first', 'merge'], 'default': 'first'}, 'mappings': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': {'match': {'type': 'array', 'items': {'type': 'string'}}, 'remove-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}}}, 'runner-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}}}}, 'service-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'signing-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, 'broken-tests-packages': {'type': 'array', 'items': {'type': 'string'}}, 'enable-artifacts-buildcache': {'type': 'boolean'}}}, {'type': 'object', 'additionalProperties': False, 'required': ['mappings'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}, 'bootstrap': {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'compiler-agnostic': {'type': 'boolean', 'default': False}}}]}}, 'match_behavior': {'type': 'string', 'enum': ['first', 'merge'], 'default': 'first'}, 'mappings': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': {'match': {'type': 'array', 'items': {'type': 'string'}}, 'remove-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}}}, 'runner-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}}}}, 'service-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'signing-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, 'broken-tests-packages': {'type': 'array', 'items': {'type': 'string'}}, 'temporary-storage-url-prefix': {'type': 'string'}}}]}, 'mirrors': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'object', 'required': ['fetch', 'push'], 'properties': {'fetch': {'type': ['string', 'object']}, 'push': {'type': ['string', 'object']}}}]}}, 'type': 'object'}, 'modules': {'additionalProperties': False, 'patternProperties': {'^(?!prefix_inspections$)\\w[\\w-]*$': {'additionalProperties': False, 'default': {}, 'properties': {'arch_folder': {'type': 'boolean'}, 'enable': {'default': [], 'items': {'enum': ['tcl', 'lmod'], 'type': 'string'}, 'type': 'array'}, 'lmod': {'allOf': [{'type': 'object', 'default': {}, 'allOf': [{'properties': {'verbose': {'type': 'boolean', 'default': False}, 'hash_length': {'type': 'integer', 'minimum': 0, 'default': 7}, 'whitelist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist_implicits': {'type': 'boolean', 'default': False}, 'include': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_implicits': {'type': 'boolean', 'default': False}, 'defaults': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'naming_scheme': {'type': 'string'}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}, 'all': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}, {'validate_spec': True, 'patternProperties': {'(?!hierarchy|core_specs|verbose|hash_length|defaults|whitelist|blacklist|include|exclude|projections|naming_scheme|core_compilers|all)(^\\w[\\w-]*)': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}, '^[\\^@%+~]': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}]}, {'type': 'object', 'properties': {'core_compilers': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'hierarchy': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'core_specs': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}]}, 'prefix_inspections': {'additionalProperties': False, 'patternProperties': {'^[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'roots': {'properties': {'lmod': {'type': 'string'}, 'tcl': {'type': 'string'}}, 'type': 'object'}, 'tcl': {'allOf': [{'type': 'object', 'default': {}, 'allOf': [{'properties': {'verbose': {'type': 'boolean', 'default': False}, 'hash_length': {'type': 'integer', 'minimum': 0, 'default': 7}, 'whitelist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist_implicits': {'type': 'boolean', 'default': False}, 'include': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_implicits': {'type': 'boolean', 'default': False}, 'defaults': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'naming_scheme': {'type': 'string'}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}, 'all': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}, {'validate_spec': True, 'patternProperties': {'(?!hierarchy|core_specs|verbose|hash_length|defaults|whitelist|blacklist|include|exclude|projections|naming_scheme|core_compilers|all)(^\\w[\\w-]*)': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}, '^[\\^@%+~]': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}]}, {}]}, 'use_view': {'anyOf': [{'type': 'string'}, {'type': 'boolean'}]}}, 'type': 'object'}}, 'properties': {'prefix_inspections': {'additionalProperties': False, 'patternProperties': {'^[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}, 'packages': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'additionalProperties': False, 'default': {}, 'properties': {'buildable': {'default': True, 'type': 'boolean'}, 'compiler': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'externals': {'items': {'additionalProperties': True, 'properties': {'extra_attributes': {'type': 'object'}, 'modules': {'items': {'type': 'string'}, 'type': 'array'}, 'prefix': {'type': 'string'}, 'spec': {'type': 'string'}}, 'required': ['spec'], 'type': 'object'}, 'type': 'array'}, 'package_attributes': {'additionalProperties': False, 'patternProperties': {'\\w+': {}}, 'type': 'object'}, 'permissions': {'additionalProperties': False, 'properties': {'group': {'type': 'string'}, 'read': {'enum': ['user', 'group', 'world'], 'type': 'string'}, 'write': {'enum': ['user', 'group', 'world'], 'type': 'string'}}, 'type': 'object'}, 'providers': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'require': {'oneOf': [{'type': 'array', 'items': {'type': 'object', 'properties': {'one_of': {'type': 'array'}, 'any_of': {'type': 'array'}}}}, {'type': 'string'}]}, 'target': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'variants': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, 'version': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}, 'repos': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'upstreams': {'default': {}, 'patternProperties': {'\\w[\\w-]*': {'additionalProperties': False, 'default': {}, 'properties': {'install_tree': {'type': 'string'}, 'modules': {'properties': {'lmod': {'type': 'string'}, 'tcl': {'type': 'string'}}, 'type': 'object'}}, 'type': 'object'}}, 'type': 'object'}}

Properties for inclusion in other schemas

spack.schema.merged.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'bootstrap': {'properties': {'enable': {'type': 'boolean'}, 'root': {'type': 'string'}, 'sources': {'items': {'additionalProperties': False, 'properties': {'metadata': {'type': 'string'}, 'name': {'type': 'string'}}, 'required': ['name', 'metadata'], 'type': 'object'}, 'type': 'array'}, 'trusted': {'patternProperties': {'\\w[\\w-]*': {'type': 'boolean'}}, 'type': 'object'}}, 'type': 'object'}, 'cdash': {'additionalProperties': False, 'patternProperties': {'build-group': {'type': 'string'}, 'project': {'type': 'string'}, 'site': {'type': 'string'}, 'url': {'type': 'string'}}, 'required': ['build-group', 'url', 'project', 'site'], 'type': 'object'}, 'compilers': {'items': [{'type': 'object', 'additionalProperties': False, 'properties': {'compiler': {'type': 'object', 'additionalProperties': False, 'required': ['paths', 'spec', 'modules', 'operating_system'], 'properties': {'paths': {'type': 'object', 'required': ['cc', 'cxx', 'f77', 'fc'], 'additionalProperties': False, 'properties': {'cc': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cxx': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'f77': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'fc': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}}, 'flags': {'type': 'object', 'additionalProperties': False, 'properties': {'cflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cxxflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'fflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'cppflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ldflags': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ldlibs': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}}, 'spec': {'type': 'string'}, 'operating_system': {'type': 'string'}, 'target': {'type': 'string'}, 'alias': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'modules': {'anyOf': [{'type': 'string'}, {'type': 'null'}, {'type': 'array'}]}, 'implicit_rpaths': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}}, {'type': 'boolean'}]}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}, 'extra_rpaths': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}}}], 'type': 'array'}, 'concretizer': {'additionalProperties': False, 'properties': {'enable_node_namespace': {'type': 'boolean'}, 'reuse': {'type': 'boolean'}, 'targets': {'properties': {'granularity': {'enum': ['generic', 'microarchitectures'], 'type': 'string'}, 'host_compatible': {'type': 'boolean'}}, 'type': 'object'}, 'unify': {'oneOf': [{'type': 'boolean'}, {'type': 'string', 'enum': ['when_possible']}]}}, 'type': 'object'}, 'config': {'default': {}, 'deprecatedProperties': {'error': False, 'message': 'config:module_roots has been replaced by modules:[module set]:roots and is ignored', 'properties': ['module_roots']}, 'properties': {'additional_external_search_paths': {'items': {'type': 'string'}, 'type': 'array'}, 'allow_sgid': {'type': 'boolean'}, 'binary_index_root': {'type': 'string'}, 'binary_index_ttl': {'minimum': 0, 'type': 'integer'}, 'build_jobs': {'minimum': 1, 'type': 'integer'}, 'build_language': {'type': 'string'}, 'build_stage': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, 'ccache': {'type': 'boolean'}, 'checksum': {'type': 'boolean'}, 'concretizer': {'enum': ['original', 'clingo'], 'type': 'string'}, 'connect_timeout': {'minimum': 0, 'type': 'integer'}, 'db_lock_timeout': {'minimum': 1, 'type': 'integer'}, 'debug': {'type': 'boolean'}, 'deprecated': {'type': 'boolean'}, 'dirty': {'type': 'boolean'}, 'extensions': {'items': {'type': 'string'}, 'type': 'array'}, 'flags': {'properties': {'keep_werror': {'enum': ['all', 'specific', 'none'], 'type': 'string'}}, 'type': 'object'}, 'install_hash_length': {'minimum': 1, 'type': 'integer'}, 'install_missing_compilers': {'type': 'boolean'}, 'install_path_scheme': {'type': 'string'}, 'install_tree': {'anyOf': [{'type': 'object', 'properties': {'root': {'type': 'string'}, 'padded_length': {'oneOf': [{'type': 'integer', 'minimum': 0}, {'type': 'boolean'}]}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}}}, {'type': 'string'}]}, 'license_dir': {'type': 'string'}, 'locks': {'type': 'boolean'}, 'misc_cache': {'type': 'string'}, 'package_lock_timeout': {'anyOf': [{'type': 'integer', 'minimum': 1}, {'type': 'null'}]}, 'shared_linking': {'anyOf': [{'type': 'string', 'enum': ['rpath', 'runpath']}, {'type': 'object', 'properties': {'type': {'type': 'string', 'enum': ['rpath', 'runpath']}, 'bind': {'type': 'boolean'}}}]}, 'source_cache': {'type': 'string'}, 'suppress_gpg_warnings': {'type': 'boolean'}, 'template_dirs': {'items': {'type': 'string'}, 'type': 'array'}, 'test_stage': {'type': 'string'}, 'url_fetch_method': {'enum': ['urllib', 'curl'], 'type': 'string'}, 'verify_ssl': {'type': 'boolean'}}, 'type': 'object'}, 'container': {'additionalProperties': False, 'properties': {'docker': {'additionalProperties': False, 'default': {}, 'type': 'object'}, 'extra_instructions': {'additionalProperties': False, 'properties': {'build': {'type': 'string'}, 'final': {'type': 'string'}}, 'type': 'object'}, 'format': {'enum': ['docker', 'singularity'], 'type': 'string'}, 'images': {'anyOf': [{'type': 'object', 'additionalProperties': False, 'properties': {'os': {'type': 'string'}, 'spack': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additional_properties': False, 'properties': {'url': {'type': 'string'}, 'ref': {'type': 'string'}, 'resolve_sha': {'type': 'boolean', 'default': False}, 'verify': {'type': 'boolean', 'default': False}}}]}}, 'required': ['os', 'spack']}, {'type': 'object', 'additionalProperties': False, 'properties': {'build': {'type': 'string'}, 'final': {'type': 'string'}}, 'required': ['build', 'final']}]}, 'labels': {'type': 'object'}, 'os_packages': {'additionalProperties': False, 'properties': {'build': {'items': {'type': 'string'}, 'type': 'array'}, 'command': {'enum': ['apt', 'yum'], 'type': 'string'}, 'final': {'items': {'type': 'string'}, 'type': 'array'}, 'update': {'type': 'boolean'}}, 'type': 'object'}, 'singularity': {'additionalProperties': False, 'default': {}, 'properties': {'help': {'type': 'string'}, 'runscript': {'type': 'string'}, 'startscript': {'type': 'string'}, 'test': {'type': 'string'}}, 'type': 'object'}, 'strip': {'default': True, 'type': 'boolean'}}, 'type': 'object'}, 'gitlab-ci': {'anyOf': [{'type': 'object', 'additionalProperties': False, 'required': ['mappings'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}, 'bootstrap': {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'compiler-agnostic': {'type': 'boolean', 'default': False}}}]}}, 'match_behavior': {'type': 'string', 'enum': ['first', 'merge'], 'default': 'first'}, 'mappings': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': {'match': {'type': 'array', 'items': {'type': 'string'}}, 'remove-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}}}, 'runner-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}}}}, 'service-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'signing-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, 'broken-tests-packages': {'type': 'array', 'items': {'type': 'string'}}, 'enable-artifacts-buildcache': {'type': 'boolean'}}}, {'type': 'object', 'additionalProperties': False, 'required': ['mappings'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}, 'bootstrap': {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'compiler-agnostic': {'type': 'boolean', 'default': False}}}]}}, 'match_behavior': {'type': 'string', 'enum': ['first', 'merge'], 'default': 'first'}, 'mappings': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': False, 'required': ['match'], 'properties': {'match': {'type': 'array', 'items': {'type': 'string'}}, 'remove-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}}}}, 'runner-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}}}}, 'service-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'signing-job-attributes': {'type': 'object', 'additionalProperties': False, 'required': ['tags'], 'properties': {'image': {'oneOf': [{'type': 'string'}, {'type': 'object', 'properties': {'name': {'type': 'string'}, 'entrypoint': {'type': 'array', 'items': {'type': 'string'}}}}]}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'variables': {'type': 'object', 'patternProperties': {'[\\w\\d\\-_\\.]+': {'type': 'string'}}}, 'before_script': {'type': 'array', 'items': {'type': 'string'}}, 'script': {'type': 'array', 'items': {'type': 'string'}}, 'after_script': {'type': 'array', 'items': {'type': 'string'}}}}, 'rebuild-index': {'type': 'boolean'}, 'broken-specs-url': {'type': 'string'}, 'broken-tests-packages': {'type': 'array', 'items': {'type': 'string'}}, 'temporary-storage-url-prefix': {'type': 'string'}}}]}, 'mirrors': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'object', 'required': ['fetch', 'push'], 'properties': {'fetch': {'type': ['string', 'object']}, 'push': {'type': ['string', 'object']}}}]}}, 'type': 'object'}, 'modules': {'additionalProperties': False, 'patternProperties': {'^(?!prefix_inspections$)\\w[\\w-]*$': {'additionalProperties': False, 'default': {}, 'properties': {'arch_folder': {'type': 'boolean'}, 'enable': {'default': [], 'items': {'enum': ['tcl', 'lmod'], 'type': 'string'}, 'type': 'array'}, 'lmod': {'allOf': [{'type': 'object', 'default': {}, 'allOf': [{'properties': {'verbose': {'type': 'boolean', 'default': False}, 'hash_length': {'type': 'integer', 'minimum': 0, 'default': 7}, 'whitelist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist_implicits': {'type': 'boolean', 'default': False}, 'include': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_implicits': {'type': 'boolean', 'default': False}, 'defaults': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'naming_scheme': {'type': 'string'}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}, 'all': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}, {'validate_spec': True, 'patternProperties': {'(?!hierarchy|core_specs|verbose|hash_length|defaults|whitelist|blacklist|include|exclude|projections|naming_scheme|core_compilers|all)(^\\w[\\w-]*)': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}, '^[\\^@%+~]': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}]}, {'type': 'object', 'properties': {'core_compilers': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'hierarchy': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'core_specs': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}]}, 'prefix_inspections': {'additionalProperties': False, 'patternProperties': {'^[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'roots': {'properties': {'lmod': {'type': 'string'}, 'tcl': {'type': 'string'}}, 'type': 'object'}, 'tcl': {'allOf': [{'type': 'object', 'default': {}, 'allOf': [{'properties': {'verbose': {'type': 'boolean', 'default': False}, 'hash_length': {'type': 'integer', 'minimum': 0, 'default': 7}, 'whitelist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist_implicits': {'type': 'boolean', 'default': False}, 'include': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_implicits': {'type': 'boolean', 'default': False}, 'defaults': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'naming_scheme': {'type': 'string'}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}, 'all': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}, {'validate_spec': True, 'patternProperties': {'(?!hierarchy|core_specs|verbose|hash_length|defaults|whitelist|blacklist|include|exclude|projections|naming_scheme|core_compilers|all)(^\\w[\\w-]*)': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}, '^[\\^@%+~]': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}]}, {}]}, 'use_view': {'anyOf': [{'type': 'string'}, {'type': 'boolean'}]}}, 'type': 'object'}}, 'properties': {'prefix_inspections': {'additionalProperties': False, 'patternProperties': {'^[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}, 'packages': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'additionalProperties': False, 'default': {}, 'properties': {'buildable': {'default': True, 'type': 'boolean'}, 'compiler': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'externals': {'items': {'additionalProperties': True, 'properties': {'extra_attributes': {'type': 'object'}, 'modules': {'items': {'type': 'string'}, 'type': 'array'}, 'prefix': {'type': 'string'}, 'spec': {'type': 'string'}}, 'required': ['spec'], 'type': 'object'}, 'type': 'array'}, 'package_attributes': {'additionalProperties': False, 'patternProperties': {'\\w+': {}}, 'type': 'object'}, 'permissions': {'additionalProperties': False, 'properties': {'group': {'type': 'string'}, 'read': {'enum': ['user', 'group', 'world'], 'type': 'string'}, 'write': {'enum': ['user', 'group', 'world'], 'type': 'string'}}, 'type': 'object'}, 'providers': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'require': {'oneOf': [{'type': 'array', 'items': {'type': 'object', 'properties': {'one_of': {'type': 'array'}, 'any_of': {'type': 'array'}}}}, {'type': 'string'}]}, 'target': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'variants': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, 'version': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}, 'repos': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'upstreams': {'default': {}, 'patternProperties': {'\\w[\\w-]*': {'additionalProperties': False, 'default': {}, 'properties': {'install_tree': {'type': 'string'}, 'modules': {'properties': {'lmod': {'type': 'string'}, 'tcl': {'type': 'string'}}, 'type': 'object'}}, 'type': 'object'}}, 'type': 'object'}}, 'title': 'Spack merged configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.mirrors module

Schema for mirrors.yaml configuration file.

#: Properties for inclusion in other schemas
properties = {
    "mirrors": {
        "type": "object",
        "default": {},
        "additionalProperties": False,
        "patternProperties": {
            r"\w[\w-]*": {
                "anyOf": [
                    {"type": "string"},
                    {
                        "type": "object",
                        "required": ["fetch", "push"],
                        "properties": {
                            "fetch": {"type": ["string", "object"]},
                            "push": {"type": ["string", "object"]},
                        },
                    },
                ]
            },
        },
    },
}


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack mirror configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.mirrors.properties = {'mirrors': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'object', 'required': ['fetch', 'push'], 'properties': {'fetch': {'type': ['string', 'object']}, 'push': {'type': ['string', 'object']}}}]}}, 'type': 'object'}}

Properties for inclusion in other schemas

spack.schema.mirrors.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'mirrors': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'object', 'required': ['fetch', 'push'], 'properties': {'fetch': {'type': ['string', 'object']}, 'push': {'type': ['string', 'object']}}}]}}, 'type': 'object'}}, 'title': 'Spack mirror configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.modules module

Schema for modules.yaml configuration file.


#: Matches a spec or a multi-valued variant but not another
#: valid keyword.
#:
#: THIS NEEDS TO BE UPDATED FOR EVERY NEW KEYWORD THAT
#: IS ADDED IMMEDIATELY BELOW THE MODULE TYPE ATTRIBUTE
spec_regex = (
    r"(?!hierarchy|core_specs|verbose|hash_length|defaults|"
    r"whitelist|blacklist|"  # DEPRECATED: remove in 0.20.
    r"include|exclude|"  # use these more inclusive/consistent options
    r"projections|naming_scheme|core_compilers|all)(^\w[\w-]*)"
)

#: Matches a valid name for a module set
valid_module_set_name = r"^(?!prefix_inspections$)\w[\w-]*$"

#: Matches an anonymous spec, i.e. a spec without a root name
anonymous_spec_regex = r"^[\^@%+~]"

#: Definitions for parts of module schema
array_of_strings = {"type": "array", "default": [], "items": {"type": "string"}}

dictionary_of_strings = {"type": "object", "patternProperties": {r"\w[\w-]*": {"type": "string"}}}

dependency_selection = {"type": "string", "enum": ["none", "direct", "all"]}

module_file_configuration = {
    "type": "object",
    "default": {},
    "additionalProperties": False,
    "properties": {
        "filter": {
            "type": "object",
            "default": {},
            "additionalProperties": False,
            "properties": {
                # DEPRECATED: remove in 0.20.
                "environment_blacklist": {
                    "type": "array",
                    "default": [],
                    "items": {"type": "string"},
                },
                # use exclude_env_vars instead
                "exclude_env_vars": {"type": "array", "default": [], "items": {"type": "string"}},
            },
        },
        "template": {"type": "string"},
        "autoload": dependency_selection,
        "prerequisites": dependency_selection,
        "conflict": array_of_strings,
        "load": array_of_strings,
        "suffixes": {
            "type": "object",
            "validate_spec": True,
            "patternProperties": {r"\w[\w-]*": {"type": "string"}},  # key
        },
        "environment": spack.schema.environment.definition,
    },
}

projections_scheme = spack.schema.projections.properties["projections"]

module_type_configuration = {
    "type": "object",
    "default": {},
    "allOf": [
        {
            "properties": {
                "verbose": {"type": "boolean", "default": False},
                "hash_length": {"type": "integer", "minimum": 0, "default": 7},
                # DEPRECATED: remove in 0.20.
                "whitelist": array_of_strings,
                "blacklist": array_of_strings,
                "blacklist_implicits": {"type": "boolean", "default": False},
                # whitelist/blacklist have been replaced with include/exclude
                "include": array_of_strings,
                "exclude": array_of_strings,
                "exclude_implicits": {"type": "boolean", "default": False},
                "defaults": array_of_strings,
                "naming_scheme": {"type": "string"},  # Can we be more specific here?
                "projections": projections_scheme,
                "all": module_file_configuration,
            }
        },
        {
            "validate_spec": True,
            "patternProperties": {
                spec_regex: module_file_configuration,
                anonymous_spec_regex: module_file_configuration,
            },
        },
    ],
}


module_config_properties = {
    "use_view": {"anyOf": [{"type": "string"}, {"type": "boolean"}]},
    "arch_folder": {"type": "boolean"},
    "roots": {
        "type": "object",
        "properties": {
            "tcl": {"type": "string"},
            "lmod": {"type": "string"},
        },
    },
    "enable": {
        "type": "array",
        "default": [],
        "items": {"type": "string", "enum": ["tcl", "lmod"]},
    },
    "lmod": {
        "allOf": [
            # Base configuration
            module_type_configuration,
            {
                "type": "object",
                "properties": {
                    "core_compilers": array_of_strings,
                    "hierarchy": array_of_strings,
                    "core_specs": array_of_strings,
                },
            },  # Specific lmod extensions
        ]
    },
    "tcl": {
        "allOf": [
            # Base configuration
            module_type_configuration,
            {},  # Specific tcl extensions
        ]
    },
    "prefix_inspections": {
        "type": "object",
        "additionalProperties": False,
        "patternProperties": {
            # prefix-relative path to be inspected for existence
            r"^[\w-]*": array_of_strings
        },
    },
}


# Properties for inclusion into other schemas (requires definitions)
properties = {
    "modules": {
        "type": "object",
        "additionalProperties": False,
        "properties": {
            "prefix_inspections": {
                "type": "object",
                "additionalProperties": False,
                "patternProperties": {
                    # prefix-relative path to be inspected for existence
                    r"^[\w-]*": array_of_strings
                },
            },
        },
        "patternProperties": {
            valid_module_set_name: {
                "type": "object",
                "default": {},
                "additionalProperties": False,
                "properties": module_config_properties,
            },
        },
    }
}

#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack module file configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}


# deprecated keys and their replacements
exclude_include_translations = {
    "whitelist": "include",
    "blacklist": "exclude",
    "blacklist_implicits": "exclude_implicits",
    "environment_blacklist": "exclude_env_vars",
}


def update_keys(data, key_translations):
    """Change blacklist/whitelist to exclude/include.

    Arguments:
        data (dict): data from a valid modules configuration.
        key_translations (dict): A dictionary of keys to translate to
            their respective values.

    Return:
        (bool) whether anything was changed in data
    """
    changed = False

    if isinstance(data, dict):
        keys = list(data.keys())
        for key in keys:
            value = data[key]

            translation = key_translations.get(key)
            if translation:
                data[translation] = data.pop(key)
                changed = True

            changed |= update_keys(value, key_translations)

    elif isinstance(data, list):
        for elt in data:
            changed |= update_keys(elt, key_translations)

    return changed


def update(data):
    """Update the data in place to remove deprecated properties.

    Args:
        data (dict): dictionary to be updated

    Returns:
        True if data was changed, False otherwise
    """
    # translate blacklist/whitelist to exclude/include
    return update_keys(data, exclude_include_translations)
spack.schema.modules.anonymous_spec_regex = '^[\\^@%+~]'

Matches an anonymous spec, i.e. a spec without a root name

spack.schema.modules.array_of_strings = {'default': [], 'items': {'type': 'string'}, 'type': 'array'}

Definitions for parts of module schema

spack.schema.modules.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'modules': {'additionalProperties': False, 'patternProperties': {'^(?!prefix_inspections$)\\w[\\w-]*$': {'additionalProperties': False, 'default': {}, 'properties': {'arch_folder': {'type': 'boolean'}, 'enable': {'default': [], 'items': {'enum': ['tcl', 'lmod'], 'type': 'string'}, 'type': 'array'}, 'lmod': {'allOf': [{'type': 'object', 'default': {}, 'allOf': [{'properties': {'verbose': {'type': 'boolean', 'default': False}, 'hash_length': {'type': 'integer', 'minimum': 0, 'default': 7}, 'whitelist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist_implicits': {'type': 'boolean', 'default': False}, 'include': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_implicits': {'type': 'boolean', 'default': False}, 'defaults': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'naming_scheme': {'type': 'string'}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}, 'all': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}, {'validate_spec': True, 'patternProperties': {'(?!hierarchy|core_specs|verbose|hash_length|defaults|whitelist|blacklist|include|exclude|projections|naming_scheme|core_compilers|all)(^\\w[\\w-]*)': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}, '^[\\^@%+~]': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}]}, {'type': 'object', 'properties': {'core_compilers': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'hierarchy': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'core_specs': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}]}, 'prefix_inspections': {'additionalProperties': False, 'patternProperties': {'^[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'roots': {'properties': {'lmod': {'type': 'string'}, 'tcl': {'type': 'string'}}, 'type': 'object'}, 'tcl': {'allOf': [{'type': 'object', 'default': {}, 'allOf': [{'properties': {'verbose': {'type': 'boolean', 'default': False}, 'hash_length': {'type': 'integer', 'minimum': 0, 'default': 7}, 'whitelist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'blacklist_implicits': {'type': 'boolean', 'default': False}, 'include': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_implicits': {'type': 'boolean', 'default': False}, 'defaults': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'naming_scheme': {'type': 'string'}, 'projections': {'type': 'object', 'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}}, 'all': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}, {'validate_spec': True, 'patternProperties': {'(?!hierarchy|core_specs|verbose|hash_length|defaults|whitelist|blacklist|include|exclude|projections|naming_scheme|core_compilers|all)(^\\w[\\w-]*)': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}, '^[\\^@%+~]': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'filter': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'environment_blacklist': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'exclude_env_vars': {'type': 'array', 'default': [], 'items': {'type': 'string'}}}}, 'template': {'type': 'string'}, 'autoload': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'prerequisites': {'type': 'string', 'enum': ['none', 'direct', 'all']}, 'conflict': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'load': {'type': 'array', 'default': [], 'items': {'type': 'string'}}, 'suffixes': {'type': 'object', 'validate_spec': True, 'patternProperties': {'\\w[\\w-]*': {'type': 'string'}}}, 'environment': {'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': {'set': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'unset': {'type': 'array', 'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}, 'prepend_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'append_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}, 'remove_path': {'type': 'object', 'patternProperties': {'\\w[\\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}}}}}}}}}]}, {}]}, 'use_view': {'anyOf': [{'type': 'string'}, {'type': 'boolean'}]}}, 'type': 'object'}}, 'properties': {'prefix_inspections': {'additionalProperties': False, 'patternProperties': {'^[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}}, 'title': 'Spack module file configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.modules.spec_regex = '(?!hierarchy|core_specs|verbose|hash_length|defaults|whitelist|blacklist|include|exclude|projections|naming_scheme|core_compilers|all)(^\\w[\\w-]*)'

Matches a spec or a multi-valued variant but not another valid keyword.

THIS NEEDS TO BE UPDATED FOR EVERY NEW KEYWORD THAT IS ADDED IMMEDIATELY BELOW THE MODULE TYPE ATTRIBUTE

spack.schema.modules.update(data)[source]

Update the data in place to remove deprecated properties.

Parameters

data (dict) – dictionary to be updated

Returns

True if data was changed, False otherwise

spack.schema.modules.update_keys(data, key_translations)[source]

Change blacklist/whitelist to exclude/include.

Parameters
  • data (dict) – data from a valid modules configuration.

  • key_translations (dict) – A dictionary of keys to translate to their respective values.

Returns

(bool) whether anything was changed in data

spack.schema.modules.valid_module_set_name = '^(?!prefix_inspections$)\\w[\\w-]*$'

Matches a valid name for a module set

spack.schema.packages module

Schema for packages.yaml configuration files.

properties = {
    "packages": {
        "type": "object",
        "default": {},
        "additionalProperties": False,
        "patternProperties": {
            r"\w[\w-]*": {  # package name
                "type": "object",
                "default": {},
                "additionalProperties": False,
                "properties": {
                    "require": {
                        "oneOf": [
                            # 'require' can be a list of requirement_groups.
                            # each requirement group is a list of one or more
                            # specs. Either at least one or exactly one spec
                            # in the group must be satisfied (depending on
                            # whether you use "any_of" or "one_of",
                            # repectively)
                            {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "one_of": {"type": "array"},
                                        "any_of": {"type": "array"},
                                    },
                                },
                            },
                            # Shorthand for a single requirement group with
                            # one member
                            {"type": "string"},
                        ]
                    },
                    "version": {
                        "type": "array",
                        "default": [],
                        # version strings
                        "items": {"anyOf": [{"type": "string"}, {"type": "number"}]},
                    },
                    "target": {
                        "type": "array",
                        "default": [],
                        # target names
                        "items": {"type": "string"},
                    },
                    "compiler": {
                        "type": "array",
                        "default": [],
                        "items": {"type": "string"},
                    },  # compiler specs
                    "buildable": {
                        "type": "boolean",
                        "default": True,
                    },
                    "permissions": {
                        "type": "object",
                        "additionalProperties": False,
                        "properties": {
                            "read": {
                                "type": "string",
                                "enum": ["user", "group", "world"],
                            },
                            "write": {
                                "type": "string",
                                "enum": ["user", "group", "world"],
                            },
                            "group": {
                                "type": "string",
                            },
                        },
                    },
                    # If 'get_full_repo' is promoted to a Package-level
                    # attribute, it could be useful to set it here
                    "package_attributes": {
                        "type": "object",
                        "additionalProperties": False,
                        "patternProperties": {
                            r"\w+": {},
                        },
                    },
                    "providers": {
                        "type": "object",
                        "default": {},
                        "additionalProperties": False,
                        "patternProperties": {
                            r"\w[\w-]*": {
                                "type": "array",
                                "default": [],
                                "items": {"type": "string"},
                            },
                        },
                    },
                    "variants": {
                        "oneOf": [
                            {"type": "string"},
                            {"type": "array", "items": {"type": "string"}},
                        ],
                    },
                    "externals": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "spec": {"type": "string"},
                                "prefix": {"type": "string"},
                                "modules": {"type": "array", "items": {"type": "string"}},
                                "extra_attributes": {"type": "object"},
                            },
                            "additionalProperties": True,
                            "required": ["spec"],
                        },
                    },
                },
            },
        },
    },
}


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack package configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.packages.properties = {'packages': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'additionalProperties': False, 'default': {}, 'properties': {'buildable': {'default': True, 'type': 'boolean'}, 'compiler': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'externals': {'items': {'additionalProperties': True, 'properties': {'extra_attributes': {'type': 'object'}, 'modules': {'items': {'type': 'string'}, 'type': 'array'}, 'prefix': {'type': 'string'}, 'spec': {'type': 'string'}}, 'required': ['spec'], 'type': 'object'}, 'type': 'array'}, 'package_attributes': {'additionalProperties': False, 'patternProperties': {'\\w+': {}}, 'type': 'object'}, 'permissions': {'additionalProperties': False, 'properties': {'group': {'type': 'string'}, 'read': {'enum': ['user', 'group', 'world'], 'type': 'string'}, 'write': {'enum': ['user', 'group', 'world'], 'type': 'string'}}, 'type': 'object'}, 'providers': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'require': {'oneOf': [{'type': 'array', 'items': {'type': 'object', 'properties': {'one_of': {'type': 'array'}, 'any_of': {'type': 'array'}}}}, {'type': 'string'}]}, 'target': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'variants': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, 'version': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}}

Properties for inclusion in other schemas

spack.schema.packages.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'packages': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'additionalProperties': False, 'default': {}, 'properties': {'buildable': {'default': True, 'type': 'boolean'}, 'compiler': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'externals': {'items': {'additionalProperties': True, 'properties': {'extra_attributes': {'type': 'object'}, 'modules': {'items': {'type': 'string'}, 'type': 'array'}, 'prefix': {'type': 'string'}, 'spec': {'type': 'string'}}, 'required': ['spec'], 'type': 'object'}, 'type': 'array'}, 'package_attributes': {'additionalProperties': False, 'patternProperties': {'\\w+': {}}, 'type': 'object'}, 'permissions': {'additionalProperties': False, 'properties': {'group': {'type': 'string'}, 'read': {'enum': ['user', 'group', 'world'], 'type': 'string'}, 'write': {'enum': ['user', 'group', 'world'], 'type': 'string'}}, 'type': 'object'}, 'providers': {'additionalProperties': False, 'default': {}, 'patternProperties': {'\\w[\\w-]*': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}, 'require': {'oneOf': [{'type': 'array', 'items': {'type': 'object', 'properties': {'one_of': {'type': 'array'}, 'any_of': {'type': 'array'}}}}, {'type': 'string'}]}, 'target': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}, 'variants': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, 'version': {'default': [], 'items': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}}, 'title': 'Spack package configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.projections module

Schema for projections.yaml configuration file.

#: Properties for inclusion in other schemas
properties = {
    "projections": {
        "type": "object",
        "patternProperties": {
            r"all|\w[\w-]*": {"type": "string"},
        },
    },
}


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack view projection configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.projections.properties = {'projections': {'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}, 'type': 'object'}}

Properties for inclusion in other schemas

spack.schema.projections.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'projections': {'patternProperties': {'all|\\w[\\w-]*': {'type': 'string'}}, 'type': 'object'}}, 'title': 'Spack view projection configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.repos module

Schema for repos.yaml configuration file.

#: Properties for inclusion in other schemas
properties = {
    "repos": {
        "type": "array",
        "default": [],
        "items": {"type": "string"},
    },
}


#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack repository configuration file schema",
    "type": "object",
    "additionalProperties": False,
    "properties": properties,
}
spack.schema.repos.properties = {'repos': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}

Properties for inclusion in other schemas

spack.schema.repos.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'repos': {'default': [], 'items': {'type': 'string'}, 'type': 'array'}}, 'title': 'Spack repository configuration file schema', 'type': 'object'}

Full schema with metadata

spack.schema.spec module

Schema for a spec found in spec descriptor or database index.json files

TODO: This needs to be updated? Especially the hashes under properties.



target = {
    "oneOf": [
        {
            "type": "string",
        },
        {
            "type": "object",
            "additionalProperties": False,
            "required": [
                "name",
                "vendor",
                "features",
                "generation",
                "parents",
            ],
            "properties": {
                "name": {"type": "string"},
                "vendor": {"type": "string"},
                "features": {
                    "type": "array",
                    "items": {"type": "string"},
                },
                "generation": {"type": "integer"},
                "parents": {
                    "type": "array",
                    "items": {"type": "string"},
                },
            },
        },
    ],
}

arch = {
    "type": "object",
    "additionalProperties": False,
    "properties": {
        "platform": {},
        "platform_os": {},
        "target": target,
    },
}

dependencies = {
    "type": "object",
    "patternProperties": {
        r"\w[\w-]*": {  # package name
            "type": "object",
            "properties": {
                "hash": {"type": "string"},
                "type": {
                    "type": "array",
                    "items": {"type": "string"},
                },
            },
        },
    },
}

build_spec = {
    "type": "object",
    "additionalProperties": False,
    "required": ["name", "hash"],
    "properties": {"name": {"type": "string"}, "hash": {"type": "string"}},
}

#: Properties for inclusion in other schemas
properties = {
    "spec": {
        "type": "object",
        "additionalProperties": False,
        "required": ["_meta", "nodes"],
        "properties": {
            "_meta": {"type": "object", "properties": {"version": {"type": "number"}}},
            "nodes": {
                "type": "array",
                "items": {
                    "type": "object",
                    "additionalProperties": False,
                    "required": [
                        "version",
                        "arch",
                        "compiler",
                        "namespace",
                        "parameters",
                    ],
                    "properties": {
                        "name": {"type": "string"},
                        "hash": {"type": "string"},
                        "package_hash": {"type": "string"},
                        # these hashes were used on some specs prior to 0.18
                        "full_hash": {"type": "string"},
                        "build_hash": {"type": "string"},
                        "version": {
                            "oneOf": [
                                {"type": "string"},
                                {"type": "number"},
                            ],
                        },
                        "arch": arch,
                        "compiler": {
                            "type": "object",
                            "additionalProperties": False,
                            "properties": {
                                "name": {"type": "string"},
                                "version": {"type": "string"},
                            },
                        },
                        "develop": {
                            "anyOf": [
                                {"type": "boolean"},
                                {"type": "string"},
                            ],
                        },
                        "namespace": {"type": "string"},
                        "parameters": {
                            "type": "object",
                            "required": [
                                "cflags",
                                "cppflags",
                                "cxxflags",
                                "fflags",
                                "ldflags",
                                "ldlibs",
                            ],
                            "additionalProperties": True,
                            "properties": {
                                "patches": {
                                    "type": "array",
                                    "items": {"type": "string"},
                                },
                                "cflags": {
                                    "type": "array",
                                    "items": {"type": "string"},
                                },
                                "cppflags": {
                                    "type": "array",
                                    "items": {"type": "string"},
                                },
                                "cxxflags": {
                                    "type": "array",
                                    "items": {"type": "string"},
                                },
                                "fflags": {
                                    "type": "array",
                                    "items": {"type": "string"},
                                },
                                "ldflags": {
                                    "type": "array",
                                    "items": {"type": "string"},
                                },
                                "ldlib": {
                                    "type": "array",
                                    "items": {"type": "string"},
                                },
                            },
                        },
                        "patches": {
                            "type": "array",
                            "items": {},
                        },
                        "dependencies": dependencies,
                        "build_spec": build_spec,
                    },
                },
            },
        },
    }
}

#: Full schema with metadata
schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Spack spec schema",
    "type": "object",
    "additionalProperties": False,
    "patternProperties": properties,
}
spack.schema.spec.properties = {'spec': {'additionalProperties': False, 'properties': {'_meta': {'properties': {'version': {'type': 'number'}}, 'type': 'object'}, 'nodes': {'items': {'additionalProperties': False, 'properties': {'arch': {'additionalProperties': False, 'properties': {'platform': {}, 'platform_os': {}, 'target': {'oneOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name', 'vendor', 'features', 'generation', 'parents'], 'properties': {'name': {'type': 'string'}, 'vendor': {'type': 'string'}, 'features': {'type': 'array', 'items': {'type': 'string'}}, 'generation': {'type': 'integer'}, 'parents': {'type': 'array', 'items': {'type': 'string'}}}}]}}, 'type': 'object'}, 'build_hash': {'type': 'string'}, 'build_spec': {'additionalProperties': False, 'properties': {'hash': {'type': 'string'}, 'name': {'type': 'string'}}, 'required': ['name', 'hash'], 'type': 'object'}, 'compiler': {'additionalProperties': False, 'properties': {'name': {'type': 'string'}, 'version': {'type': 'string'}}, 'type': 'object'}, 'dependencies': {'patternProperties': {'\\w[\\w-]*': {'properties': {'hash': {'type': 'string'}, 'type': {'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}, 'develop': {'anyOf': [{'type': 'boolean'}, {'type': 'string'}]}, 'full_hash': {'type': 'string'}, 'hash': {'type': 'string'}, 'name': {'type': 'string'}, 'namespace': {'type': 'string'}, 'package_hash': {'type': 'string'}, 'parameters': {'additionalProperties': True, 'properties': {'cflags': {'items': {'type': 'string'}, 'type': 'array'}, 'cppflags': {'items': {'type': 'string'}, 'type': 'array'}, 'cxxflags': {'items': {'type': 'string'}, 'type': 'array'}, 'fflags': {'items': {'type': 'string'}, 'type': 'array'}, 'ldflags': {'items': {'type': 'string'}, 'type': 'array'}, 'ldlib': {'items': {'type': 'string'}, 'type': 'array'}, 'patches': {'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['cflags', 'cppflags', 'cxxflags', 'fflags', 'ldflags', 'ldlibs'], 'type': 'object'}, 'patches': {'items': {}, 'type': 'array'}, 'version': {'oneOf': [{'type': 'string'}, {'type': 'number'}]}}, 'required': ['version', 'arch', 'compiler', 'namespace', 'parameters'], 'type': 'object'}, 'type': 'array'}}, 'required': ['_meta', 'nodes'], 'type': 'object'}}

Properties for inclusion in other schemas

spack.schema.spec.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'patternProperties': {'spec': {'additionalProperties': False, 'properties': {'_meta': {'properties': {'version': {'type': 'number'}}, 'type': 'object'}, 'nodes': {'items': {'additionalProperties': False, 'properties': {'arch': {'additionalProperties': False, 'properties': {'platform': {}, 'platform_os': {}, 'target': {'oneOf': [{'type': 'string'}, {'type': 'object', 'additionalProperties': False, 'required': ['name', 'vendor', 'features', 'generation', 'parents'], 'properties': {'name': {'type': 'string'}, 'vendor': {'type': 'string'}, 'features': {'type': 'array', 'items': {'type': 'string'}}, 'generation': {'type': 'integer'}, 'parents': {'type': 'array', 'items': {'type': 'string'}}}}]}}, 'type': 'object'}, 'build_hash': {'type': 'string'}, 'build_spec': {'additionalProperties': False, 'properties': {'hash': {'type': 'string'}, 'name': {'type': 'string'}}, 'required': ['name', 'hash'], 'type': 'object'}, 'compiler': {'additionalProperties': False, 'properties': {'name': {'type': 'string'}, 'version': {'type': 'string'}}, 'type': 'object'}, 'dependencies': {'patternProperties': {'\\w[\\w-]*': {'properties': {'hash': {'type': 'string'}, 'type': {'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}}, 'type': 'object'}, 'develop': {'anyOf': [{'type': 'boolean'}, {'type': 'string'}]}, 'full_hash': {'type': 'string'}, 'hash': {'type': 'string'}, 'name': {'type': 'string'}, 'namespace': {'type': 'string'}, 'package_hash': {'type': 'string'}, 'parameters': {'additionalProperties': True, 'properties': {'cflags': {'items': {'type': 'string'}, 'type': 'array'}, 'cppflags': {'items': {'type': 'string'}, 'type': 'array'}, 'cxxflags': {'items': {'type': 'string'}, 'type': 'array'}, 'fflags': {'items': {'type': 'string'}, 'type': 'array'}, 'ldflags': {'items': {'type': 'string'}, 'type': 'array'}, 'ldlib': {'items': {'type': 'string'}, 'type': 'array'}, 'patches': {'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['cflags', 'cppflags', 'cxxflags', 'fflags', 'ldflags', 'ldlibs'], 'type': 'object'}, 'patches': {'items': {}, 'type': 'array'}, 'version': {'oneOf': [{'type': 'string'}, {'type': 'number'}]}}, 'required': ['version', 'arch', 'compiler', 'namespace', 'parameters'], 'type': 'object'}, 'type': 'array'}}, 'required': ['_meta', 'nodes'], 'type': 'object'}}, 'title': 'Spack spec schema', 'type': 'object'}

Full schema with metadata

spack.schema.upstreams module

spack.schema.upstreams.properties = {'upstreams': {'default': {}, 'patternProperties': {'\\w[\\w-]*': {'additionalProperties': False, 'default': {}, 'properties': {'install_tree': {'type': 'string'}, 'modules': {'properties': {'lmod': {'type': 'string'}, 'tcl': {'type': 'string'}}, 'type': 'object'}}, 'type': 'object'}}, 'type': 'object'}}

Properties for inclusion in other schemas

spack.schema.upstreams.schema = {'$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'properties': {'upstreams': {'default': {}, 'patternProperties': {'\\w[\\w-]*': {'additionalProperties': False, 'default': {}, 'properties': {'install_tree': {'type': 'string'}, 'modules': {'properties': {'lmod': {'type': 'string'}, 'tcl': {'type': 'string'}}, 'type': 'object'}}, 'type': 'object'}}, 'type': 'object'}}, 'title': 'Spack core configuration file schema', 'type': 'object'}

Full schema with metadata

Module contents

This module contains jsonschema files for all of Spack’s YAML formats.