Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

niall-byrne/mmmm_cookies

Repository files navigation

Mmmm Cookies

Not the evil tracking type.

Project Documentation

Main Branch Builds

  • mmmm_cookies Push Container
  • mmmm_cookies Push Generic
  • mmmm_cookies Push Wheel

Production Branch Builds

  • mmmm_cookies Push Container
  • mmmm_cookies Push Generic
  • mmmm_cookies Push Wheel

Release Automation

  • mmmm_cookies Release Container
  • mmmm_cookies Release PyPi

Documentation Builds

  • Documentation Status

Development Quick Start Guide

You'll need to install:

Build the development environment container (this takes a few minutes):

  • docker-compose build

Start the environment container:

  • docker-compose up -d

Spawn a shell inside the container:

  • ./container

Development Tooling Reference

Inside the container you'll find the Development CLI:

  • Run the CLI without arguments to see the complete list of available commands: dev
  • For more details see the pib_cli Python Package.
  • Customize the CLI to suit your needs.

Pre-Commit Git Hooks

The python library pre-commit comes installed with a host of useful initial hooks:

Default Installed Pre-Commit Hooks:

Hook Name Description
check_container Encourages you to make commits inside the PIB environment.
check_spelling Runs aspell on your commit messages to prevent typos.
commitizen Runs commitizen on your commit message to validate it.
protected_branches Runs additional tests for branches marked as important.
shellcheck Runs shellcheck on your shell scripts.
trufflehog Runs TruffleHog to scan for credential leaks.
pyproject.toml Runs tomll on your TOML configuration file.
yamllint Runs yamllint on your YAML configuration files.

Most of these hooks use values from local.env file that can be customized. Furthermore, the spell check script manages its own word dictionary that you can customize.

Installing a virtual environment, and the CLI on your host machine

The scripts/extras.sh script does this for you.

Source this script, and use the dev command on your host:

  • pip install poetry
  • source scripts/extras.sh
  • pib_setup_hostmachine (to install the poetry dependencies)
  • dev --help (to run the cli outside the container)

This is most useful for making a local IDE (like Pycharm) aware of what Python packages are installed in your project.

It is still always recommended to work with CLI commands inside the container, as you'll have access to the full managed Python environment.