-
Notifications
You must be signed in to change notification settings - Fork 331
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
[MAINT] Bump version to 0.16.2dev0 #2137
base: main
Are you sure you want to change the base?
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
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'm not sure this is what we want to do. Reason: on our currently deployed dev
site, the version switcher actually shows the wrong thing (it says "0.16.1 (stable)" even though the URL says .../latest/...
. Seems like fixing that would make the existing test pass (and needs to get fixed anyway).
Ooh, so the actual issue is different than I thought. Let me put this back into draft and figure out what the actual root cause is. |
731c65a
to
05e3f88
Compare
So after looking into this more carefully, there's some logic in # Define the version we use for matching in the version switcher.
version_match = os.environ.get("READTHEDOCS_VERSION")
release = pydata_sphinx_theme.__version__
# If READTHEDOCS_VERSION doesn't exist, we're not on RTD
# If it is an integer, we're in a PR build and the version isn't correct.
# If it's "latest" → change to "dev" (that's what we want the switcher to call it)
if not version_match or version_match.isdigit() or version_match == "latest":
# For local development, infer the version to match from the package.
if "dev" in release or "rc" in release:
version_match = "dev"
# We want to keep the relative reference if we are in dev mode
# but we want the whole url if we are effectively in a released version
json_url = "_static/switcher.json"
else:
version_match = f"v{release}"
elif version_match == "stable":
version_match = f"v{release}" We never bumped the version after the last release to @drammock What do you think of this fix? As far as I can tell there's nothing actually wrong in the version chooser code otherwise, though it's maybe not the way I'd have done it. If we're tired of bumping these numbers by hand, we could always use |
Glad to hear the problem is that simple to fix! IIRC it's not the first time the bump has been missed after a release, so:
Yes please. It's already on my mental backlog of improvements that I wanted to suggest if we ever got caught up with the actual issue backlog
I'd be open to revisiting the switcher code if you have ideas. It seems to be perpetually unable to satisfy the use cases or workflow preferences of all users. |
Cool, let's merge this and I can make another issue for investigating automatic version bumping. |
This PR fixes an issue with the locator in the
test_version_switcher_highlighting
test, which should allow #2133 to pass automated tests.Note that this test is not run by CI, but that should be addressed in #2133. To test, please run this manually.
(Sorry about the extra PR - I don't have permissions to push to the branch in #2133). cc @trallard