Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use default settings for Config object #5056
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
Use default settings for Config object #5056
Changes from 4 commits
593af88
da4a1c4
c57a0a4
12e7c35
f5fea83
5d7ead4
32e7559
c0dda3b
1b7912e
555f0fb
5891db3
b88b167
77102a1
7c905c6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Why
CONFIG_
was prepended here?I suppose it just should be
DOCKER_IMAGE_SETTINGS
as we are already using in our settings.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 didn't get you.
I prepend the
CONFIG_
to make these settings specific to the config.py file.However, I have pushed the changes, but using
DOCKER_IMAGE_SETTINGS
as the name is causing one test to 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.
We have been using
DOCKER_IMAGE_SETTINGS
so we should keep using its name.Regarding the test, please take a look to see if you can fix it or find the reason why it's failing.
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.
Earlier,
DOCKER_IMAGE_SETTINGS
were not defined insettings/base.py
.Reason for test failure:
since
DOCKER_IMAGE_SETTINGS
is now defined insettings/base.py
, these lineshttps://github.com/rtfd/readthedocs.org/blob/f4d3a93a5c487351e836d51066faf40511a0b45a/readthedocs/doc_builder/config.py#L59-L62
add some more items to the dictionary and hence the
Actual Call
andExpected Call
are not same.This can be fixed pretty easily in two ways:
DOCKER_IMAGE_SETTINGS
to be empty dictionary for this test.Expected Call
.I am +1 on first option and -0 on the second and would like to know that what is a better option?
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.
If the test is not about docker images and python versions, mocking as empty dict is the way to go. On the other, if we want to be sure about some specific value on that dictionary, we should mock it with that specific value.
Changing the expected call with the values of that setting is tricky, because then we will add another docker image and the test will fail again.
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.
Actually the test is related to the docker image and python versions, so i added the the missing key-values in the
Expected call
which is following the same pattern as in the code in my comment above.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.
has to be added here.
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.
latest
is4.0
now, so