Following system colour scheme Selected dark colour scheme Selected light colour scheme

Python Enhancement Proposals

Appendix: JSON Schema for Variant Metadata

Appendix: JSON Schema for Variant Metadata

  1{
  2  "$schema": "https://json-schema.org/draft/2020-12/schema",
  3  "$id": "https://variants-schema.wheelnext.dev/peps/9999/v0.2.0.json",
  4  "title": "Variant metadata, v0.2.0",
  5  "description": "The format for variant metadata (variant.json) and index-level metadata ({name}-{version}-variants.json)",
  6  "type": "object",
  7  "properties": {
  8    "$schema": {
  9      "description": "JSON schema URL",
 10      "type": "string"
 11    },
 12    "default-priorities": {
 13      "description": "Default priorities for ordering variants",
 14      "type": "object",
 15      "properties": {
 16        "namespace": {
 17          "description": "Namespaces (in order of preference)",
 18          "type": "array",
 19          "items": {
 20            "type": "string",
 21            "pattern": "^[a-z0-9_]+$"
 22          },
 23          "minItems": 1,
 24          "uniqueItems": true
 25        }
 26      },
 27      "additionalProperties": false,
 28      "required": [
 29        "namespace"
 30      ]
 31    },
 32    "providers": {
 33      "description": "Mapping of namespaces to provider information",
 34      "type": "object",
 35      "patternProperties": {
 36        "^[A-Za-z0-9_]+$": {
 37          "type": "object",
 38          "description": "Provider information",
 39          "properties": {
 40            "feature-order": {
 41              "description": "Feature order for static-properties",
 42              "type": "array",
 43              "items": {
 44                "type": "string",
 45                "pattern": "^[a-z0-9_]+$"
 46              },
 47              "minItems": 1,
 48              "uniqueItems": true
 49            },
 50            "optional": {
 51              "description": "Whether the provider is optional (disabled by default)",
 52              "type": "boolean"
 53            },
 54            "plugin-api": {
 55              "description": "Object reference to plugin class",
 56              "type": "string",
 57              "pattern": "^([a-zA-Z0-9._]+ *: *[a-zA-Z0-9._]+)|([a-zA-Z0-9._]+)$"
 58            },
 59            "requires": {
 60              "description": "Dependency specifiers for how to install the plugin",
 61              "type": "array",
 62              "items": {
 63                "type": "string",
 64                "minLength": 1
 65              },
 66              "minItems": 1,
 67              "uniqueItems": true
 68            },
 69            "static-properties": {
 70              "description": "Static properties (by feature name)",
 71              "type": "object",
 72              "patternProperties": {
 73                "^[a-z0-9_]+$": {
 74                  "description": "Ordered value list",
 75                  "type": "array",
 76                  "items": {
 77                    "type": "string",
 78                    "pattern": "^[a-z0-9_.]+$"
 79                  },
 80                  "minItems": 0,
 81                  "uniqueItems": true
 82                }
 83              },
 84              "additionalProperties": false
 85            }
 86          },
 87          "additionalProperties": false,
 88          "oneOf": [
 89            {
 90              "required": ["requires"],
 91              "not": {
 92                "anyOf": [
 93                  { "required": ["feature-order"] },
 94                  { "required": ["static-properties"] }
 95                ]
 96              }
 97            },
 98            {
 99              "required": ["static-properties"],
100              "not": {
101                "anyOf": [
102                  { "required": ["requires"] },
103                  { "required": ["plugin-api"] }
104                ]
105              }
106            }
107          ]
108        }
109      },
110      "additionalProperties": false
111    },
112    "variants": {
113      "description": "Mapping of variant labels to properties",
114      "type": "object",
115      "patternProperties": {
116        "^[a-z0-9_.]+$": {
117          "type": "object",
118          "description": "Mapping of namespaces in a variant",
119          "patternProperties": {
120            "^[a-z0-9_]+$": {
121              "description": "Mapping of feature names in a namespace",
122              "type": "object",
123              "patternProperties": {
124                "^[a-z0-9_]+$": {
125                  "description": "List of values for this variant feature",
126                  "type": "array",
127                  "items": {
128                    "type": "string",
129                    "pattern": "^[a-z0-9_.]+$"
130                  },
131                  "minItems": 1,
132                  "uniqueItems": true
133                }
134              },
135              "additionalProperties": false
136            }
137          },
138          "additionalProperties": false
139        }
140      },
141      "additionalProperties": false
142    }
143  },
144  "required": [
145    "$schema",
146    "default-priorities",
147    "providers",
148    "variants"
149  ],
150  "additionalProperties": false
151}