Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
Rename to datalad-revolution
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Oct 2, 2018
1 parent 8da041a commit 3f229de
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
26 changes: 26 additions & 0 deletions .gitignore
@@ -0,0 +1,26 @@
.pybuild/
datalad.build/
/.idea
.coverage
/venv*
/cfgs
/dist
/fixtures
/diagrams
/build
/docs/build
/docs/source/generated
/docs/source/_extras/schema.json
/.tox
/repos
tmp
.noseids
*.egg-info
*.py[coe]
*.bak
.#*
.orig
.rej
.*.swp
.travis.yml.evil-bd
.asv
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -23,8 +23,8 @@ env:
- COVERAGE=coverage
- DATALAD_DATASETS_TOPURL=http://datasets-tests.datalad.org
matrix:
- DATALAD_REPO_DIRECT=yes
- DATALAD_REPO_VERSION=5
- DATALAD_REPO_VERSION=6


before_install:
Expand Down Expand Up @@ -58,7 +58,7 @@ script:
$NOSE_WRAPPER `which nosetests` $NOSE_OPTS
-v -A "$NOSE_SELECTION_OP(integration or usecase or slow)"
--with-doctest
--with-cov --cover-package datalad_helloworld
--with-cov --cover-package datalad_revolution
--logging-level=INFO
$TESTS_TO_PERFORM
#- if [ ! "${DATALAD_LOG_LEVEL:-}" = 2 ]; then
Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,6 +1,6 @@
# DataLad extension template

[![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)
[![Travis tests status](https://secure.travis-ci.org/datalad/datalad-revolution.png?branch=master)](https://travis-ci.org/datalad/datalad-revolution) [![codecov.io](https://codecov.io/github/datalad/datalad-revolution/coverage.svg?branch=master)](https://codecov.io/github/datalad/datalad-revolution?branch=master)

This repository contains an extension template that can serve as a starting point
for implementing a [DataLad](http://datalad.org) extension. An extension can
Expand All @@ -21,5 +21,5 @@ DataLad will now expose a new command suite with `hello...` commands.

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
[__init__.py](datalad_revolution/__init__.py) illustrate the purpose of the various
aspects of a command implementation and the setup of an extension package.
Expand Up @@ -19,18 +19,18 @@
# to be found by datalad
command_suite = (
# description of the command suite, displayed in cmdline help
"Demo DataLad command suite",
"DataLad revolutionary command suite",
[
# specification of a command, any number of commands can be defined
(
# importable module that contains the command implementation
'datalad_helloworld',
'datalad_revolution',
# name of the command class implementation in above module
'HelloWorld',
'RevolutionCommand',
# optional name of the command in the cmdline API
'hello-cmd',
'rev-cmd',
# optional name of the command in the Python API
'hello_py'
'rev_cmd'
),
]
)
Expand All @@ -39,7 +39,7 @@
# decoration auto-generates standard help
@build_doc
# all commands must be derived from Interface
class HelloWorld(Interface):
class RevolutionCommand(Interface):
# first docstring line is used a short description in the cmdline help
# the rest is put in the verbose help and manpage
"""Short description of the command
Expand All @@ -62,14 +62,14 @@ class HelloWorld(Interface):

@staticmethod
# decorator binds the command to the Dataset class as a method
@datasetmethod(name='hello')
@datasetmethod(name='rev_hello')
# generic handling of command results (logging, rendering, filtering, ...)
@eval_results
# signature must match parameter list above
# additional generic arguments are added by decorators
def __call__(language='en'):
if language == 'en':
msg = 'Hello!'
msg = 'Revolution!'
elif language == 'de':
msg = 'Tachchen!'
else:
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Expand Up @@ -5,7 +5,7 @@

setup(
# basic project properties can be set arbitrarily
name="datalad_helloworld",
name="datalad_revolution",
author="The DataLad Team and Contributors",
author_email="team@datalad.org",
version='0.1',
Expand All @@ -16,15 +16,15 @@
# in general datalad will be a requirement, unless the datalad extension
# aspect is an optional component of a larger project
# disable for now as we currently need a Git snapshot (requirements.txt)
#'datalad',
'datalad',
],
entry_points = {
# '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 extensions
'helloworld=datalad_helloworld:command_suite',
'revolution=datalad_revolution:command_suite',
]
},
)

0 comments on commit 3f229de

Please sign in to comment.