datalad.plugin.export_to_figshare¶
export a dataset as a TAR/ZIP archive to figshare
-
class
datalad.plugin.export_to_figshare.
ExportToFigshare
[source]¶ Bases:
datalad.interface.base.Interface
Export the content of a dataset as a ZIP archive to figshare
Very quick and dirty approach. Ideally figshare should be supported as a proper git annex special remote. Unfortunately, figshare does not support having directories, and can store only a flat list of files. That makes it impossible for any sensible publishing of complete datasets.
The only workaround is to publish dataset as a zip-ball, where the entire content is wrapped into a .zip archive for which figshare would provide a navigator.
-
class
EnsureChoice
(*values)¶ Bases:
datalad.support.constraints.Constraint
Ensure an input is element of a set of possible values
-
long_description
()¶
-
short_description
()¶
-
-
class
EnsureDataset
¶ Bases:
datalad.support.constraints.Constraint
Despite its name, this constraint does not actually ensure that the argument is a valid dataset, because for procedural reasons this would typically duplicate subsequent checks and processing. However, it can be used to achieve uniform documentation of dataset arguments.
-
long_description
()¶
-
short_description
()¶
-
-
class
EnsureInt
¶ Bases:
datalad.support.constraints.EnsureDType
Ensure that an input (or several inputs) are of a data type ‘int’.
-
class
EnsureNone
¶ Bases:
datalad.support.constraints.Constraint
Ensure an input is of value None
-
long_description
()¶
-
short_description
()¶
-
-
class
EnsureStr
(min_len=0)¶ Bases:
datalad.support.constraints.Constraint
Ensure an input is a string.
No automatic conversion is attempted.
-
long_description
()¶
-
short_description
()¶
-
-
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
Returns: Return type: string or list of strings (if indent is None)
-
-
datasetmethod
(name=None, dataset_argname='dataset')¶
-
eval_results
()¶ 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
-
class