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            "builtin": {
 41              "description": "The identifier of a builtin provider if this is one",
 42              "type": "string",
 43              "enum": ["abi_dependency"]
 44            },
 45            "feature-order": {
 46              "description": "Feature order for static-properties",
 47              "type": "array",
 48              "items": {
 49                "type": "string",
 50                "pattern": "^[a-z0-9_]+$"
 51              },
 52              "minItems": 1,
 53              "uniqueItems": true
 54            },
 55            "optional": {
 56              "description": "Whether the provider is optional (disabled by default)",
 57              "type": "boolean"
 58            },
 59            "plugin-api": {
 60              "description": "Object reference to plugin class",
 61              "type": "string",
 62              "pattern": "^([a-zA-Z0-9._]+ *: *[a-zA-Z0-9._]+)|([a-zA-Z0-9._]+)$"
 63            },
 64            "requires": {
 65              "description": "Dependency specifiers for how to install the plugin",
 66              "type": "array",
 67              "items": {
 68                "type": "string",
 69                "minLength": 1
 70              },
 71              "minItems": 1,
 72              "uniqueItems": true
 73            },
 74            "static-properties": {
 75              "description": "Static properties (by feature name)",
 76              "type": "object",
 77              "patternProperties": {
 78                "^[a-z0-9_]+$": {
 79                  "description": "Ordered value list",
 80                  "type": "array",
 81                  "items": {
 82                    "type": "string",
 83                    "pattern": "^[a-z0-9_.]+$"
 84                  },
 85                  "minItems": 0,
 86                  "uniqueItems": true
 87                }
 88              },
 89              "additionalProperties": false
 90            }
 91          },
 92          "additionalProperties": false,
 93          "oneOf": [
 94            {
 95              "required": ["builtin"],
 96              "not": {
 97                "anyOf": [
 98                  { "required": ["feature-order"] },
 99                  { "required": ["plugin-api"] },
100                  { "required": ["requires"] },
101                  { "required": ["static-properties"] }
102                ]
103              }
104            },
105            {
106              "required": ["requires"],
107              "not": {
108                "anyOf": [
109                  { "required": ["builtin"] },
110                  { "required": ["feature-order"] },
111                  { "required": ["static-properties"] }
112                ]
113              }
114            },
115            {
116              "required": ["static-properties"],
117              "not": {
118                "anyOf": [
119                  { "required": ["builtin"] },
120                  { "required": ["requires"] },
121                  { "required": ["plugin-api"] }
122                ]
123              }
124            }
125          ]
126        }
127      },
128      "additionalProperties": false
129    },
130    "variants": {
131      "description": "Mapping of variant labels to properties",
132      "type": "object",
133      "patternProperties": {
134        "^[a-z0-9_.]+$": {
135          "type": "object",
136          "description": "Mapping of namespaces in a variant",
137          "patternProperties": {
138            "^[a-z0-9_]+$": {
139              "description": "Mapping of feature names in a namespace",
140              "type": "object",
141              "patternProperties": {
142                "^[a-z0-9_]+$": {
143                  "description": "List of values for this variant feature",
144                  "type": "array",
145                  "items": {
146                    "type": "string",
147                    "pattern": "^[a-z0-9_.]+$"
148                  },
149                  "minItems": 1,
150                  "uniqueItems": true
151                }
152              },
153              "additionalProperties": false
154            }
155          },
156          "additionalProperties": false
157        }
158      },
159      "additionalProperties": false
160    }
161  },
162  "required": [
163    "$schema",
164    "default-priorities",
165    "providers",
166    "variants"
167  ],
168  "additionalProperties": false
169}