Extension for checking dates within repositories.

class datalad.plugin.check_dates.CheckDates[source]

Bases: datalad.interface.base.Interface

Find repository dates that are more recent than a reference date.

The main purpose of this tool is to find “leaked” real dates in repositories that are configured to use fake dates. It checks dates from three sources: (1) commit timestamps (author and committer dates), (2) timestamps within files of the “git-annex” branch, and (3) the timestamps of annotated tags.

class EnsureChoice(*values)


Ensure an input is element of a set of possible values

class EnsureNone


Ensure an input is of value None

class EnsureStr(min_len=0)


Ensure an input is a string.

No automatic conversion is attempted.

class Parameter(constraints=None, doc=None, args=None, **kwargs)

Bases: object

This class shall serve as a representation of a parameter.

get_autodoc(name, indent=' ', width=70, default=None, has_default=False)

Docstring for the parameter to be used in lists of parameters

Return type:string or list of strings (if indent is None)
ac = <module '' from '/home/docs/checkouts/'>
static custom_result_renderer(res, **kwargs)[source]

Like ‘json_pp’, but skip non-error results without flagged objects.


Decorator for return value evaluation of datalad commands.

Note, this decorator is only compatible with commands that return status dict sequences!

Two basic modes of operation are supported: 1) “generator mode” that yields individual results, and 2) “list mode” that returns a sequence of results. The behavior can be selected via the kwarg return_type. Default is “list mode”.

This decorator implements common functionality for result rendering/output, error detection/handling, and logging.

Result rendering/output can be triggered via the datalad.api.result-renderer configuration variable, or the result_renderer keyword argument of each decorated command. Supported modes are: ‘default’ (one line per result with action, status, path, and an optional message); ‘json’ (one object per result, like git-annex), ‘json_pp’ (like ‘json’, but pretty-printed spanning multiple lines), ‘tailored’ custom output formatting provided by each command class (if any).

Error detection works by inspecting the status item of all result dictionaries. Any occurrence of a status other than ‘ok’ or ‘notneeded’ will cause an IncompleteResultsError exception to be raised that carries the failed actions’ status dictionaries in its failed attribute.

Status messages will be logged automatically, by default the following association of result status and log channel will be used: ‘ok’ (debug), ‘notneeded’ (debug), ‘impossible’ (warning), ‘error’ (error). Logger instances included in the results are used to capture the origin of a status report.

Parameters:func (function) – __call__ method of a subclass of Interface, i.e. a datalad command definition
result_renderer = 'tailored'