Skip to content

Version handling improvements #1354

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

Merged
merged 6 commits into from
Jun 19, 2015
Merged

Version handling improvements #1354

merged 6 commits into from
Jun 19, 2015

Conversation

gregmuellegger
Copy link
Contributor

Here are some improvements that I made while investigating #1052.
The breakdown is:

  • Remove magic constants like 'stable' and 'latest' and use a defined constant instead.
  • Add create_stable / create_latest manager methods for easier creation of versions.
  • BetterVersion is a terrible name IMO :) It should more say about what it actually is. I renamed it to VersionIdentifier.
  • Added tests that should provide more insight for "stable" version won't go away #1052. Unfortunatelly they didn't. The tests might still be useful to have in the suite.

@d0ugal
Copy link
Contributor

d0ugal commented Jun 18, 2015

Nice!

# self.versions.create(slug='stable', verbose_name='stable', type='branch', active=True, identifier=branch)
slug=LATEST, verbose_name=LATEST_VERBOSE_NAME, machine=True, type='branch', active=True, identifier=branch)
# if not self.versions.filter(slug=STABLE).exists():
# self.versions.create_stable(type='branch', identifier=branch)
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the create_stable isn't used currently?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ericholscher added a commit that referenced this pull request Jun 19, 2015
@ericholscher ericholscher merged commit 8fc71e5 into readthedocs:master Jun 19, 2015
@ericholscher
Copy link
Member

🎆

@gregmuellegger gregmuellegger deleted the version-handling-improvements branch July 2, 2015 12:03
gregmuellegger added a commit that referenced this pull request Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants