refactor/data_backend #12
2 changed files with 3 additions and 3 deletions
commit
59519eae3b
|
|
@ -2,7 +2,7 @@ from configparser import ConfigParser
|
|||
import sqlite3
|
||||
import datalad.api as dl
|
||||
import os
|
||||
from .tracker import save
|
||||
from .tracker import save, init
|
||||
|
||||
|
||||
def _create_db(db: str) -> None:
|
||||
|
|
@ -74,5 +74,5 @@ def create(path: str) -> None:
|
|||
with open(os.path.join(path, ".gitignore"), "w") as fp:
|
||||
fp.write(".cache")
|
||||
fp.close()
|
||||
save(path, message="Initialized correlator library", dataset=path)
|
||||
save(path, message="Initialized correlator library")
|
||||
return
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ def save(path: str, message: str, files: list[str]) -> None:
|
|||
raise ValueError(f"Tracker {tracker} is not supported.")
|
||||
|
||||
|
||||
def create(path: str) -> None:
|
||||
def init(path: str) -> None:
|
||||
tracker = get_tracker(path)
|
||||
if tracker == 'datalad':
|
||||
dl.create(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue