Closed akhmerov closed 3 years ago
I'm gonna suggest that we close this one in favor of https://github.com/executablebooks/sphinx-thebe/issues/17 and just ask people to manually specify the URL.
You are correct about the scope. With #17 in mind, I propose to repurpose this into a documentation issue. I imagine a short note for how to configure sphinx to determine the correct ref would be useful.
I think that's a good idea to track - could you open up a new issue for it though? That will encourage us to include the extra information needed to address it...it's a little unclear to me what exactly we'd be recommending others do, since I'm not sure what you mean by "configure Sphinx to determine the correct ref". This isn't something that Sphinx "does" at all is it?
unlike thebelab, which has no access to anything but the html document, sphinx-thebelab has filesystem access since it is a part of sphinx, and it will often be run in a git repository. It may therefore use a reasonably high quality default heuristic for determining which branch should be used by binder. For example, it may execute
git rev-parse --abbrev-ref HEAD
and if the execution was successful use that as a branch name (unless configured otherwise).