Starting a new Python codebase? Read on to see how this template can have you set-up with all the elements of a professional codebase in less than 30 mins.
Installing the needed dependencies and building your new project is easy with the following steps ...
pip install cookiecutter
(or better yet, use pipx)
pipx install cookiecutter
Use the official installer
curl -sSL https://install.python-poetry.org | python3 -
(or better yet, use pipx)
pipx install poetry
Run cookiecutter on the template's repository:
cookiecutter gh:ADACS-Australia/adacs_template_python_base
and answer the questions:
Create and activate a new virtual environment (use Python version >= 3.11) using your favourite method (if you don't know how to use Python environments, we advise you to go learn about them now) and install the project by running the following in the new repo directory:
poetry install
Follow these instructions to configure GitHub, Read the Docs, PyPI, etc.
A codebase that eases collaboration and automatically:
-
Ensures that all code on the main branch and released versions:
- builds correctly (including documentation) and passes all unit tests
- conforms to the project's code formatting and linting policies
- is properly versioned
-
And optionally, automates the following for new releases of your project:
- publication to PyPI so people can easilly install it
- publication of updated documentation to Read the Docs
Other ADACS Python templates can then be applied to this base template to quickly kickstart a new project.