-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
setting stable version manually #3723
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
Conversation
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.
Hi @aasis21
I went through your code and found some minor writing issues which are also the cause of build failure. I have left some comments for you !
readthedocs/projects/forms.py
Outdated
identifier=new_stable.identifier) | ||
trigger_build(project=self.project, version=stable_version) | ||
|
||
|
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.
Remove this blank line !
readthedocs/projects/forms.py
Outdated
@@ -347,7 +363,6 @@ def save_version(self, version): | |||
if version.active and not version.built and not version.uploaded: | |||
trigger_build(project=self.project, version=version) | |||
|
|||
|
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.
Undo this !
readthedocs/projects/models.py
Outdated
if (not comparable.is_prerelease and version_obj.active)] | ||
return stable_version_choice | ||
|
||
|
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.
Remove this blank line !
readthedocs/projects/models.py
Outdated
version_list = self.versions.all() | ||
stable_version_choice = sort_versions(version_list) | ||
stable_version_choice = [(version_obj.identifier, version_obj.verbose_name) | ||
for version_obj, comparable in stable_version_choice |
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.
Indent this by only 4 spaces !
readthedocs/projects/models.py
Outdated
stable_version_choice = sort_versions(version_list) | ||
stable_version_choice = [(version_obj.identifier, version_obj.verbose_name) | ||
for version_obj, comparable in stable_version_choice | ||
if (not comparable.is_prerelease and version_obj.active)] |
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.
Ditto !
I realize that we need some design decision regarding this. We need to add a new field to project model to save whether the stable version has been customized by the user or not. Otherwise, it will change automatically every time Furthermore, for |
Hi @aasis21! It seems there are some design decisions to me made at #3279 before this feature gets implemented. I'm not sure how to review it yet since I'm not sure what we want here or how we want to implement it. At first, I can say that this is probably not a config for the YAML file since it's per-version and the config is per-project. Although, I'm not sure if we want the user just to have a |
Since this PR was started without a consensus on how this should be implemented and it's stale at this point, I'll close it here based on my last comment at #3279 (comment) Thanks for your contribution and I'm sorry that this didn't get merged. We can revisit it if we change our mind, though. |
regarding #3279
@ericholscher, @humitos, I have added a drop-down input to manually set the stable version. I have also started working on
yaml
setting for stable version but need some feature overview.stable_version
inyaml
file, disable stable version setting from UI and give preference toyaml
setting.yaml
setting is not a valid version, then use defaultreadthedocs
mechanism for getting the stable branch.load_yaml_config
fromreadthedocs/doc_builder/config.py
. Will it be fine?Please review and give further suggestions