DATALAD-RUN-PROCEDURE(1)
π NAME π
okay so this is datalad run-procedure(1) from the General Commands Manual, and it's literally the page for datalad run-procedure β run prepared procedures (DataLad scripts) on a dataset. π
It's giving "automate your dataset routine and look cute doing it." β¨
β¨ SYNOPSIS β¨
datalad run-procedure [-h] [-d PATH] [--discover] [--help-proc]
[--version] ...
π DESCRIPTION π
π§ Concept π§
A "procedure" is an algorithm with the purpose to process a dataset in a particular way. Procedures can be useful in a wide range of scenarios, like adjusting dataset configuration in a uniform fashion, populating a dataset with particular content, or automating other routine tasks, such as synchronizing dataset content with certain siblings. π¦
Implementations of some procedures are shipped together with DataLad, but additional procedures can be provided by:
- any DataLad extension
- any (sub-)dataset
- a local user
- a local system administrator
DataLad will look for procedures in the following locations and order:
Directories identified by the configuration settings:
datalad.locations.user-procedures(determined byplatformdirs.user_config_dir; defaults to$HOME/.config/datalad/procedureson GNU/Linux systems)datalad.locations.system-procedures(determined byplatformdirs.site_config_dir; defaults to/etc/xdg/datalad/procedureson GNU/Linux systems)datalad.locations.dataset-procedures
and subsequently in the resources/procedures/ directories of any installed extension, and, lastly, of the DataLad installation itself. π
Please note that a dataset that defines any dataset it is a subdataset of. That way you can have a collection of such procedures in a dedicated dataset and install it as a subdataset into any dataset you want to use those procedures with. In case of a naming conflict with such a dataset hierarchy, the dataset you're calling run-procedures on will take precedence over its subdatasets and so on. π
Each configuration setting can occur multiple times to indicate multiple directories to be searched. If a procedure matching a given name is found (filename without a possible extension), the search is aborted and this implementation will be executed. This makes it possible for individual datasets, users, or machines to override externally provided procedures (enabling the implementation of customizable processing "hooks"). β¨
π οΈ Procedure implementation π οΈ
A procedure can be any executable. Executables must have the appropriate permissions and, in the case of a script, must contain an appropriate "shebang" line. If a procedure is not executable, but its filename ends with .py, it is automatically executed by the python interpreter (whichever version is available in the present environment). Likewise, procedure implementations ending on .sh are executed via bash. π
Procedures can implement any argument handling, but must be capable of taking at least one positional argument (the absolute path to the dataset they shall operate on). π
For further customization there are two configuration settings per procedure available:
datalad.procedures.<NAME>.call-formatβ fully customizable format string to determine how to execute procedure NAME (see alsodatalad-run). It currently requires to include the following placeholders:{script}: will be replaced by the path to the procedure{ds}: will be replaced by the absolute path to the dataset the procedure shall operate on{args}: (not actually required) will be replaced by all additional arguments passed into run-procedure after NAME
As an example the default format string for a call to a python script is: "python {script} {ds} {args}"
datalad.procedures.<NAME>.helpβ will be shown ondatalad run-procedure --help-proc NAMEto provide a description and/or usage info for procedure NAME
π Examples π
Find out which procedures are available on the current system:
% datalad run-procedure --discover
Run the 'yoda' procedure in the current dataset:
% datalad run-procedure cfg_yoda
π OPTIONS π
NAME [ARGS]β Name and possibly additional arguments of the to-be-executed procedure.[PY: Can also be a dictionary coming from run-procedure(discover=True).]Note, that all options to run-procedure need to be put before NAME, since all ARGS get assigned to NAME. π«Ά-h,--help,--help-npβ show this help message.--help-npforcefully disables the use of a pager for displaying the help message.-d PATH,--dataset PATHβ specify the dataset to run the procedure on. An attempt is made to identify the dataset based on the current working directory. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) or value must be NONE.--discoverβ if given, all configured paths are searched for procedures and one result record per discovered procedure is yielded, but no procedure is executed.--help-procβ if given, get a help message for procedure NAME from config settingdatalad.procedures.NAME.help.--versionβ show the module and its version which provides the command.
π AUTHORS π
datalad is developed by The DataLad Team and Contributors <team@datalad.org>. π
Okay bye bestie! This iconic page is from datalad run-procedure version 1.1.5, dated 2025-06-15, and the manual is datalad run-procedure(1). Stay slay and may your procedures always run on the first try. π
β¨π«Ά
π¦ where this page comes from
- debian trixie: datalad 1.1.5-2.1 Β· MIT
- ubuntu resolute: datalad 1.1.5-2.1 Β· MIT
- ubuntu stonking: datalad 1.1.5-2.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms