SARP Lessons is in the process of migrating to the NASA-SARP github org. We're excited to be expanding. Check out https://nasa-sarp.github.io/sarp_lessons for the most up-to-date content.
This repository holds the less content that is used for instruction during the NASA Student Airborne Research Program (SARP) summer internship.
The content is organized into a few folders:
lessons
- notebooks used in an organized lecture format. Each one also has practice problemsadditional_lectures
- supplemental notebooks used throughout the summer for quick code talks. No practice problemssnippets
- useful pieces of code that were written to support student project, but aren't always organized well or consistently commentedlanguage_agnostic_content
- PDFs that were used to teach coding concepts broader than just sytnax
The environment.yml
file in the root directory builds an enviroment that can be used to execute the notebooks. There is not currently an environment.yml for building the docs, but one could be make by starting with the student environment.yml environment and then adding conda install -c conda-forge jupyter-book
. You may also need to install some sphinx extensions.
Instructions and environment for building the docs are in the docs/
folder
If you are running this on a SARP laptop then great news - you are already set up! If you are getting set up on a personal computer you can follow the steps below to create a coding environment there.
-
Install Anaconda Go to the Anaconda website, find your operating system, and follow the instructions. This step puts a version of Python on your computer that you will use for analysis. Anaconda is also an environment manager and a package manager.
-
Configure your base environment Part A Add conda-forge as an anaconda channel.
conda config --add channels conda-forge
Part B Install jupyter lab, as well as an additional library that allows juptyer lab to see other conda environments on your system.
conda install -n base nb_conda_kernels
conda install -n base -c conda-forge jupyterlab
After installing the two packages above, you can set conda-forge
to be your default channel.
conda config --set channel_priority strict
Note: You could do this step right after adding conda-forge
as a channel, but some issues have been reported due to nb_conda_kernels
using the Conda Forge installation in this case. The safest route is to set the channel priority after installing nb_conda_kernels
and jupyterlab
.
- Create a work environment From the root of this repository, run the command:
conda env create -f environment.yml
This will create a new enviornment called sarp
with all the packages that are used in this repository in it. It may take several minutes for the dependencies to solve.
From a new command line window (or your base conda environment) run:
jupyter-lab
A new Jupyter Lab session should open! When prompted to choose an enviroment, or anytime you create a new notebook, select Python [conda env:sarp]
as the kernel.
Happy coding!
conda activate sarp_docs
jupyter-book build .
from rootpython -m http.server --directory _build/html/
- Build book
jupyter-book build .
- trigger the ghp-import utility to do its magic
ghp-import -n -p -f _build/html