diff --git a/src/schemas/json/pyproject.json b/src/schemas/json/pyproject.json index 5a29832ecf3..9022d16561b 100644 --- a/src/schemas/json/pyproject.json +++ b/src/schemas/json/pyproject.json @@ -12,7 +12,8 @@ "items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z_0-9]*(?:\\.[A-Za-z_][A-Za-z_0-9]*)*(?:\\s*;\\s*private)?$" - } + }, + "x-tombi-array-values-order": "version-sort" }, "projectAuthor": { "type": "object", @@ -105,6 +106,35 @@ "x-tombi-table-keys-order": "version-sort" } } + }, + "DependencyGroup": { + "type": "array", + "title": "Dependency specifiers or include groups", + "description": "Each list item should be either:\n- [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/), or\n- table with a single key `include-group` which specifies another group name to include into this one", + "markdownDescription": "Each list item should be either:\n- [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/), or\n- table with a single key `include-group` which specifies another group name to include into this one", + "x-intellij-html-description": "

Each list item should be either:

", + "x-tombi-array-values-order": { + "oneOf": ["version-sort", "ascending"] + }, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "include-group": { + "type": "string", + "pattern": "^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$" + } + }, + "x-tombi-array-values-order-by": "include-group" + } + ] + } } }, "properties": { @@ -408,6 +438,7 @@ "key": "https://packaging.python.org/en/latest/specifications/pyproject-toml/#urls" } }, + "x-tombi-additional-key-label": "url_label", "x-tombi-table-keys-order": "version-sort", "examples": [ { @@ -434,6 +465,7 @@ "key": "https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts" } }, + "x-tombi-additional-key-label": "script_name", "x-tombi-table-keys-order": "version-sort", "examples": [ { @@ -455,6 +487,7 @@ "key": "https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts" } }, + "x-tombi-additional-key-label": "script_name", "x-tombi-table-keys-order": "version-sort", "examples": [ { @@ -470,7 +503,8 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "x-tombi-additional-key-label": "entry_point_name" } }, "propertyNames": { @@ -494,6 +528,7 @@ "key": "https://packaging.python.org/en/latest/specifications/entry-points/#use-for-plugins" } }, + "x-tombi-additional-key-label": "entry_point_group_name", "x-tombi-table-keys-order": "version-sort", "examples": [ { @@ -523,7 +558,6 @@ }, "optional-dependencies": { "type": "object", - "x-tombi-table-keys-order": "version-sort", "patternProperties": { "^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$": { "type": "array", @@ -541,6 +575,8 @@ "key": "https://packaging.python.org/en/latest/specifications/pyproject-toml/#dependencies-optional-dependencies" } }, + "x-tombi-additional-key-label": "package_name", + "x-tombi-table-keys-order": "version-sort", "examples": [ { "typing": ["boto3-stubs", "typing-extensions ~= 4.1"] @@ -881,41 +917,27 @@ "title": "PEP 735 dependency groups", "description": "Named groups of dependencies, similar to `requirements.txt` files, which launchers, IDEs, and other tools can find and identify by name. Each item in `[dependency-groups]` is defined as mapping of group name to list of [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/).", "markdownDescription": "Named groups of dependencies, similar to `requirements.txt` files, which launchers, IDEs, and other tools can find and identify by name. Each item in `[dependency-groups]` is defined as mapping of group name to list of [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/).", - "x-intellij-html-description": "

Named groups of dependencies, similar to requirements.txt files, which launchers, IDEs, and other tools can find and identify by name. Each item in [dependency-groups] is defined as mapping of group name to list of dependency specifiers.

", - "x-tombi-table-keys-order": "version-sort", - "x-taplo": { - "links": { - "key": "https://peps.python.org/pep-0735/" + "type": "object", + "properties": { + "dev": { + "$ref": "#/definitions/DependencyGroup" } }, - "type": "object", - "additionalProperties": false, "patternProperties": { "^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$": { - "type": "array", - "title": "Dependency specifiers or include groups", - "description": "Each list item should be either:\n- [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/), or\n- table with a single key `include-group` which specifies another group name to include into this one", - "markdownDescription": "Each list item should be either:\n- [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/), or\n- table with a single key `include-group` which specifies another group name to include into this one", - "x-intellij-html-description": "

Each list item should be either:

", - "x-tombi-array-values-order": "version-sort", - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "include-group": { - "type": "string", - "pattern": "^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$" - } - } - } - ] - } + "$ref": "#/definitions/DependencyGroup" + } + }, + "additionalProperties": false, + "x-intellij-html-description": "

Named groups of dependencies, similar to requirements.txt files, which launchers, IDEs, and other tools can find and identify by name. Each item in [dependency-groups] is defined as mapping of group name to list of dependency specifiers.

", + "x-tombi-additional-key-label": "group_name", + "x-tombi-table-keys-order": { + "properties": "version-sort", + "patternProperties": "version-sort" + }, + "x-taplo": { + "links": { + "key": "https://peps.python.org/pep-0735/" } } }, @@ -937,6 +959,7 @@ "key": "https://packaging.python.org/en/latest/specifications/pyproject-toml/#arbitrary-tool-configuration-the-tool-table" } }, + "x-tombi-additional-key-label": "tool_name", "x-tombi-table-keys-order": "version-sort", "properties": { "black": { @@ -1027,7 +1050,7 @@ "tombi": { "$ref": "https://json.schemastore.org/tombi.json", "title": "TOML Toolkit", - "description": "Tombi (鳶) is a toolkit for TOML; providing a formatter/linter and language server" + "description": "Tombi is a toolkit for TOML; providing a formatter/linter and language server" }, "tox": { "$ref": "https://json.schemastore.org/partial-tox.json",