Skip to content

Commit 05d8b74

Browse files
authored
Merge pull request #79 from datalad/doc-create
UX: Improve help and option name for create
2 parents 54aa9cb + 2cdaa56 commit 05d8b74

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

datalad_osf/create_sibling_osf.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ def _get_credentials():
7171
@build_doc
7272
class CreateSiblingOSF(Interface):
7373
"""Create a dataset representation at OSF
74+
75+
This will create a project on OSF and initialize
76+
an osf special remote to point to it. There are two modes
77+
this can operate in: 'annexstore' and 'exporttree'.
78+
The former uses the OSF project as a key-value store, that
79+
can be used to by git-annex to copy data to and retrieve
80+
data from (potentially by any clone of the original dataset).
81+
The latter allows to use 'git annex export' to publish a
82+
snapshot of a particular version of the dataset. Such an OSF
83+
project will - in opposition to the 'annexstore' - be
84+
human-readable.
7485
"""
7586

7687
result_renderer = 'tailored'
@@ -85,12 +96,12 @@ class CreateSiblingOSF(Interface):
8596
),
8697
title=Parameter(
8798
args=("title",),
88-
doc=""" """,
99+
doc="""Title of the to-be created OSF project.""",
89100
constraints=EnsureStr()
90101
),
91102
sibling=Parameter(
92-
args=("sibling",),
93-
doc="""""",
103+
args=("-s", "--name",),
104+
doc="""name of the to-be initialized osf-special-remote""",
94105
constraints=EnsureStr()
95106
),
96107
mode=Parameter(
@@ -103,7 +114,7 @@ class CreateSiblingOSF(Interface):
103114
@staticmethod
104115
@datasetmethod(name='create_sibling_osf')
105116
@eval_results
106-
def __call__(title, sibling, dataset=None, mode="annexstore"):
117+
def __call__(title, sibling="osf", dataset=None, mode="annexstore"):
107118
ds = require_dataset(dataset,
108119
purpose="create OSF remote",
109120
check_installed=True)

0 commit comments

Comments
 (0)