Skip to content
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

Show precise versions for stable and development ("latest") #16

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Jan 27, 2022

Make it even clearer what software revisions those labels represent.

A git describe style string1 for development ("latest") would be even better than just the git revision, but that appears to be non-trivial to implement.

Resolves nextstrain/augur#817.

h/t to @corneliusroemer for the suggestion and @huddlej for bringing it up again in #15.

Footnotes

  1. e.g. "${tag}-${n}-g${sha}" where ${tag} is the last/closest tag to the current commit, ${n} is the number of commits since that ${tag}, and ${sha} is the shortened id of the current commit.

Make it even clearer what software revisions those labels represent.

A `git describe` style string¹ for development ("latest") would be even
better than just the git revision, but that appears to be non-trivial to
implement.

Resolves <nextstrain/augur#817>.

h/t to @corneliusroemer for the suggestion and @huddlej for bringing it
up again in <#15>.

¹ e.g. "${tag}-${n}-g${sha}" where ${tag} is the last/closest tag to the
  current commit, ${n} is the number of commits since that ${tag}, and
  ${sha} is the shortened id of the current commit.
@tsibley tsibley force-pushed the trs/precise-versions branch from 2b4322a to ffac8ee Compare January 28, 2022 21:23
@tsibley tsibley changed the title Precise versions Show precise versions for stable and development ("latest") Jan 28, 2022
@tsibley tsibley marked this pull request as ready for review January 28, 2022 21:25
Copy link
Contributor

@huddlej huddlej left a comment

Choose a reason for hiding this comment

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

This looks excellent! I'm not sure how to easily test this with Augur, etc. Is the test-bed site something you setup just for this PR?

@tsibley
Copy link
Member Author

tsibley commented Jan 29, 2022

Yeah, https://github.com/nextstrain/readthedocs-testbed and https://readthedocs-testbed.readthedocs.org are new to test out this PR (but I expect to find use for them in future work too).

These changes should work across our real projects with one caveat: the precise version in "stable version (X)" can only be shown if the project's Sphinx conf.py sets a version. Without a version, it'll just display "stable version".

Augur currently doesn't define version, but that can be fixed easily enough. The theme also won't break if version is missing, so it's safe to merge and release this theme change before we go update Augur and others.

tsibley added a commit to nextstrain/augur that referenced this pull request Jan 29, 2022
This will allow us to display the specific version for "stable" on Read
the Docs (once <nextstrain/sphinx-theme#16> is
merged).

Also sets "release" as the Sphinx documentation says¹:

    If you don’t need the separation provided between version and
    release, just set them both to the same value.

¹ https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-release
@tsibley tsibley merged commit 5279201 into main Feb 4, 2022
@tsibley tsibley deleted the trs/precise-versions branch February 4, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Unclear which version is referred to by stable: add stable version number visibly
3 participants