Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Setting Up Your Python CI Project

Give Feedback

In this video, you’ll learn how to set up the Python project for Continuous Integration (CI). Therefore, a GitHub repository is created, the project is cloned and some basic library functionality is implemented.

Here’s the calculator.py file used in the example code:

"""
calculator.py
Calculator library containing basic math operations.
"""

def add(first_term, second_term):
    return first_term + second_term

def subtract(first_term, second_term):
    return first_term - second_term

You can download the full CalculatorLibrary sample project at the link below:

Download

Sample Code (.zip)

2.8 KB

carykinsfather on Aug. 2, 2019

If on MacOS you may need to put python3 -m venv project_name_here.

Oleksii Potapenko on Oct. 28, 2019

On Windows could not activate as described. It works as depicted here: medium.com/@presh_onyee/activating-virtualenv-on-windows-using-git-bash-python-3-7-1-6b4b21640368

Victor Amadi on Dec. 17, 2019

I agree with @carykinsfather.

Dan Bader RP Team on March 5, 2020

@vicky That’s a private repository on Joe’s GitHub account. As part of this lesson you’ll need to create a new repository under your own GitHub account as explained at the start of the video. Your URL for the git clone command will be different, eg. github.com/YOUR_USERNAME/CalculatorLibrary/

To learn more about working with GitHub, also check out our dedicated course at realpython.com/courses/python-git-github-intro/

j-i-m-s-t-e-r on July 10, 2020

Where are we supposed to paste the content for calculator.py from? I mean, I can type it in manually based on what I see in the video, but for the sake of what the tutorial is teaching, we could do with having the code to paste in to save time (and typos).

Dan Bader RP Team on July 13, 2020

@j-i-m-s-t-e-r: Thanks, we’ve just added the calculator.py file as a course download under Supporting Material and also made it available as an embedded code example on this lesson. Hope that helps you out :)

j-i-m-s-t-e-r on July 14, 2020

Hi Dan - I did see that was there yesterday as I carried on with the course, slapped my forehead, and was about to type here that I was stupid and somehow missed the glaringly obvious Supporting Material that is now there!

Thanks bud!

Become a Member to join the conversation.