Workflows with Python and Git

This lesson build on the Plotting and Programming in Python lesson developed by Software Carpentry. It also requires knowledge of the Unix Shell and version control with Git. This lesosn works with both Jupyter Notebooks and writing scripts with a text editor to be run in the shell. Please note that this lesson uses Python 3 rather than Python 2.

Prerequisites

  1. Learners are expected to have been introduced to the material from the Unix Shell lesson, the Plotting and Programming in Python lesson, and the Version control with Git lesson.

  2. Learners must install Python before the workshop starts.

  3. Learners must get the gapminder data before class starts: please download and unzip the file python-novice-gapminder-data.zip.

    Please see the setup instructions for details.

Schedule

Setup Download files required for the lesson
00:00 1. Review Exercise How can we put together all of yesterday’s material?
00:20 2. Command-Line Programs How can I write Python programs that will work like Unix command-line tools?
00:50 3. Trying Different Methods How do I plot multiple data sets using different methods?
01:20 4. Program Flags How can I make an easy shortcut to analyze all files at once using a program flag?
01:30 5. Defensive Programming How do I predict and avoid user confusion?
01:45 6. Refactoring When should I reorganize my code so it is more clear and readable for others?
How can I organize my code so that it is useable in other places?
Why do I almost always want to write my code as though it will be used somewhere else?
02:05 7. Running Scripts and Importing How can I import some of my work even if it is part of a program?
02:25 8. Programming Style How can I make my programs more readable?
How do most programmers format their code?
How can programs check their own operation?
02:35 9. Wrap-Up What have we learned?
What else is out there and where do I find it?
02:45 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.