Purpose¶
Automate low-level, repetitive, yet important development tasks related to semantic versioning, distributed version control, configuration parsing, and build pipelines.
Key Features¶
- Increment semantic version parts for a versioned entity
- Manage the status of a local Git working tree
- Manage Git tags, local and remote, signed and unsigned
- Parse and update basic YAML configuration files
Quickstart¶
TBD
tuulbash¶
kickpy - A bash script intended to kick a Python script from an environment that doesn’t have an estabished Python environment yet. For example:
./kickpy.sh example.py
tuulcli¶
Tuuls for command line interface (CLI).
Define colors and font styles for use in CLI output
-
class
tuulcli.cli_color.
CliColor
¶ Contain the list of colors and font styles
tuuldevops¶
Automation tuuls for common tasks around software development
Provide routines for outputting automated pipeline steps consistently
-
tuuldevops.pipeline_steps.
major_step
(title, description)¶ Output title and description of a major step in the pipeline
Update the version in the tuulbachs-formatted YAML version file
-
tuuldevops.update_version.
update_product_version
(conf_filename, new_ver)¶ Write a new_ver as the new value for the ‘version’ key in the conf_filename
tuulgit¶
An opinionated set of Git tuuls.
tuulver¶
Parsing tuuls for a tuulbachs-formatted version YAML input file.
Utility functions for managing a tuulbachs-formatted version YAML file
-
tuulver.version.
bump_build
(filename)¶ Bump the “build” portion of the version from the input YAML filename
-
tuulver.version.
bump_major
(filename)¶ Bump the major portion of the version from the input YAML filename
-
tuulver.version.
bump_minor
(filename)¶ Bump the minor portion of the version from the input YAML filename
-
tuulver.version.
bump_patch
(filename)¶ Bump the patch portion of the version from the input YAML filename
-
tuulver.version.
bump_pre
(filename, prebase='pre')¶ Bump the “pre” portion of the version from the input YAML filename
-
tuulver.version.
create_version_file
(filename, product_name)¶ Create an initial tuulbachs-formatted version YAML file
-
tuulver.version.
emit_product_name
(filename)¶ Return the product name value from the input YAML filename
-
tuulver.version.
emit_version
(filename)¶ Return the version value from the input YAML filename
tuulyaml¶
Low level tuuls for interacting with YAML files.
Parse an input YAML file
-
tuulyaml.parse.
parse_yaml
(filename)¶ Given input path filename, parse YAML file.
Update a simple top-level value in a YAML file
-
tuulyaml.update_simple_value.
update_value
(inout_path, existing_key, new_value)¶ Update existing_key to new_value in the existing inout_path YAML file.
install¶
Note that tuulbachs is not yet published at PyPi.
- Set up and activate a Python virtual environment at the top level of this project
python3 -m pip install pip-tools
pip-compile
pip-compile requirements-dev.in
pip-sync requirements.txt requirements-dev.txt
cd
to the localauto
directory./install_local.sh
deploy¶
How to deploy updates to tuulbachs itself.
Prerequisite: User must have already followed install guidance at least once in the target environment.
- Decide which type of semantic version upgrade this is (major, minor, patch, etc.)
- In
src/
, runpython3 tuul.py --bump {major, minor, patch}
- Follow install guidance
- Commit changes to Git
- In
src/
, runpython3 tuul.py --autotag
- Push the Git update (including tags) to this repo’s remotes
- In a temp dir, download all required packages without installing them, tar and zip these for deployment.
- On an available machine with the oldest version of GLIBC that you wish to support, in the src dir, run
pyinstaller --add-data ../version.yaml:. --onefile tuul.py
- Publish the release (including offline packages tarball and
tuul
executable) on the repo’s remote (Github, for instance)