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                "additionalProperties": false
 84              }
 85            }
 86          },
 87          "additionalProperties": false,
 88          "oneOf": [
 89            {
 90              "required": ["requires"],
 91              "not": {"required": ["feature-order"]}
 92            },
 93            {
 94              "required": ["static-properties"],
 95              "not": {"required": ["plugin-api"]}
 96            }
 97          ]
 98        }
 99      },
100      "additionalProperties": false
101    },
102    "variants": {
103      "description": "Mapping of variant labels to properties",
104      "type": "object",
105      "patternProperties": {
106        "^[a-z0-9_.]+$": {
107          "type": "object",
108          "description": "Mapping of namespaces in a variant",
109          "patternProperties": {
110            "^[a-z0-9_]+$": {
111              "description": "Mapping of feature names in a namespace",
112              "type": "object",
113              "patternProperties": {
114                "^[a-z0-9_]+$": {
115                  "description": "List of values for this variant feature",
116                  "type": "array",
117                  "items": {
118                    "type": "string",
119                    "pattern": "^[a-z0-9_.]+$"
120                  },
121                  "minItems": 1,
122                  "uniqueItems": true
123                }
124              },
125              "additionalProperties": false
126            }
127          },
128          "additionalProperties": false
129        }
130      },
131      "additionalProperties": false
132    }
133  },
134  "required": [
135    "$schema",
136    "default-priorities",
137    "providers",
138    "variants"
139  ],
140  "additionalProperties": false
141}