idmtools.plugins.git_commit module#

Git plugin to add git repo details to items.

idmtools.plugins.git_commit.idmtools_platform_pre_create_item(item: IEntity, kwargs)[source]#

Adds git information from local repo as tags to items on creation.

There following options are valid kwargs and configuration options: * add_git_tags_to_all - Add git tags to everything * add_to_experiments - Add git tags to experiments * add_git_tags_to_simulations - Add git tags to simulations * add_git_tags_to_workitems - Add git tags to workitems * add_git_tags_to_suite - Add git tags to suites * add_git_tags_to_asset_collection - Add git tags to asset collections

Every option expects a truthy value, meaning “True, False, t, f, 1, 0, yes, or no. Any positive value, True, yes, 1, t, y will enable the option.

When defined in the idmtools.ini, these should be added under the “git_tag” section without the “git_tags” portion. For example

[git_tag] add_to_experiments = y

Also, you can do this through environment variables using IDMTOOLS_GIT_TAG_<option>. For example, experiments would be

IDMTOOLS_GIT_TAG_ADD_TO_EXPERIMENTS

Parameters:
  • item – Item to add tags two

  • kwargs – Optional kwargs

Returns:

None

idmtools.plugins.git_commit.add_details_using_gitpython()[source]#

Support gitpython if installed.

Returns:

Git tags

idmtools.plugins.git_commit.add_details_using_pygit() Dict[str, str][source]#

Support pygit if installed.

Returns:

Git tags