Python template repository including boilerplate workflows and CI.
.pre-commit-config.yaml
.github
└── workflows
.gitlab
└── issue_templates
└── merge_request_templates
.gitlab-ci.yaml
Delete unused folder after creating the repository.
The name of a new project should be descriptive and short.
The repository name should be in kebab-case, string, e.g., python-cookiecutter
,
api-onboarding
.
Avoid CamelCase or underscores: you can use them for OOP classes or properties.
Please, see CONTRIBUTING.md for more details on:
- using pre-commit;
- following the git flow and making good pull requests.
You can create new projects starting from this repository, so you can use a consistent CI and checks for different projects.
Besides all the explanations in the CONTRIBUTING.md file, you can use the docker-compose file (e.g. if you prefer to use docker instead of installing the tools locally)
docker-compose run pre-commit
Tune the Github pipelines in .github/workflows.
To speed up the development, you can test the pipeline with act. Its installation is beyond the scope of this document.
To test the pipeline locally and ensure that secrets (e.g., service accounts and other credentials) are correctly configured, use:
# Run a specific job in the pipeline
act -j test -s CI_API_TOKEN="$(cat gh-ci.json)" \
-s CI_ACCOUNT=my-secret-account
Tune the Gitlab pipelines in .gitlab-ci.yml.
To speed up the development, you can test the pipeline with gitlab-ci-local. Its installation is beyond the scope of this document.
gitlab-ci-local --file .gitlab-ci.yaml super-linter