Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 1.17 KB

README.md

File metadata and controls

65 lines (44 loc) · 1.17 KB

Python Package Structure

This contains a template for structuring python packages. Learn more.

Tests

This covers:

  • Structuring python packages
  • Using sub modules to separate code
  • Importing submodules
  • Importing resources like images
  • Testing (pytest, mypy)
  • Linting (flake8)
  • Github actions with tox

Some useful commands:

Building package

# first make sure build is installed and updated
pip install --upgrade build

# then run the build command
python -m build

Install user dependencies

pip install -r requirements.txt

Install dev dependencies

pip install -r requirements_dev.txt

Install the package locally in editable mode

pip install -e .

run pytest to run your tests

pytest

run flake8 to test linting

flake8

get a cool test:status badge on your readme :D

![Tests](https://github.com/<OWNER>/<REPOSITORY>/actions/workflows/<WORKFLOW_FILE>/badge.svg)