refactor/data_backend #12
3 changed files with 15 additions and 1 deletions
add thin create wrapper
commit
7240d29b46
|
|
@ -63,7 +63,7 @@ def create(path: str) -> None:
|
|||
Create folder of backlogs.
|
||||
|
||||
"""
|
||||
dl.create(path)
|
||||
create(path)
|
||||
_create_db(os.path.join(path, 'backlogger.db'))
|
||||
os.chmod(os.path.join(path, 'backlogger.db'), 0o666) # why does this not work?
|
||||
_create_config(path)
|
||||
|
|
|
|||
|
|
@ -27,3 +27,12 @@ def save(path: str, message: str, files: list[str]) -> None:
|
|||
dl.save(files, message=message, dataset=path)
|
||||
else:
|
||||
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]
|
||||
dl.save(files, message=message, dataset=path)
|
||||
return
|
||||
|
||||
|
||||
def create(path):
|
||||
dl.create(path)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue