-
Notifications
You must be signed in to change notification settings - Fork 324
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
Allow relative json url to work locally (and hopefully on PRs) #599
Conversation
This looks good to me, with one caveat: Historically we have not had a strong practice of using |
Oh it's great to have a way to test locally! If it works I think it should be documented. This is something all projects will want to do. |
Checking this locally, the dropdown now works (no console error + the shorter path for json_url works locally to directly see the effect of changing the json file).
Yeah, that's true. We did it a few times in the past (eg a293862), and so therefore I did it in #574 so we could properly detect the version for the dropdown (but that was done before you added the
That would indeed be sufficient for the online docs. But not for testing it locally, I think?
Personally, I would rather use something like versioneer or setuptools-scm that simply takes care of this for us, and we only have to tag for making a release (because I agree that having to do such a "bump to dev" commit manually after a release is just extra work that is easy to forget). |
Sorry, was looking at the wrong place .. It is actually adding it to the |
What about using the jupyter releaser to automate the whole release process so we do not forget any steps. Btw, that project suggest tbump to bump versions. |
Interesting - the jupyter releases looks quite powerful, though the getting starts docs seem pretty hefty. maybe as a start we could just try using tbump ? That way the release process would be:
I've found it useful to have the step of adding a GitHub release anyway, so that you can link to it on Twitter etc. That said, I still don't find it that cumbersome to just bump the version by hand to the next version, and not use Also just to clarify re:
I think the conditional would be something like: if os.environ.get("READTHEDOCS"):
json_url = "remote-url"
else:
json_url = "local-path" wouldn't that effectively do the same as the dev/remote workflow described here? (at least for 99% of the use-cases) |
That's a good first step, I would say.
I would agree as well, maybe we just need to add the step in the release checklist for now?
I don't think so... if you are in RTD (in a PR preview) and pointing to the "remote-url", you will have a cross-origin error preventing the dropdown from actually working as expected. This PR is fixing that case pointing to the "local-url" when you are working locally AND when you are in a PR preview. |
let's merge this one in - I think there's agreement on the fix even if we are following up in another issue |
Additionally, this is fixing a bug recently introduced and described in #574 (comment)