Skip to content

Add schema for yaml configuration file #4079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
85 changes: 85 additions & 0 deletions docs/yaml/spec/v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Read the Docs configuration file",
"type": "object",
"required": [],
"properties": {

"version": {
"description": "The version of the spec to use",
"type": "string",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String just in case we have some experimental versions like "latest"

"enum": ["1", "2"],
"default": "1"
},

"formats": {
"description": "Formats of the documentation to be built",
"type": "array",
"items": {
"type": "string",
"enum": ["htmlzip", "pdf", "epub", "singlehtmllocalmedia"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the singlehtmllocalmedia option regarding to #3220 (a little long by the way)

},
"default": ["htmlzip", "pdf", "epub", "singlehtmllocalmedia"],
"uniqueItems": true
},

"requirements_file": {
"description": "The path to the requirements file from the root of the project",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find any format to path, so we need to validate this on our side (we need to validate that the path exists anyway)

"type": "string"
},

"conda": {
"description": "Configuration for Conda support",
"type": "object",
"properties": {
"file": {
"description": "The path to the Conda environment file from the root of the project",
"type": "string"
}
}
},

"build": {
"description": "Configuration for the documentation build process",
"type": "object",
"properties": {
"image": {
"description": "The build docker image to be used",
"type": "string",
"enum": ["1.0", "2.0", "latest"],
"default": "2.0"
}
}
},

"python": {
"description": "Configuration of the Python executable to be used",
"type": "object",
"properties": {
"version": {
"description": "The Python versions",
"type": "string",
"enum": ["2", "2.7", "3", "3.3", "3.4", "3.5", "3.6"],
"default": "2.7"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soon this would be 3.6 :)

},
"setup_py_install": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can rename this to setup_install?

"description": "Install the project using python setup.py install",
"type": "boolean",
"default": false
},
"pip_install": {
"description": "Install your project with pip",
"type": "boolean",
"default": false
},
"extra_requirements": {
"description": "Extra requirements sections to install in addition to the package dependencies",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}