Skip to content

Developer Docs

Iain Hunter edited this page Jan 30, 2022 · 5 revisions

Dev Dependencies

To hack on the project pip install the dev dependencies:

pip install -r requirements_dev.txt

You may need to set the Python path to set the root module, as explained on Stackoverflow here

export PYTHONPATH=$PYTHONPATH:/tools/terraform/utils/terragen

Linting / Formatting

Linting: flake8

Formatting: black .

Building Project

A new release created as follows:

Test release

A test release can be built as follows

bumpversion --current-version 0.1.0 minor setup.py terragen/__init__.py

## Documentation

Commands

Useful commands for mkdocs

  • mkdocs new [dir-name] - Create a new project.
  • mkdocs serve - Start the live-reloading docs server.
  • mkdocs build - Build the documentation site.
  • mkdocs -h - Print help message and exit.
python setup.py develop  # Build locally and test
# Optionally release to test pypi
python -m build
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Prod Release

To release to Pypi

python -m build
twine upload dist/*

Clone this wiki locally