UC Davis DataLab
Fall 2022
Instructor: Maggie Berrens <[email protected]>, Parker Bremer <[email protected]>, Frank Cerasoli <[email protected]>
This three-day course is designed to prepare incoming (or experienced) graduate students and post docs with little to no coding experience for the coding demands that many graduate courses and research often requires. In the past this training was fully run by graduate students held over zoom or in a random classroom. This year we have teamed up with the UC Davis Data lab, who have offered their assistance in running the workshop and providing space for the workshop to take place. With that being said this intensive training is still majorly put together and run by graduate students and post docs aimed to help other graduate students and post docs. The intensive training will take place over September 6th - 8th from 5 pm - 7 pm with limited seating on campus in the Shields 360 (DataLab classroom) as well as on Zoom for those who don't obtain a spot for in person. This is a great opportunity to learn a new skill and meet other graduate students! Each session will begin with about an hour of demonstration to teach fundamental Python topics. This will be followed by time where studetns can work on an assignment with each other and ask questions to volunteers. The assignment each day will build off the previous sessions so by the end you will have a complete Python project!
After this workshop, learners will be familiar with:
- Basic Python programming syntax
- Commonly used libraries such as NumPy and Pandas
- Visualization tools, writing reusable functions
- Identifying where to go to learn more.
No prior programming experience is necessary.
The course reader is a live webpage, hosted through GitHub, where you can enter curriculum content and post it to a public-facing site for learners.
To make alterations to the reader:
-
Run
git pull
, or if it's your first time contributing, see the Setup section of this document. -
Edit an existing chapter file or create a new one. Chapter files are Markdown files (
.md
) in thechapters/
directory. Enter your text, code, and other information directly into the file. Make sure your file:- Follows the naming scheme
##_topic-of-chapter.md
(the only exception isindex.md
, which contains the reader's front page). - Begins with a first-level header (like
# This
). This will be the title of your chapter. Subsequent section headers should be second-level headers (like## This
) or below.
Put any supporting resources in
data/
orimg/
. For large files, see the Large Files section of this document. You do not need to add resources generated by your code (such as plots). The next step saves these indocs/
automatically. - Follows the naming scheme
-
Run the command
jupyter-book build .
in a shell at the top level of the repo to regenerate the HTML files in the_build/
. -
When you're finished,
git add
:- Any files you edited directly
- Any supporting media you added to
img/
- The
.gitattributes
file (if you added a large file)
Then
git commit
andgit push
. This updates themain
branch of the repo, which contains source materials for the web page (but not the web page itself). -
Run the command
ghp-import -n -p -f _build/html
in a shell at the top level of the repo to update thegh-pages
branch of the repo. This uses theghp-import
Python package, which you will need to install first (pip install ghp-import
). The live web page will update automatically after 1-10 minutes.
We recommend using or mamba (or the slower but equivalent conda) to manage Python dependencies. You can create a new conda environment with all of the packages necessary to build the book with this command:
mamba env create --name intro-py python jupyter-book ghp-import