123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- # each item is a command that is allowed in the API
- # the key is the command name in the Python API.
- # the values are dicts with the following keys
- # - exclude_parameters: set with parameter names to
- # exclude from the API
- api = dict(
- clone=dict(
- name='&Clone a dataset',
- exclude_parameters=set((
- 'git_clone_opts',
- 'reckless',
- 'description',
- )),
- parameter_display_names=dict(
- source='Clone from',
- path='Clone into',
- dataset='Register in superdataset',
- ),
- parameter_order=dict(
- source=0,
- path=1,
- dataset=2,
- ),
- ),
- create=dict(
- name='C&reate a dataset',
- exclude_parameters=set((
- 'initopts',
- 'description',
- 'fake_dates',
- )),
- parameter_display_names=dict(
- force='OK if target directory not empty',
- path='Create at',
- dataset='Register in superdataset',
- ),
- parameter_order=dict(
- path=0,
- annex=1,
- dataset=2,
- ),
- ),
- create_sibling_gitlab=dict(
- name='Create a Git&Lab sibling',
- exclude_parameters=set((
- 'dryrun',
- )),
- ),
- create_sibling_gin=dict(
- name='Create a GI&N sibling',
- ),
- create_sibling_github=dict(
- name='Create a Git&Hub sibling',
- exclude_parameters=set((
- 'dryrun',
- )),
- ),
- create_sibling_webdav=dict(
- name='Create a &WebDAV sibling',
- ),
- drop=dict(
- name='Dr&op dataset content',
- exclude_parameters=set((
- 'check',
- 'if_dirty',
- 'reckless',
- )),
- ),
- get=dict(
- name='&Get dataset content',
- exclude_parameters=set((
- 'description',
- 'reckless',
- )),
- ),
- push=dict(
- name='&Push data/updates to a sibling',
- exclude_parameters=set((
- 'since',
- )),
- ),
- save=dict(
- name='&Save the state in a dataset',
- exclude_parameters=set((
- 'updated',
- 'message_file',
- )),
- parameter_display_names=dict(
- dataset='Save changes in dataset at',
- message='Description of change',
- path='Only save',
- recursive='Include changes in subdatasets',
- to_git='Do not put files in annex',
- version_tag='Tag for saved dataset state',
- amend='Amend last saved state',
- ),
- parameter_order=dict(
- dataset=0,
- message=1,
- path=2,
- recursive=3,
- to_git=4,
- version_tag=5,
- amend=6,
- ),
- ),
- update=dict(
- name='&Update from a sibling',
- exclude_parameters=set((
- 'merge',
- 'fetch_all',
- 'how_subds',
- 'follow',
- 'reobtain_data',
- )),
- ),
- )
- exclude_parameters = set((
- 'result_renderer',
- 'return_type',
- 'result_filter',
- 'result_xfm',
- 'on_failure',
- 'jobs',
- 'recursion_limit',
- ))
- parameter_display_names = dict(
- annex='Dataset with file annex',
- cfg_proc='Configuration procedure(s)',
- dataset='Dataset location',
- )
- dataset_api = {
- c: s for c, s in api.items()
- if c in (
- 'clone', 'create', 'create_sibling_gitlab', 'create_sibling_gin',
- 'create_sibling_github', 'drop', 'get', 'push', 'save', 'update'
- )
- }
- directory_api = {
- c: s for c, s in api.items() if c in ('clone', 'create')
- }
- directory_in_ds_api = {
- c: s for c, s in api.items()
- if c in ('clone', 'create', 'drop', 'get', 'push', 'save')
- }
- file_api = None
- file_in_ds_api = {
- c: s for c, s in api.items() if c in ('save', 'get', 'drop')
- }
- annexed_file_api = {
- c: s for c, s in api.items()
- if c in ('drop', 'get', 'push', 'save')
- }
- # simplified API has no groups
- api_group_order = {}
|