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

Add name to the kernelOptions #60

Merged
merged 6 commits into from Jan 17, 2023

Conversation

joergbrech
Copy link
Contributor

@joergbrech joergbrech commented Jan 12, 2023

Fixes #59.

See also executablebooks/thebe#349.

Follow-up question: Can we have some kind of doctests verifying that all code blocks in the documentation don't error?

Edit from @choldgraf : i think this also closes #43 and closes #53

Edit: Closes executablebooks/jupyter-book#1173

@welcome
Copy link

welcome bot commented Jan 12, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.

Welcome to the EBP community! 🎉

Copy link
Member

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

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

Good catch - do you think we can deprecate kernelName or should we keep it?

For tests, i agree, but nobody has had the bandwidth to write them. I guess you could do it with playwright or something like this.

@joergbrech
Copy link
Contributor Author

Good catch - do you think we can deprecate kernelName or should we keep it?

I honestly don't know 🤷 I wasn't brave enough to deprecate it.

@choldgraf
Copy link
Member

choldgraf commented Jan 12, 2023

@stevejpurves would you be willing to provide guidance on whether we can remove/deprecate kernelName?

@stevejpurves
Copy link
Member

I would keep it -- I believe that a kernel launch can fail if the (default) named kernel is not available on the server/service, and if for some reason a kernel named python3 is not there then that would block usage, even though the public binder may have that kernel available.

@choldgraf
Copy link
Member

@stevejpurves so name and kernelName serve two different purposes then? Could you link to a doc (or provide briefly here) so that we can cross-link in the sphinx-thebe docs to help others understand when/how to use?

@choldgraf
Copy link
Member

ah looking at the comment in the linked issue, it seems that name is the new correct option after thebe 0.6, and kernelName is an old / deprecated option:

Does that sound correct to you @stevejpurves ?

@joergbrech
Copy link
Contributor Author

joergbrech commented Jan 12, 2023

I am not entirely sure, but I believe this could fix executablebooks/jupyter-book#1173 also (with a sphinx-thebe release and a bump in the jb dependencies).

@choldgraf
Copy link
Member

Yep i think you are right. Let's cross link that issue in the PR as well so that it closes it. We can make a release quickly!

@stevejpurves
Copy link
Member

@choldgraf I can't actually find any reference to the two existing side by side outside of thebe.
AskernelName has no effect in the current thebe release, and as thebe is moving to not using the Juptyerlab sessions at all - it looks like deprecating kernelName would be ok here after all, and as a breaking change make it clearer for sphinx-thebe users to switch to /usename.

In the meantime, thebe 0.8.x needs an update to provide the backwards compatbility

@choldgraf
Copy link
Member

Ah ok, thanks for this clarification - I'd then suggest:

  • make kernelName rename itself to name if given, and raise a warning.
  • Add a comment to that line that the 0.8 release of thebe will change its API. @stevejpurves it would be really helpful if you took a look at this extension just to recommend if there are any other things that will be deprecated)
  • open an issue to track the future change

@joergbrech
Copy link
Contributor Author

make kernelName rename itself to name if given, and raise a warning.

@choldgraf I am afraid I don't understand enough about the interplay of thebe/sphinx/jupyter etc. What do you mean by this? Doesn't sphinx-thebe just parse thebe-kernel from the Markdown metadata and copy it to the thebe html config? Where would kernelName be given, so that it can be renamed?

@choldgraf
Copy link
Member

choldgraf commented Jan 12, 2023

@joergbrech ah I'm being silly - kernelName is chosen by sphinx-thebe, not the user. I think we can just deprecate the use of kernelName entirely by deleting that line. I added comments to make that clearer.

I think we should still open an issue about the soon-to-be-deprecated-again API. @stevejpurves would you be willing to explain in a new issue what we'll need to change?

sphinx_thebe/__init__.py Outdated Show resolved Hide resolved
@stevejpurves
Copy link
Member

@choldgraf yes I will - how about you go ahead and release this change first, then I can sit down and test the jb|sphinx-thebe|thebe together and make sure I have a clear picture.

joergbrech and others added 3 commits January 12, 2023 13:43
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
@joergbrech
Copy link
Contributor Author

@choldgraf just a friendly ping. Are we ready to merge?

Copy link
Member

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@choldgraf choldgraf merged commit 2083451 into executablebooks:main Jan 17, 2023
@welcome
Copy link

welcome bot commented Jan 17, 2023

Congrats on your first merged pull request in this project! 🎉
congrats

Thank you for contributing, we are very proud of you! ❤️

@choldgraf
Copy link
Member

Yep - thanks for the ping. If any of you are interested in having merge rights on this repository, I am happy to provide them. I clearly do not have enough time to maintain this in addition to all the other stuff I have to do, and I don't want to block progress on myself!

@joergbrech joergbrech deleted the joergbrech-patch-1 branch January 17, 2023 11:45
@joergbrech
Copy link
Contributor Author

Yep - thanks for the ping. If any of you are interested in having merge rights on this repository, I am happy to provide them. I clearly do not have enough time to maintain this in addition to all the other stuff I have to do, and I don't want to block progress on myself!

Thanks, but as this is just a small side project, I don't see myself contributing often. Also I know too little about the whole jupyter-sphinx-thebe ecosystem to be of much value. Once this is in jupyter book I will be happy for a while 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants