-
Notifications
You must be signed in to change notification settings - Fork 335
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
Paths ported from jupyter_core #19
Conversation
I'd also be open to making a package like this that can be used across packages, as I'd use this in side car. |
I'm starting to add tests. In the process I tore out the boilerplate Atom specs for a new package (caused failures). Once this is done, it would be nice to enable Travis CI. |
This makes home resolution work even when /home/ is a symlink to /usr/home. Effects FreeBSD and sometimes OS X.
else | ||
return path.join jupyterConfigDir(), 'data' | ||
|
||
home = userHome() |
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.
Let's make this an if... else if... else
instead of relying on the return
s to be more explicit about the control flow
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.
Done.
This looks good, and it runs great for me! Have you been able to test it on Windows? |
Haven't been able to test this on Windows. I did a minimal amount of adding some mocking specs in (while tossing the skeleton code), but that doesn't say for sure how Windows goes. |
Given that our Windows support is already weak at best, I'll just ship it and see how it goes. |
Paths ported from jupyter_core
@jzthree Just published this live. I know you've got Hydrogen running on Windows, so please let me know if this broke anything for you! |
Hey I just tested. Unfortunately this broke Hydrogen:Run on Windows. The execSync call in paths.coffee failed. I pasted the first few lines of error message here. Error: EBADF: bad file descriptor, write |
Well now I wish I had a Windows box quite a bit... I'm surprised readSync doesn't work but perhaps it's not finding |
Hey @zooba, any ideas? |
@jzthree Just pushed an update that replaces |
Yes just updated and it all works now. Thanks!! |
Thank you @willwhitney, sorry about that. |
This is a port of https://github.com/jupyter/jupyter_core while also including
~/.ipython/
as part of the path search. This ensures that the default directories that the Jupyter consoles and notebook searches through are the same for Hydrogen.The core function here is
jupyterPath
, which gets used like so:This will also be useful for picking up what running kernels are available for the notebook, another console (use Hydrogen on the side of a console session!), etc.