From 8da041aaf1c1c20205f788b87d02d675115adebb Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Fri, 6 Apr 2018 11:20:12 +0200 Subject: [PATCH] RF: Extension naming conventions --- README.md | 12 ++++++------ datalad_helloworld/__init__.py | 4 ++-- setup.py | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 471c3b5..313c8f9 100644 --- a/README.md +++ b/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 . @@ -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. diff --git a/datalad_helloworld/__init__.py b/datalad_helloworld/__init__.py index 01dd9ef..b86c6a3 100644 --- a/datalad_helloworld/__init__.py +++ b/datalad_helloworld/__init__.py @@ -1,4 +1,4 @@ -"""DataLad demo module""" +"""DataLad demo extension""" __docformat__ = 'restructuredtext' @@ -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", [ diff --git a/setup.py b/setup.py index 503ada6..f407e9b 100755 --- a/setup.py +++ b/setup.py @@ -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=[ @@ -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', ] }, )