This repository contains an extension template that can serve as a starting point for implementing a DataLad extension. An extension can provide any number of additional DataLad commands that are automatically included in DataLad's command line and Python API.
For a demo, clone this repository and install the demo extension via
pip install -e .
DataLad will now expose a new command suite with a hello...
command.
% datalad --help |grep -B2 -A2 hello
*Demo DataLad command suite*
hello-cmd
Short description of the command
To start implementing your own extension, use this template, and adjust as necessary. A good approach is to
datalad_helloworld
with
datalad_<newname>
(hint: git grep datalad_helloworld
should find all
spots).datalad_helloworld/__init__.py
by (re)moving the HelloWorld
class.command_suite
in
datalad_helloworld/__init__.py
to point to it.hello_cmd
with the name of the new command in
datalad_helloworld/tests/test_register.py
to automatically test whether the
new extension installs correctly.docs/source/index.rst
.setup.cfg
with appropriate metadata on the new extension.You can consider filling in the provided .zenodo.json file with contributor information and meta data to acknowledge contributors and describe the publication record that is created when you make your code citeable by archiving it using zenodo.org. You may also want to consider acknowledging contributors with the allcontributors bot.