Steps to launch notebooks using VSCode#
Step 1: Generate nbgitpuller links to launch VSCode Editor in Datahub#
Access the ngbitpuller link generator website using this link and fill in the following details,
Enter https://eecs.datahub.berkeley.edu as the JupyterHub URL.
Enter the name of your Git repository which contains the ipynb files as “Git Repository URL”. Your github repository name in the example shown in the snapshot below would be “Data88-SP22”.
Enter the branch name of your git repository in the “branch” field.
Ignore the “File To Open” field.
Note
VSCode editor will not launch the filename you entered in the “File To Open” field. It would rather open the directory which contains all the files (including .ipynb files) stored in your source git repository.
Enter Custom URL as “vscode/?folder=/home/jovyan/<Name_Of_Repository>” for the “Application to Open” field.
Copy the unique link generated by nbgitpuller and paste it in your browser. VSCode editor gets launched in the browser.
Note
VSCode editor is currently configured only for EECS Hub and Data 8x Hub. If you want to enable this option as part of other hubs then please do raise a github issue
Step 2: Configure VSCode to execute notebooks using python extensions#
Find the python notebook file (.ipynb) that you want to launch in VSCode editor.
Execute the cell containing the code to install required python packages.
If incase you are not able to run this cell, check if the Python and Jupyter extensions are pre-installed.
If Python extension is not pre-installed, Search “python” in the extension list and install the “ms-python” extension directly or click this link to install the Python extension.
If Jupyter extension is not pre-installed, Search “Jupyter” in the extension list and install the “ms-toolsai.jupyter” extension directly or click this link to install the Jupyter notebook extension.
Step 3: Configure VSCode to work with Otter grader#
Complete steps 1 and 2 and run the code installing otter grader. If you run into issues with otter grader then do pip install otter-grader before you execute this cell again.