This Python lib eases the implementation of FAI customization scripts with a
high level of abstraction and resonable error handling. It is meant to be
import
'ed in scripts run by fai-do-scripts(1)
during an FAI
installation or softupdate.
The compiled documentation can be found on Read the Docs.
The documentation is based on Sphinx and can be built using make:
make doc
. Documentation sources are in the docs/
directory.
Tests reside in the tests/
directory and are based on pytest and can be run
easily using make: make test
The code is formatted with yapf. Simply use make to format the code in place:
make format
.
With the make command make check
the code base is tested (including
documentation), analyzed with pylint, and the code formatting verified.
Pylint messages should be fixed or directly suppressed in the code if necessary. A suppression should have a comment explaining briefly why the construct is ok (e.g., "false positive").
Consider using make check
as pre-commit hook.
A Makefile
is provided to ease testing and building Python packages. Run
make help
for usage hints.
This lib uses PEP 517/PEP 518-compatible packaging based on setuptools. All
project settings should normally go into setup.cfg
, while setup.py
is mainly
provided for compatibility. The build system configuration resides in
pyproject.toml
.
Each released version is tagged with a tag of the form release/x.y.z
with
x
, y
, and z
being major, minor, and patch version, respectively, as
defined by Semantic Versioning.