add thin create wrapper

This commit is contained in:
Justus Kuhlmann 2025-12-04 11:40:50 +01:00
commit 7240d29b46
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6
3 changed files with 15 additions and 1 deletions

View file

@ -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)

View file

@ -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

View file

@ -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