Not the evil tracking type.
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
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.
The python library pre-commit comes installed with a host of useful initial 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.
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.