-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Migrate start-notebook & start-singleuser to python #2006
Conversation
@mathbunnyru I wanted to ask if there's apetite for this kinda change before I put more work into this :) |
6ac1519
to
0cabfb7
Compare
I'll take a look at the test failures if this kinda migration is acceptable! I'm sure I can sort those out if needed. |
I like this PR a lot, just a few thoughts about the implementation:
Overall, great PR, thank you! |
c4f46de
to
15f6833
Compare
I updated your branch (to make sure we test latest versions of everything). |
Glad to hear you like it, @mathbunnyru! I've addressed all the points you mentioned and I think this is ready for review now. I do personally prefer leaving out the I'm definitely interested in tackling My goal would be to do this in such a way that all the existing tests pass, so no new functionality. |
Based on > Stop using bash, haha 👍 from jupyter#1532. If there's more apetite for this, I'll try to migrate `start.sh` and `start-singleuser.sh` as well - I think they should all be merged together. We can remove the `.sh` suffixes for accuracy, and keep symlinks in so old config still works. Since the shebang is what is used to launch the correct interpreter, the `.sh` doesn't matter. Will help fix jupyter#1532, as I believe all those things are going to be easier to do from python than bash
-u can not be set by shebang, we must set the env var instead
Co-authored-by: Ayaz Salikhov <[email protected]>
b9334f9
to
d6519ac
Compare
@mathbunnyru hah, we clashed as I was just about to rebase :) |
Co-authored-by: Ayaz Salikhov <[email protected]>
import shlex | ||
import sys | ||
|
||
# If we are in a JupyterHub, we pass on to `start-singleuser.py` instead so it does the right thing |
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 appreciate it that you added comments to this file! I'm sure it will help future contributors to understand this file faster.
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.
@mathbunnyru you're welcome :)
If you're modifying the behaviour of the start scripts #1528 might fit in too. |
@manics I'm probably going to just try do a verbatim port, and leave the behavior modification to others in the future. Hopefully the fact that it's in python and not bash will make that easier. |
Yay, thank you for the quick review and merge, @mathbunnyru. And for the long set of tests that made this easy |
Based on
from #1532.
If there's more apetite for this, I'll try to migrate
start.sh
andstart-singleuser.sh
as well - I think they should all be merged together. We can remove the.sh
suffixes for accuracy, and keep symlinks in so old config still works. Since the shebang is what is used to launch the correct interpreter, the.sh
doesn't matter.Will help fix #1532, as I believe all those things are going to be easier to do from python than bash
TODO
.py
extensions to the script.sh
files that just redirect us back.sh
scripts