-
Notifications
You must be signed in to change notification settings - Fork 1
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
[electron] Jupyter Integration #145
Comments
We are using conda constructor not miniconda. Your path assumption may be incorrect. |
fixed to conda in the issue above. |
@israelvicars as we were speaking today, it occurred to me all you may need are the template files here. This is going to be the general template: JupyterServiceStart.sh #!/bin/bash
J_PORT=9999
J_PATH=~/conda/envs/omnisci/bin/jupyter
J_TOKEN="ea436a31623ee0c6ef25f8f340fcf3bdd17f914260dc3e17620ae04f93dfbb3c"
${J_PATH} lab --no-browser --port ${J_PORT} --LabApp.token=${J_TOKEN} This would be the shell file we run on start to start the jupyter server. @xmnlab I am assuming that the environment will contain jupyterlab. There is also an option for adding the path for the notebooks to be saved to. Do we want to set a default path? Furthermore, @israelvicars we can predict the URL for jupyterlab! I was mistaken; the URL for the jupyterlab for the above example would be:
This means that to 'open' jupyterlab in a browser all one would need is the following attached to the onClick function in the electron application: const { shell } = require('electron');
const url = config.jupyterPath.url;
function openJupyter() {
shell.openExternal(url);
}
...
document.querySelector('#btnJupyter').addEventListener('click', () => {
openJupyter()
}) I know we are using typescript for the project, but these are just my thoughts. What do you think @israelvicars? Does this sound feasible? cc: @andrewseidl @xmnlab |
@anirrudh the current default path (v0.0.9) is |
Currently, conda constructor doesn't support target directory with spaces, so we cannot use @israelvicars @andrewseidl, can we keep using the folder |
Noting that we can ping |
@xmnlab yeah, that's probably fine for now. Another option would be under |
@andrewseidl that sounds great! I will change to |
@andrewseidl I was talking to @israelvicars and he commented that probably would be better to have the target parent directory to $HOME (instead of $HOME/Documents), and instead of let me know your thoughts about that. |
Yeah, directly in $HOME is fine. What's the use case for the omnisci-examples symlink? |
there was a discussion about saving the notebook into the Documents folder .. but as omnisci-examples is a conda package, we can create a symlink to Documents. I tried to find the history about this but I didn't find anything. |
cc: @israelvicars @nikitaved @andrewseidl Setting up OmnisciDB connection on Notebook StartIn order to setup the omnisci db connection, we need to run a python command in the ipython process that connects to the db. The command should also be hidden from the user notebook, and the variables instantiated properly. InstallAs a part of the data science installer, we should add a shell command to ensure that a default ipython profile exists for the user. ipython profile create <custom_name> Note that this command is unnecessary if using default profile. After this point, the directory
`~/ipython/<profile_name>/startup/READMEIn this folder, there is a readme that looks like this:
These dictate the order of the files. I will be using the default Writing the startup command
import pyomnisci
import json
f = json.load(conf.json)
connection = pyomnisci.connect(f.user, f.pass) |
After discussion with @israelvicars, I started this issue for tracking the progress on Jupyter Integration.
Workflow
The current user workflow can be broken down like so:
Before Application Launch
implementation details:
@israelvicars noted here that we need to wait for JupyterLab to finish launching until the frontend renders. This will avoid us having to mess with the Jupyter Button in the future.
Jupyter will be launched using a bash script. This path will be in the
config
file as attribute JupyterPath. The output will be piped back into node, parsed,url
extracted and then written to a temporary local file. The file will simply contain the jupyterlab url.The code will only make two assumptions to remain as generic as possible.
conda-datascience-installer
. I will assume that on macOS, the conda install path will be at~/conda/
, and that the 'omnisci' environment will exist at~/conda/envs/omnici
which will also contain the jupyter executable.omnisci
kernel will be created to launch in the environment.After Application Launch:
Short-Term Delivarable
Long Term
cc: @dharhas @niviksha @andrewseidl
The text was updated successfully, but these errors were encountered: