-
-
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
Improve yaml config docs #3685
Improve yaml config docs #3685
Conversation
docs/yaml-config.rst
Outdated
@@ -26,7 +42,7 @@ Choose ``none`` to build none of the formats. | |||
|
|||
# Don't build any extra formats | |||
formats: | |||
- none | |||
- null |
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 think this would no work with the current implementation
This should be:
formats: null
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.
Do we have a test that make this example fail?
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.
Won't this change affect current users using it in this way?
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.
Now we have one :) readthedocs/readthedocs-build#43
Won't this change affect current users using it in this way?
The current description doesn't work for any user using 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.
Mmm, now I see, this value is hardcoded as a string on the code. What should be done now?
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.
and now that I know the syntax for an empty list, would be better that this is represented as []
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.
👍 on using the formats: []
syntax. This example will produce something we don't want:
In [1]: yaml.load("foo:\n - null")
Out[1]: {'foo': [None]}
Also there is a default type |
I think the empty list is the correct default object for a field where a list is expected (instead of None). |
@humitos I was thinking something like this python:
extra_requirements: But that is None, anyway... How to represent an empty list on yaml? Edit: I found it, indeed is |
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.
Great additions! 👍
We'll also want to make sure the empty list example for formats
is correct and maybe even ensure this test case (we probably already do? good to check anyways)
docs/yaml-config.rst
Outdated
@@ -26,7 +42,7 @@ Choose ``none`` to build none of the formats. | |||
|
|||
# Don't build any extra formats | |||
formats: | |||
- none | |||
- null |
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.
👍 on using the formats: []
syntax. This example will produce something we don't want:
In [1]: yaml.load("foo:\n - null")
Out[1]: {'foo': [None]}
This is blocked due readthedocs/readthedocs-build#43 |
Unblocked! |
This is done |
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.
Good work!
The current types on the documentation are a mix of python and yaml. Related issue #2813
null
is used http://yaml.org/spec/1.2/spec.html#id2803362On this PR readthedocs/readthedocs-build#38 you can check that with this values the project works