Introduction

This tutorial will teach you how to create a reproducible python package for anyone to install.

Module Learning Objectives

This module will be fully interactive. Participants are strongly encouraged to follow along on the command line. After completing this module, participants should be able to:

  • Create a python package hosted on GitHub
  • Specify package dependencies
  • Create tests to validate package
  • Understand the importance of random seeds and deterministic testing
  • Install package with pip from GitHub

Why is this important?

Python is often thought as a scripting language, and used in a similar manner to bash. While this is true, many python scripts require third-party packages, and there is often no way to know if the script actually functions as expected on your system.

If you plan on sharing your script with others, we recommend transforming it into a proper package with specified dependencies and validation tests. This precaution will improve reproducibility and help you avoid the “works on my system” issues you encounter while supporting your community.

Requirements

  • Accounts
    • GitHub
  • Software
    • Python 3
    • git
    • python pip