graphtage.version

A module that centralizes the version information for Graphtage.

Changing the version here not only affects the version printed with the --version command line option, but it also automatically updates the version used in setup.py and rendered in the documentation.

graphtage.version.DEV_BUILD

Sets whether this build is a development build. This should only be set to True to coincide with a release. It should always be True before deploying to PyPI.

If False, the git branch will be included in graphtage.version.__version__.

Type:

bool

graphtage.version.__version__

The version of Graphtage. This tuple can contain any sequence of ints and strings. Typically this will be three ints: major/minor/revision number. However, it can contain additional ints and strings. If graphtage.version.DEV_BUILD, then (“git”, git_branch()) will be appended to the version.

Type:

Tuple[Union[int, str], …]

graphtage.version.VERSION_STRING

A rendered string containing the version of Graphtage. Each element of graphtage.version.__version__ is appended to the string, delimited by a “.” if the element is an int or a “-” if the element is a string.

Type:

str

version functions

git_branch

graphtage.version.git_branch() str | None

Returns the git branch for the codebase, or None if it could not be determined.

The git branch is determined by running

$ git symbolic-ref -q HEAD