hermes.commands.harvest.git
Attributes
Classes
Helper class to unify Git commit authors and committers. |
|
Stores contributor data information from Git history. |
|
!!! abstract "Usage Documentation" |
|
Base plugin that does harvesting. |
Module Contents
- class hermes.commands.harvest.git.NodeRegister(cls, *order, **mapping)
Helper class to unify Git commit authors and committers.
This class keeps track of all registered instances and merges two
ContributorDatainstances if some attributes match.
- class hermes.commands.harvest.git.ContributorData(name: str | List[str], email: str | List[str], timestamp: str | List[str], role: str | List[str])
Stores contributor data information from Git history.
- update(name=None, email=None, timestamp=None, role=None)
Update the current contributor with the given data.
- Parameters:
name – New name to assign (addtionally).
email – New email to assign (additionally).
timestamp – New timestamp to adapt time range.
- merge(other: ContributorData)
Merge another
ContributorDatainstance into this one.All attributes will be merged yet kept unique if required.
- Parameters:
other – The other instance that should contribute to this.
- class hermes.commands.harvest.git.GitHarvestSettings(/, **data: Any)
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __pydantic_decorators__
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_fields__
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- class hermes.commands.harvest.git.GitHarvestPlugin
Bases:
hermes.commands.harvest.base.HermesHarvestPluginBase plugin that does harvesting.
- operations
The information recorded on the load operations executed by the plugin.
- Type:
list[tuple[dict[str, str], dict[str, str], dict[str, str]]]
TODO: describe the harvesting process and how this is mapped to this plugin.
- __call__(command: hermes.commands.harvest.base.HermesHarvestCommand) hermes.model.api.SoftwareMetadata
Implementation of a harvester that provides author, branch & remote data from Git.
- _merge_contributors(git_authors: NodeRegister, git_committers: NodeRegister) NodeRegister
Merge the git authors and git committers
NodeRegisterand assign the respective roles for each node.