Skip to content
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

Allow for period as a prefix and yaml extension for config file #4512

Merged
merged 5 commits into from Aug 27, 2018
Merged

Allow for period as a prefix and yaml extension for config file #4512

merged 5 commits into from Aug 27, 2018

Conversation

@StefanoChiodino
Copy link
Contributor

@StefanoChiodino StefanoChiodino commented Aug 13, 2018

Fixes #4102 bringing it over from the build repo.

Ref. readthedocs/readthedocs-build#48

Copy link
Member

@humitos humitos left a comment

Changes look great! Thanks.

Loading

Copy link
Member

@stsewd stsewd left a comment

Thanks, I just left some comments about the code style.

Loading

code=CONFIG_REQUIRED,
)
raise ConfigError('No configuration file found',
code=CONFIG_REQUIRED)
Copy link
Member

@stsewd stsewd Aug 13, 2018

Choose a reason for hiding this comment

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

Our style guide is something like

raise ConfigError(
    'Text',
    code=CONFIG_REQUIRED
)

Loading

@@ -137,6 +145,14 @@ def test_load_unknow_version(tmpdir):
assert excinfo.value.code == VERSION_INVALID


def test_yaml_extension(tmpdir):
""" Make sure it's capable of loading the 'readthedocs' file with a 'yaml' extension. """
Copy link
Member

@stsewd stsewd Aug 13, 2018

Choose a reason for hiding this comment

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

There are spaces in the sides of this docstring

Loading

@@ -790,6 +806,13 @@ def test_raise_config_not_supported():
assert excinfo.value.code == CONFIG_NOT_SUPPORTED


@pytest.mark.parametrize("correct_config_filename",
[prefix + "readthedocs." + extension for prefix in {"", "."}
for extension in {"yml", "yaml"}])
Copy link
Member

@stsewd stsewd Aug 13, 2018

Choose a reason for hiding this comment

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

We use singlequotes

Loading

@stsewd
Copy link
Member

@stsewd stsewd commented Aug 13, 2018

Also, there is a test that needs to be changed https://travis-ci.org/rtfd/readthedocs.org/jobs/415587982#L970

Loading

@StefanoChiodino
Copy link
Contributor Author

@StefanoChiodino StefanoChiodino commented Aug 24, 2018

Sorry this took me a while! Hopefully this should pass now :)

Loading

stsewd
stsewd approved these changes Aug 24, 2018
Copy link
Member

@stsewd stsewd left a comment

Thanks!

Loading

@@ -1620,3 +1643,6 @@ def test_submodules_recursive_explict_default(self):
assert build.submodules.include == []
assert build.submodules.exclude == []
assert build.submodules.recursive is False



Copy link
Member

@stsewd stsewd Aug 24, 2018

Choose a reason for hiding this comment

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

I guess this extra lines shouldn't be here

Loading

@agjohnson
Copy link
Contributor

@agjohnson agjohnson commented Aug 27, 2018

Looks great! Thanks a ton for porting the PR over!

Loading

@agjohnson agjohnson merged commit c670e18 into readthedocs:master Aug 27, 2018
1 check passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants