Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@
# https://plausible.io/packaging.python.org
html_js_files.extend(_metrics_js_files)

html_extra_path = [
"../extra",
]

# -- Options for HTML help output ------------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-help-output

Expand Down
2 changes: 1 addition & 1 deletion source/specifications/build-details/v1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Specification
-------------

.. jsonschema:: ../../../extra/specifications/schemas/build-details-v1.0.schema.json
.. jsonschema:: ../schemas/build-details-v1.0.schema.json
:lift_title: false


Expand Down
117 changes: 1 addition & 116 deletions source/specifications/direct-url-data-structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,122 +236,7 @@ JSON Schema

The following JSON Schema can be used to validate the contents of ``direct_url.json``:

.. code-block::

{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "Direct URL Data",
"description": "Data structure that can represent URLs to python projects and distribution artifacts such as VCS source trees, local source trees, source distributions and wheels.",
"definitions": {
"URL": {
"type": "string",
"format": "uri"
},
"DirInfo": {
"type": "object",
"properties": {
"editable": {
"type": ["boolean", "null"]
}
}
},
"VCSInfo": {
"type": "object",
"properties": {
"vcs": {
"type": "string",
"enum": [
"git",
"hg",
"bzr",
"svn"
]
},
"requested_revision": {
"type": "string"
},
"commit_id": {
"type": "string"
},
"resolved_revision": {
"type": "string"
}
},
"required": [
"vcs",
"commit_id"
]
},
"ArchiveInfo": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"pattern": "^\\w+=[a-f0-9]+$",
"deprecated": true
},
"hashes": {
"type": "object",
"patternProperties": {
"^[a-f0-9]+$": {
"type": "string"
}
}
}
}
}
},
"allOf": [
{
"type": "object",
"properties": {
"url": {
"$ref": "#/definitions/URL"
}
},
"required": [
"url"
]
},
{
"anyOf": [
{
"type": "object",
"properties": {
"dir_info": {
"$ref": "#/definitions/DirInfo"
}
},
"required": [
"dir_info"
]
},
{
"type": "object",
"properties": {
"vcs_info": {
"$ref": "#/definitions/VCSInfo"
}
},
"required": [
"vcs_info"
]
},
{
"type": "object",
"properties": {
"archive_info": {
"$ref": "#/definitions/ArchiveInfo"
}
},
"required": [
"archive_info"
]
}
]
}
]
}
.. literalinclude:: schemas/direct-url.schema.json

Examples
========
Expand Down
1 change: 1 addition & 0 deletions source/specifications/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ and for proposing new ones, is documented on
section-package-indices
section-python-description-formats
section-reproducible-environments
schemas/index.rst
99 changes: 99 additions & 0 deletions source/specifications/schemas/direct-url.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://packaging.python.org/en/latest/specifications/schemas/direct-url.schema.json",
"title": "Direct URL Data",
"description": "Data structure that can represent URLs to python projects and distribution artifacts such as VCS source trees, local source trees, source distributions and wheels.",
"definitions": {
"url": {
"type": "string",
"format": "uri"
},
"DirInfo": {
"type": "object",
"properties": {
"editable": {
"type": ["boolean", "null"]
}
}
},
"VCSInfo": {
"type": "object",
"properties": {
"vcs": {
"type": "string",
"enum": ["git", "hg", "bzr", "svn"]
},
"requested_revision": {
"type": "string"
},
"commit_id": {
"type": "string"
},
"resolved_revision": {
"type": "string"
}
},
"required": ["vcs", "commit_id"]
},
"ArchiveInfo": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"pattern": "^\\w+=[a-f0-9]+$",
"deprecated": true
},
"hashes": {
"type": "object",
"patternProperties": {
"^[a-f0-9]+$": {
"type": "string"
}
}
}
}
}
},
"allOf": [
{
"type": "object",
"properties": {
"url": {
"$ref": "#/definitions/url"
}
},
"required": ["url"]
},
{
"anyOf": [
{
"type": "object",
"properties": {
"dir_info": {
"$ref": "#/definitions/DirInfo"
}
},
"required": ["dir_info"]
},
{
"type": "object",
"properties": {
"vcs_info": {
"$ref": "#/definitions/VCSInfo"
}
},
"required": ["vcs_info"]
},
{
"type": "object",
"properties": {
"archive_info": {
"$ref": "#/definitions/ArchiveInfo"
}
},
"required": ["archive_info"]
}
]
}
]
}
8 changes: 8 additions & 0 deletions source/specifications/schemas/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _`packaging-schemas`:

PyPA schemas
############

- `direct_url.json <direct-url.schema.json>`_
- `build-details.json <build-details-v1.0.schema.json>`_
- `pylock.toml <pylock.schema.json>`_
Loading
Loading