summaryrefslogtreecommitdiff
path: root/lib/spack/spack/schema/merged.py
blob: f4d70f8241a3562499258de6a9bc09bd4bcf0a8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

"""Schema for configuration merged into one file.

.. literalinclude:: _spack_root/lib/spack/spack/schema/merged.py
   :lines: 39-
"""
from llnl.util.lang import union_dicts

import spack.schema.bootstrap
import spack.schema.cdash
import spack.schema.ci
import spack.schema.compilers
import spack.schema.concretizer
import spack.schema.config
import spack.schema.container
import spack.schema.definitions
import spack.schema.develop
import spack.schema.mirrors
import spack.schema.modules
import spack.schema.packages
import spack.schema.repos
import spack.schema.upstreams

#: Properties for inclusion in other schemas
properties = union_dicts(
    spack.schema.bootstrap.properties,
    spack.schema.cdash.properties,
    spack.schema.compilers.properties,
    spack.schema.concretizer.properties,
    spack.schema.config.properties,
    spack.schema.container.properties,
    spack.schema.ci.properties,
    spack.schema.definitions.properties,
    spack.schema.develop.properties,
    spack.schema.mirrors.properties,
    spack.schema.modules.properties,
    spack.schema.packages.properties,
    spack.schema.repos.properties,
    spack.schema.upstreams.properties,
)


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