Skip to content

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

Closed
wants to merge 3 commits into from
Closed

setting stable version manually #3723

wants to merge 3 commits into from

Conversation

aasis21
Copy link
Contributor

@aasis21 aasis21 commented Mar 3, 2018

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.

  • if stable_version in yaml file, disable stable version setting from UI and give preference to yaml setting.
  • if yaml setting is not a valid version, then use default readthedocs mechanism for getting the stable branch.
  • we will need more calls to load_yaml_config from readthedocs/doc_builder/config.py. Will it be fine?

Please review and give further suggestions

Copy link
Contributor

@bansalnitish bansalnitish left a 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 !

identifier=new_stable.identifier)
trigger_build(project=self.project, version=stable_version)


Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this blank line !

@@ -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)


Copy link
Contributor

Choose a reason for hiding this comment

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

Undo this !

if (not comparable.is_prerelease and version_obj.active)]
return stable_version_choice


Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this blank line !

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
Copy link
Contributor

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 !

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)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto !

@aasis21
Copy link
Contributor Author

aasis21 commented Mar 4, 2018

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 project.update_stable_version() is called. Should I add a new field to model?

Furthermore, for yaml configuration, we first need to configure readthedocs_build repository to read and validate stable_version input form yaml file. I didn't get it previously.

@ericholscher ericholscher requested a review from a team November 1, 2018 18:32
@humitos
Copy link
Member

humitos commented Nov 6, 2018

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 stable branch as the related issue talks about.

@humitos humitos added Needed: design decision A core team decision is required PR: work in progress Pull request is not ready for full review labels Nov 6, 2018
@agjohnson agjohnson removed the request for review from a team November 15, 2018 19:28
@humitos
Copy link
Member

humitos commented Jan 9, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required PR: work in progress Pull request is not ready for full review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants