Open In Colab   Open in Kaggle

Tutorial 4: Extra Notebook Sections#

Week 1, Day 1: Instructions

By Neuromatch

Content creators: Konstantine Tsafatinos

Content reviewers: Konstantine Tsafatinos

Production editors: Konstantine Tsafatinos


Acknowledgments: [Ella Batty, Spiros Chavlis and neuromatch]


Tutorial Objectives#

Estimated timing of tutorial: [15 mins]

In this tutorial, you will learn about the different sections and folder heirarchies in the course notebook, and how to use them.

You will:

  • learn how to add Art for the landing page of a tutorial day

  • learn how to create Wrap Ups for a given module (category)

  • learn how to add Bonus Tutorials

  • learn how to add/update the course schedule

  • learn how to add prereqs for your course

It is recommended that you read through all of tutorials 1 through 3 as this tutorial builds upon that knowledge.


Section 1: Adding artwork to the day landing page#

In this section, we will describe the naming conventions that you need to follow, in order to add images to the day landing page

Steps:

  • Choose the image you want to use. This can come from the Art contests during the course, or from somewhere on the web.

  • Add the image to the directory tutorials/Art/

  • Name the image with the follow format: W#D#_DayName-Artist_Name.(jpg or png)

You must follow the above format exactly! This includes the underscores and dashes. Here is an example: W2D4_DynamicNetworks-Ekaterina_Morozova.jpg The beginning of the file name (ie. W2D4_) is used to place the image on the landing page for the right day, and the end (ie. -Ekaterina_Morozova) is used to credit the artist. You can find examples here.


Section 2: Adding Module (category) WrapUps#

Module WrapUps are a good way to connect the dots between concepts that were discussed over several days. You can think of new and fun ways to acheive this. In the past we have embedded podcasts about a given topic to help solidify what was taught.

Steps:

  • Decide on the format for your wrap up

  • Add the notebook file to the directory tutorials/Module_WrapUps

  • Give the file the same name as the module (category) with the file extension .ipynb Here is an example of the naming convention: CourseContentTemplateInstructions.ipynb

Note: the category name defined in the materials.yml file may have spaces, but the file name for the wrap up must not. Simply remove the spaces and concatenate all the word in the category title together, exactly how they are written in the materials file.


Section 3: Bonus Tutorials#

You have to option to add bonus tutorials for a given module/category. The process is similar to adding regular tutorials, only the prefix for the folder will be Bonus, instead of the week number and day number. For example, a bonus tutorial within the tutorials directoty would look as follows: tutorials/Bonus_ContentName.

The Bonus directory should follow a similar structure to the regular tutorials directory by including the follow files within the bonus directory:

  • Bonus_Intro.ipynb

  • Bonus_Outro.ipynb

  • Bonus_Tutorial1.ipynb

  • Bonus_TutorialN.ipynb -> N denoting an arbitrary number of tutorials in the bonus.

NOTE: You should add the bonus to the materials file using the following structure:

- day: Bonus

    category: Name of the module you want to include a bonus for

    name: Bonus Content Name

    tutorials: N -> The number of tutorials in the bonus.

You should follow all the same conventions described for regular tutorial creation. This template includes a bonus tutorial in the Intructions section that you can use as a template. See the materials.yml file for how to add a bonus to a module.


Section 4: Course Schedule#

We include a daily schedule and links to shared calendars in the course books for reference for the students and TAs. This section will briefly describe where this content lives, and which files to change for your new course.

Within the tutorials directory, you’ll find a schedule directory (ie. tutorials/Schedule). In this directory, you’ll see the following 4 files:

  • daily_schedules.md

  • schedule_intro.md

  • shared_calendars.md

  • timezone_widget.md

The time zone widget is managed in another repo and is simply linked to this book; you won’t need to really edit that here. The files you want to pay attention to are the daily_schedules.md and shared_calendars.md files. You should edit them reflect the actual schedules and shared calendars for your newly created course.

NOTE: You will need to replace the day names in the daily_schedules.md file to match the name for your course. You will also need to replace the links to the shared calendars (in UTC) to point to the calendars for your course.

We have included examples from our comp neuro course. Please feel free to use them as a template and edit them to your needs.


Section 5: Course Prereqs#

This section briefly describes how to include precourse work for your new course. Generally, the precourse tutorials live in a separate repo. We suggest importing the precourse repo under the neuromatch organization (similar to what you did for this course book), and then naming it something like yourcourse-precourse under the neuromatch organization. You can then edit the tutorials for the prereqs directly and decide what to keep and what to change.

NOTE: You should follow the structure exactly as it is laid out from the imported repo. It is very similar to the structure of the tutorials for the regular book.

You will need to:

  • write all your tutorials in the tutorials directory of the precourse repo

  • use the prefix W0D# for your days of precourse work

  • edit the materials.yml file in the tutorials directory to reflect the names of your days as well as the number of tutorials for each day

  • write an intro for the course/precourse and save it as a .md file in the prereqs directory of the precourse repo

After all that is done, you should then edit the publish-book.yml workflow file in your course book repo under the .github/workflows directory and change ONLY the following env vars to match your new course and precourse repos.

env:

    NB_KERNEL: python

    ORG: neuromatch

    NMA_REPO: new-course-content

    NMA_MAIN_BRANCH: main

    PREREQ_REPO: yourcourse-precourse

    PREREQ_INTRO: MyNewCourse

Below is an example of the vars set for this template:

env:

    NB_KERNEL: python

    ORG: neuromatch

    NMA_REPO: course-content-template

    NMA_MAIN_BRANCH: main

    PREREQ_REPO: precourse

    PREREQ_INTRO: ComputationalNeuroscience

We have included the precourse materials from our comp neuro course in the template to demonstrate how it would look. Feel free to use it as a template for your precourse materials.


Summary#

Congrats! You now know:

  1. how and where to add artwork/images to your day landing page

  2. how and where to add module Wrap Ups

  3. how to include bonus tutorials for a module

  4. how to create/update your course schedules

  5. the basics of adding prereqs to your course notebook

Happy content creating!