refactor/data_backend #12

Merged
jkuhl merged 36 commits from refactor/data_backend into develop 2025-12-04 15:47:45 +01:00
2 changed files with 4 additions and 5 deletions
Showing only changes of commit 821bc14f4b - Show all commits

avoid looking for a tracker before config exists
Some checks failed
Ruff / ruff (push) Waiting to run
Mypy / mypy (push) Failing after 1m8s
Pytest / pytest (3.12) (push) Successful in 49s
Pytest / pytest (3.13) (push) Has been cancelled
Pytest / pytest (3.14) (push) Has been cancelled

Justus Kuhlmann 2025-12-04 12:36:41 +01:00
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6

View file

@ -57,14 +57,14 @@ def _create_config(path: str) -> None:
return
def create(path: str) -> None:
def create(path: str, tracker = 'datalad') -> None:
"""
Create folder of backlogs.
"""
init(path)
init(path, tracker)
_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)
_create_config(path)
os.makedirs(os.path.join(path, 'projects'))
os.makedirs(os.path.join(path, 'archive'))

View file

@ -36,8 +36,7 @@ def save(path: str, message: str, files: Optional[list[str]]=None) -> None:
raise ValueError(f"Tracker {tracker} is not supported.")
def init(path: str) -> None:
tracker = get_tracker(path)
def init(path: str, tracker: str='datalad') -> None:
if tracker == 'datalad':
dl.create(path)
elif tracker == 'None':