Set up Python
Part of this lesson consists in learning how to make scripts exit correctly. At some point, we will need to test exit codes with Pytest, Python testing tool.
To know whether your Python has pytest
, just run python -c "import pytest"
. If this command returns nothing, it means everything is fine. Otherwise, please visit https://docs.pytest.org/en/stable/getting-started.html for installation.
Set up Python project code
Notice
We will be reusing the materials from the INTERSECT packaging lesson for our Python project code sample.
- Create a new project from template https://github.com/marshallmcdonnell/intersect-training-packaging-example
-
Name it
intersect-training-cicd
.
If you’re having issues, please let us know immediately since you might not be able to follow this lesson without a proper setup.
Set up Docker (optional)
- Install Docker: https://docs.docker.com/engine/install/
To check your installation open a terminal and run:
docker --version
Note that you may have to run with sudo. If you don’t want to preface the docker command with sudo, you may need to checkout https://docs.docker.com/engine/install/linux-postinstall/.