Skip to content

Commit

Permalink
RF: Extension naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Apr 6, 2018
1 parent c971b18 commit 8da041a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions README.md
@@ -1,13 +1,13 @@
# DataLad extension module template
# DataLad extension template

[![Travis tests status](https://secure.travis-ci.org/datalad/datalad-module-template.png?branch=master)](https://travis-ci.org/datalad/datalad-module-template) [![codecov.io](https://codecov.io/github/datalad/datalad-module-template/coverage.svg?branch=master)](https://codecov.io/github/datalad/datalad-module-template?branch=master)
[![Travis tests status](https://secure.travis-ci.org/datalad/datalad-extension-template.png?branch=master)](https://travis-ci.org/datalad/datalad-extension-template) [![codecov.io](https://codecov.io/github/datalad/datalad-extension-template/coverage.svg?branch=master)](https://codecov.io/github/datalad/datalad-extension-template?branch=master)

This repository contains a module template that can serve as a starting point
for implementing a [DataLad](http://datalad.org) extension. A module can
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 module via
For a demo, clone this repository and install the demo extension via

pip install -e .

Expand All @@ -19,7 +19,7 @@ DataLad will now expose a new command suite with `hello...` commands.
hello-cmd
Short description of the command

To start implementing your own extension module, fork this project and adjust
To start implementing your own extension, fork this project and adjust
as necessary. The comments in [setup.py](setup.py) and
[__init__.py](datalad_helloworld/__init__.py) illustrate the purpose of the various
aspects of a command implementation and the setup of an extension package.
4 changes: 2 additions & 2 deletions datalad_helloworld/__init__.py
@@ -1,4 +1,4 @@
"""DataLad demo module"""
"""DataLad demo extension"""

__docformat__ = 'restructuredtext'

Expand All @@ -17,7 +17,7 @@
# defines a datalad command suite
# this symbold must be indentified as a setuptools entrypoint
# to be found by datalad
module_suite = (
command_suite = (
# description of the command suite, displayed in cmdline help
"Demo DataLad command suite",
[
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Expand Up @@ -9,7 +9,7 @@
author="The DataLad Team and Contributors",
author_email="team@datalad.org",
version='0.1',
description="demo DataLad module package",
description="demo DataLad extension package",
packages=[pkg for pkg in find_packages('.') if pkg.startswith('datalad')],
# datalad command suite specs from here
install_requires=[
Expand All @@ -19,12 +19,12 @@
#'datalad',
],
entry_points = {
# 'datalad.modules' is THE entrypoint inspected by the datalad API builders
'datalad.modules': [
# 'datalad.extensions' is THE entrypoint inspected by the datalad API builders
'datalad.extensions': [
# the label in front of '=' is the command suite label
# the entrypoint can point to any symbol of any name, as long it is
# valid datalad interface specification (see demo in this module)
'helloworld=datalad_helloworld:module_suite',
# valid datalad interface specification (see demo in this extensions
'helloworld=datalad_helloworld:command_suite',
]
},
)

0 comments on commit 8da041a

Please sign in to comment.