Learning Objectives¶
By the end of this session, students will be able to:
Pull upstream changes and sync their local project
Fork the course repository to preserve personal changes
Navigate the updated course website and its interactive notebooks
Use Jupyter notebooks for computational work
Preview the course site locally
Understand DataCamp assignment expectations and workflow
Part 1: Syncing Your Repository¶
The course repository is maintained by the instructor. When you pull changes, you are downloading the latest course materials, including new lectures, notebooks, and updated dependencies.
Pull Changes¶
In GitHub Desktop, click Fetch origin and then Pull origin to download the latest updates.
From the command line:
cd ~/github/moma
git pullSync Dependencies¶
After pulling, sync your environment to install any new packages:
uv syncThis ensures your local environment matches the project’s updated pyproject.toml. This week, the updated dependencies include jupytext (for opening Markdown files as notebooks) and jupyterlab-myst (for rendering MyST Markdown in JupyterLab).
Forking for Your Own Work¶
Part 2: Course Website Updates¶
The course website at jhu
Interactive Notebooks¶
Several pages on the course website now include executable code cells powered by MyBinder. MyBinder provides free cloud computing resources so you can run Python code without installing anything on your machine.
To launch a notebook interactively, click the power button at the top of any notebook page on the website. MyBinder builds a temporary environment with all the necessary packages and lets you execute and modify code cells directly in the browser.
Previewing the Site Locally¶
You can preview the full course website on your own machine:
uv run myst startThis launches a local development server. Open the URL shown in the terminal (typically http://localhost:3000) to browse the site. Changes to .md files will update in real time.
Part 3: JupyterLab and Interactive Notebooks¶
Now that we have seen the notebooks rendered on the website, we will open them locally in JupyterLab.
Launching JupyterLab¶
From your ~/github/moma directory:
uv run jupyter labOpening Markdown Files as Notebooks¶
In the JupyterLab file browser, navigate to quantecon/foundations/ and click on one of the .md files (for example, numpy.md). It opens as a plain text file — just a flat Markdown document.
Now, right-click the same file and select Open With > Notebook. The file opens as an interactive Jupyter notebook. This works because jupytext (added as a project dependency and installed via uv sync) recognizes the notebook metadata embedded in these Markdown files. MyST directives like admonitions and math blocks render properly thanks to jupyterlab-myst.
Once open as a notebook, you can:
Run cells one at a time with Shift+Enter
Modify code and re-run to see how the output changes
Add new cells to experiment
Save your changes locally
Using Notebooks in VS Code¶
You can also work with notebooks directly in VS Code:
Open VS Code in your
momafolderCreate a new file with the
.ipynbextensionSelect the Python kernel when prompted
Use Shift+Enter to run a cell and advance to the next one
Part 4: DataCamp Assignments¶
We will walk through the DataCamp platform and discuss expectations for the interactive Python assignments.
How to access DataCamp through the course
Assignment structure and deadlines
How DataCamp grades contribute to your final grade (10%)