pocketutils.tools.program_tools

Module Contents

class pocketutils.tools.program_tools.GitDescription

Data collected from running git describe --long --dirty --broken --abbrev=40 --tags.

class pocketutils.tools.program_tools.ProgramTools

Tools for external programs.

Caution

Please note that these tools execute external code through the subprocess module. These calls are additionally made on partial executable paths, such as git rather than /usr/bin/git. This is an additional security consideration.

classmethod git_description(git_repo_dir: pocketutils.core.PathLike = '.') GitDescription

Runs git describe and parses the output.

Parameters

git_repo_dir – Path to the repository

Returns

A pocketutils.tools.program_tools.GitDescription instance

Raises

CalledProcessError