add thin create wrapper
This commit is contained in:
parent
28ea48ad66
commit
7240d29b46
3 changed files with 15 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ def create(path: str) -> None:
|
||||||
Create folder of backlogs.
|
Create folder of backlogs.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
dl.create(path)
|
create(path)
|
||||||
_create_db(os.path.join(path, 'backlogger.db'))
|
_create_db(os.path.join(path, 'backlogger.db'))
|
||||||
os.chmod(os.path.join(path, 'backlogger.db'), 0o666) # why does this not work?
|
os.chmod(os.path.join(path, 'backlogger.db'), 0o666) # why does this not work?
|
||||||
_create_config(path)
|
_create_config(path)
|
||||||
|
|
|
||||||
|
|
@ -27,3 +27,12 @@ def save(path: str, message: str, files: list[str]) -> None:
|
||||||
dl.save(files, message=message, dataset=path)
|
dl.save(files, message=message, dataset=path)
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Tracker {tracker} is not supported.")
|
raise ValueError(f"Tracker {tracker} is not supported.")
|
||||||
|
|
||||||
|
|
||||||
|
def create(path: str) -> None:
|
||||||
|
tracker = get_tracker(path)
|
||||||
|
if tracker == 'datalad':
|
||||||
|
dl.create(path)
|
||||||
|
else:
|
||||||
|
raise ValueError(f"Tracker {tracker} is not supported.")
|
||||||
|
return
|
||||||
|
|
|
||||||
|
|
@ -18,3 +18,8 @@ def save(path, message, files= None):
|
||||||
files = [os.path.join(path, f) for f in files]
|
files = [os.path.join(path, f) for f in files]
|
||||||
dl.save(files, message=message, dataset=path)
|
dl.save(files, message=message, dataset=path)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
def create(path):
|
||||||
|
dl.create(path)
|
||||||
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue