memote.suite.results.repo_result_manager

Provide a memote result manager that integrates with a git repository.

Module Contents

Classes

RepoResultManager Manage storage of results to JSON files.
class memote.suite.results.repo_result_manager.RepoResultManager(repository, location, **kwargs)[source]

Bases: memote.suite.results.result_manager.ResultManager

Manage storage of results to JSON files.

Results are stored to and loaded from a specific location (directory) and enriched with git commit meta information.

record_git_info(self, commit=None)[source]

Record git meta information.

Parameters:
commit : str, optional

Unique hexsha of the desired commit.

Returns:
GitInfo

Git commit meta information.

get_filename(self, git_info)[source]

Create a filename from the storage directory and the commit hash.

Parameters:
git_info : GitInfo

A named tuple with git meta information.

Returns:
str

The path to the file where the result of the current commit is stored.

static add_git(meta, git_info)[source]

Enrich the result meta information with commit data.

store(self, result, commit=None, **kwargs)[source]

Store a result in a JSON file attaching git meta information.

Parameters:
result : memote.MemoteResult

The dictionary structure of results.

commit : str, optional

Unique hexsha of the desired commit.

kwargs

Passed to parent function.

load(self, commit=None)[source]

Load a result from the storage directory.