VersionInfo#

tradeexecutor.cli.version_info.VersionInfo Python class in Trading Strategy framework.

class VersionInfo[source]#

Bases: object

Reflect the version information embedded in the Docker image during CI build.

See Dockerimage and .githyb/workflows/tests.yml for details.

__init__(tag=None, commit_message=None, commit_hash=None)#
Parameters:
Return type:

None

Methods

__init__([tag, commit_message, commit_hash])

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

read_docker_version()

Read version information burnt within Docker file-system during image building.

read_version_file(name)

See Dockerfile

schema(*[, infer_missing, only, exclude, ...])

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

Attributes

commit_hash

Git commit SHA hash

commit_message

The latest commit message before release.sh was run

tag

v50

tag: Optional[str] = None#

v50

commit_message: Optional[str] = None#

The latest commit message before release.sh was run

commit_hash: Optional[str] = None#

Git commit SHA hash

static read_version_file(name)[source]#

See Dockerfile

Parameters:

name (str) –

Return type:

Optional[str]

static read_docker_version()[source]#

Read version information burnt within Docker file-system during image building.

Returns:

Populated version info or None for every field if it does not look like we are inside a Docker container.

Return type:

VersionInfo

__init__(tag=None, commit_message=None, commit_hash=None)#
Parameters:
Return type:

None