-
Create a virtual environment
python3 -m venv .venv
-
Activate the virtual environment
source .venv/bin/activate
-
Install required libraries
pip install -r requirements.txt
-
Install source as an editable package
pip install -e .
-
Create the file
.env
containing our sensitive data (that should never go in the repo)secret=42
Once you have completed these steps you should be able to:
- Run
pytest
from the room of the project - Run
pytest
fromtests/
- Run
main.py
from anywhere (e.g.python src/python_structure/main.py
)
requirements.txt
- The list of required libraries.setup.py
- The script thepip
runs to install the package. The current version is bare-bones. Many other options should be set for a production system.src/python_structure/__init__.py
- Establishes thepython_structure
directory as a package. This file is empty by default.