A minimal CI/CD setup for Python
This is just a test repo for me to experiment with CI/CD. The CI/CD pipelines are mostly based on those developed for the IBM Compliance Trestle.
This setup include the generation of documents.
Basic operations
- To install the package:
pip install -e .
- To reformat code:
make code-format
- To lint:
make code-lint
- to test:
make test
Configuration files
CI/CD pipelines
.github/workflows
: CI/CD pipelines using Github ActionsMakefile
: Build scripts supporting the actions
Git pre-commit hooks
.pre-commit-config.yaml
: Config forpre-commit
- After checking out the repo, run
make pre-commit
orpre-commit install
to install the hooks
setuptools
)
Python dependencies (pyproject.toml
setup.py
setup.cfg
Notes:
- See this article for more details on setuptools
install_requires=
in the[options]
section ofsetup.cfg
lists the files that will be installed withpip install .
orpip install -e .
- The
-e
flag putspip install
in the editable mode. - The
[options.extras_require]
section ofsetup.cfg
defines a set of packages (nameddev
) that will be installed withpip install -e ".[dev]"
.