add option to not track
This commit is contained in:
parent
1264a09ed0
commit
b3256e0b7c
1 changed files with 6 additions and 0 deletions
|
|
@ -17,6 +17,8 @@ def get(path: str, file: str) -> None:
|
||||||
tracker = get_tracker(path)
|
tracker = get_tracker(path)
|
||||||
if tracker == 'datalad':
|
if tracker == 'datalad':
|
||||||
dl.get(path, file)
|
dl.get(path, file)
|
||||||
|
elif tracker == 'None':
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Tracker {tracker} is not supported.")
|
raise ValueError(f"Tracker {tracker} is not supported.")
|
||||||
return
|
return
|
||||||
|
|
@ -26,6 +28,8 @@ def save(path: str, message: str, files: Optional[list[str]]=None) -> None:
|
||||||
tracker = get_tracker(path)
|
tracker = get_tracker(path)
|
||||||
if tracker == 'datalad':
|
if tracker == 'datalad':
|
||||||
dl.save(path, message, files)
|
dl.save(path, message, files)
|
||||||
|
elif tracker == 'None':
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Tracker {tracker} is not supported.")
|
raise ValueError(f"Tracker {tracker} is not supported.")
|
||||||
|
|
||||||
|
|
@ -34,6 +38,8 @@ def init(path: str) -> None:
|
||||||
tracker = get_tracker(path)
|
tracker = get_tracker(path)
|
||||||
if tracker == 'datalad':
|
if tracker == 'datalad':
|
||||||
dl.create(path)
|
dl.create(path)
|
||||||
|
elif tracker == 'None':
|
||||||
|
os.path.makedirs(path, exist_ok=True)
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Tracker {tracker} is not supported.")
|
raise ValueError(f"Tracker {tracker} is not supported.")
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue