Skip to content

Commit

Permalink
Update README and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Apr 15, 2021
1 parent 13f7c3b commit 14a396b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 45 deletions.
62 changes: 18 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,21 @@
# DataLad extension template
# DataLad extension for functionality that was phased out of the core package

[![Build status](https://ci.appveyor.com/api/projects/status/ulbsyym6ih102gm2/branch/master?svg=true)](https://ci.appveyor.com/project/mih/datalad-deprecated/branch/master) [![codecov.io](https://codecov.io/github/datalad/datalad-deprecated/coverage.svg?branch=master)](https://codecov.io/github/datalad/datalad-deprecated?branch=master) [![crippled-filesystems](https://github.com/datalad/datalad-deprecated/workflows/crippled-filesystems/badge.svg)](https://github.com/datalad/datalad-deprecated/actions?query=workflow%3Acrippled-filesystems) [![Documentation](https://readthedocs.org/projects/datalad-deprecated/badge/?version=latest)](http://docs.datalad.org/projects/deprecated/en/latest/?badge=latest)

This repository contains an extension template that can serve as a starting point
for implementing a [DataLad](http://datalad.org) 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](https://github.com/datalad/datalad-extension-template/generate), and
adjust as necessary. A good approach is to

- Pick a name for the new extension.
- Look through the sources and replace `datalad_helloworld` with
`datalad_<newname>` (hint: `git grep datalad_helloworld` should find all
spots).
- Delete the example command implementation in `datalad_helloworld/__init__.py`
by (re)moving the `HelloWorld` class.
- Implement a new command, and adjust the `command_suite` in
`datalad_helloworld/__init__.py` to point to it.
- Replace `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.
- Adjust the documentation in `docs/source/index.rst`.
- Replace this README.
- Update `setup.cfg` with appropriate metadata on the new extension.

You can consider filling in the provided [.zenodo.json](.zenodo.json) file with
contributor information and [meta data](https://developers.zenodo.org/#representation)
to acknowledge contributors and describe the publication record that is created when
[you make your code citeable](https://guides.github.com/activities/citable-code/)
by archiving it using [zenodo.org](https://zenodo.org/). You may also want to
consider acknowledging contributors with the
[allcontributors bot](https://allcontributors.org/docs/en/bot/overview).
Command(s) provided by this extension

- `ls` -- list summary information about URLs and datasets


In addition, this extension provides the `AutomagicIO` feature that patches Python's
`open()` function to automatically obtain file content, if needed.

It also provides the web user interface that is used at http://datasets.datalad.org


## Acknowledgements

This work was performed by a US-German collaboration in computational
neuroscience (CRCNS) co-funded by the US National Science Foundation (NSF
1429999) and the German Federal Ministry of Education and Research (BMBF
01GQ1411).
11 changes: 10 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,20 @@ Command line reference
generated/man/datalad-ls


Miscellaneous functionality
---------------------------

.. currentmodule:: datalad_deprecated
.. autosummary::
:toctree: generated

auto.AutomagicIO


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

.. |---| unicode:: U+02014 .. em dash

0 comments on commit 14a396b

Please sign in to comment.