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

Remove hardcoded constant from config module #4704

Merged
merged 3 commits into from Oct 23, 2018

Conversation

@stsewd
Copy link
Member

@stsewd stsewd commented Oct 2, 2018

fix #4388 and also nofi x #4401

@@ -135,25 +135,40 @@ class BuildConfigBase(object):
version = None

def __init__(self, env_config, raw_config, source_file, source_position):
Copy link
Member Author

@stsewd stsewd Oct 2, 2018

Choose a reason for hiding this comment

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

I'll open an issue about removing source_position, I think we have a card to track this.

Loading

Copy link
Member Author

@stsewd stsewd Oct 2, 2018

Choose a reason for hiding this comment

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

Loading

output_base = os.path.abspath(
os.path.join(
self.env_config.get('output_base', base_path),
self.env_config.get('output_base', self.base_path),
Copy link
Member Author

@stsewd stsewd Oct 2, 2018

Choose a reason for hiding this comment

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

This is from validate_base we should remove that and validate_name, we never used that, probably another PR.

Loading

Copy link
Member Author

@stsewd stsewd Oct 2, 2018

Choose a reason for hiding this comment

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

Opened #4706

Loading

:param env_config: A dict that cointains additional information
about the environment.
:param raw_config: A dict with all configuration without validation.
:param source_file: The file that contains the configuration.
Copy link
Member Author

@stsewd stsewd Oct 2, 2018

Choose a reason for hiding this comment

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

Probably rename this to be more accurate?

Loading

@stsewd
Copy link
Member Author

@stsewd stsewd commented Oct 2, 2018

Looks like #4401 comes from another part of the code https://github.com/rtfd/readthedocs.org/blob/67dfae9de7be81af92bd88453427424111a6168f/readthedocs/projects/tasks.py#L424-L424 Should be addressed in another PR, but we are close here.

Loading

@agjohnson
Copy link
Contributor

@agjohnson agjohnson commented Oct 2, 2018

I can't tell how this is going to resolve #4401. It seems the resolution on that issue was to alter the actual error message surfaced to the user.

Loading

@stsewd
Copy link
Member Author

@stsewd stsewd commented Oct 2, 2018

@agjohnson I got confused, then I realize my own comment #4401 (comment). This is ready for review

Loading

@stsewd stsewd requested a review from Oct 2, 2018
Copy link
Contributor

@agjohnson agjohnson left a comment

Looks good to me!

Loading

@agjohnson agjohnson merged commit ea058d5 into readthedocs:master Oct 23, 2018
1 check passed
Loading
@stsewd stsewd deleted the remove-hardcoded-constant branch Oct 23, 2018
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.

2 participants