A cookiecutter template for Azure Devops Python projects
In order to get started, it is NOT necessary to clone the git repository of the template. Instead, run the commands below:
- Make sure
cookiecutter
is installed:
python3 -m pip install --user cookiecutter
- Generate new project in an interactive manner:
cookiecutter gh:quara-dev/python-template-internal
When running the command, you will be prompted for option values. When no value is provided, default value (displayed between
[]
) is used.
Before pushing the first commit to remote repository, some pre-requisites must be met.
- Create new pip config according to your needs. For example:
[global]
index-url=https://pkgs.dev.azure.com/QUARA/_packaging/quara-project/pypi/simple/
- Upload pip config as a secret named
pip.conf
-
Import project from Azure Devops into Sonarqube.
-
Obtain project token from Sonarcloud.
-
Update project key in
sonar-project.properties
if required. -
Update service connection name in
.azuredevops/pipelines/ci.yml
is required.
Documentation can be built and deployed as an azure static webapp.
Update the variable holding the API token in .azuredevops/pipelines/cd.yml
to enable app publish.