-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Remove hardcoded constant from config module #4704
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
Conversation
readthedocs/config/config.py
Outdated
@@ -135,25 +135,40 @@ class BuildConfigBase(object): | |||
version = None | |||
|
|||
def __init__(self, env_config, raw_config, source_file, source_position): |
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'll open an issue about removing source_position, I think we have a card to track this.
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.
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), |
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.
This is from validate_base
we should remove that and validate_name
, we never used that, probably another PR.
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.
Opened #4706
readthedocs/config/config.py
Outdated
: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. |
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.
Probably rename this to be more accurate?
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. |
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. |
@agjohnson I got confused, then I realize my own comment #4401 (comment). This is ready for review |
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.
Looks good to me!
fix #4388 and also no
fi x #4401