-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add schema for configuration file with yamale #4084
Changes from 29 commits
c5aa08a
f38259d
4c02207
a63d39e
7fc52b9
ab7d8fa
602fcd4
b6dd2a2
584ce5e
e4f5a3a
cd5b5dc
07350b9
00e69d9
f4ddb42
89badbf
7b30c8c
e038046
b2e5dbc
40c35a2
ace5f8e
25e962d
1c3a2fa
b63b016
18a6485
dc60f11
79ebf87
6286a34
31fc800
84d1326
9ccd94b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
*.db | ||
*.rdb | ||
*.egg-info | ||
*.log | ||
*.pyc | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Read the Docs configuration file | ||
|
||
# The version of the spec to be use | ||
version: enum('2') | ||
|
||
# Formats of the documentation to be built | ||
# Default: [] | ||
formats: any(list(enum('htmlzip', 'pdf', 'epub')), enum('all'), required=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only valid for sphinx, I wonder if we can move this to the sphinx key, or maybe we want to support this #1939? (still no pdf for mkdocs) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's only valid for sphinx for now. We might have other engines that produce a subset of these later. I'm fine with this being top level |
||
|
||
# Configuration for Conda support | ||
conda: include('conda', required=False) | ||
|
||
# Configuration for the documentation build process | ||
build: include('build', required=False) | ||
|
||
# Configuration of the Python environment to be used | ||
python: include('python', required=False) | ||
|
||
# Configuration for sphinx documentation | ||
sphinx: include('sphinx', required=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could use this to extend the build and support things like #1139 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure. It does seem reasonable to have a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having two different sections could be useful be extended in the future. In case this works as Eric mentioned, we will need a check to to accept one or the other, but not both. |
||
|
||
# Configuration for mkdocs documentation | ||
mkdocs: include('mkdocs', required=False) | ||
|
||
# Submodules configuration | ||
submodules: include('submodules', required=False) | ||
|
||
# Redirects for the current version to be built | ||
# Key/value list, represent redirects of type `type` | ||
# from url -> to url | ||
# Default: null | ||
redirects: map(enum('page'), map(str(), str()), required=False) | ||
|
||
--- | ||
|
||
conda: | ||
# The path to the Conda environment file from the root of the project | ||
environment: path() | ||
|
||
build: | ||
# The build docker image to be used | ||
# Default: 'latest' | ||
image: enum('stable', 'latest', required=False) | ||
|
||
python: | ||
# The Python version (this depends on the build image) | ||
# Default: '3' | ||
version: enum('2', '2.7', '3', '3.3', '3.4', '3.5', '3.6', required=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we dropped support of some 3.x versions: https://github.com/rtfd/readthedocs-docker-images/blob/master/Dockerfile#L10 (or will drop, instead) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A shorter list, I like it ^^ |
||
|
||
# The path to the requirements file from the root of the project | ||
# Default: null | ||
requirements: path(required=False) | ||
|
||
# Install the project using python setup.py install or pip | ||
# Default: null | ||
install: enum('pip', 'setup.py', required=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the first breaking change :), I think is more simple to do this, instead of having a boolean field for each There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, the |
||
|
||
# Extra requirements sections to install in addition to the package dependencies | ||
# Default: [] | ||
extra_requirements: list(str(), required=False) | ||
|
||
# Give the virtual environment access to the global site-packages dir | ||
# Default: false | ||
system_packages: bool(required=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't 100% sure if this should belong in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mostly want this option to go away, but I don't know if we can do it quite yet. I think it can go in |
||
|
||
sphinx: | ||
# The path to the conf.py file | ||
# Default: rtd will try to find it | ||
configuration: path(required=False) | ||
|
||
# Add the -W option to sphinx-build | ||
# Default: false | ||
fail_on_warning: bool(required=False) | ||
|
||
mkdocs: | ||
# The path to the mkdocs.yml file | ||
# Default: rtd will try to find it | ||
configuration: path(required=False) | ||
|
||
# Add the --strict optio to mkdocs build | ||
# Default: false | ||
fail_on_warning: bool(required=False) | ||
|
||
|
||
submodules: | ||
# List of submodules to be included | ||
# Default: [] | ||
include: any(list(str()), enum('all'), required=False) | ||
|
||
# List of submodules to be ignored | ||
# Default: [] | ||
exclude: any(list(str()), enum('all'), required=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it possible to mark these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nop, there isn't :/, I'll see if there is a way to implement a custom validator to do this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I imagine we'll probably need some kind double validation:
|
||
|
||
# Do a recursive clone? | ||
# Default: false | ||
recursive: bool(required=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this spec will be used only on the version 2, if there is another version, we will need to create another schema.
Also, I was thinking that we can use this to validate the current v1 API. But I'm not sure if that's worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I think we can keep v1 as it is.