Skip to content

Validate mkdocs.yml config on values that we manipulate #5119

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

Merged
merged 1 commit into from
Jan 16, 2019

Conversation

humitos
Copy link
Member

@humitos humitos commented Jan 16, 2019

Make sure that the values we will manipulate from the mkdocs.yml filethe co rrect type we need them to be. If we found a problem with them, we report a proper message to user to debug it by themselves.

captura de pantalla_2019-01-16_12-03-32

@humitos humitos requested a review from a team January 16, 2019 10:48
@humitos humitos force-pushed the humitos/validate-mkdocs-configs branch 2 times, most recently from cdaa4d7 to 7f530d8 Compare January 16, 2019 11:05
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

Looks good, after tests pass. 👍


INVALID_DOCS_DIR_CONFIG = ugettext_noop(
'The "docs_dir" config from your MkDocs YAML config file has to be a '
'string with relative or absolute path.',
Copy link
Member

Choose a reason for hiding this comment

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

It feels weird to quote this, we should just say it.

Copy link
Member

Choose a reason for hiding this comment

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

Nevermind, I read this wrong.

Make sure that the values we will manipulate from the mkdocs.yml file
the correct type we need them to be. If we found a problem with them,
we report a proper message to user to debug it by themselves.
@humitos humitos force-pushed the humitos/validate-mkdocs-configs branch from 7f530d8 to 2df203e Compare January 16, 2019 14:48
@humitos
Copy link
Member Author

humitos commented Jan 16, 2019

Looks good, after tests pass. +1

The test that failed helped me to find a bug in my code ;)

Also, I added tests for the case of invalid configs also. I'll merge once test pass on Travis.

@humitos humitos merged commit a019447 into master Jan 16, 2019
@delete-merged-branch delete-merged-branch bot deleted the humitos/validate-mkdocs-configs branch January 16, 2019 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants