From 07173e499917764728227046587ccec49062d06c Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Thu, 4 Dec 2025 12:04:46 +0100 Subject: [PATCH 1/2] make file arg optional --- corrlib/tracker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/corrlib/tracker.py b/corrlib/tracker.py index f513b56..e6e9c04 100644 --- a/corrlib/tracker.py +++ b/corrlib/tracker.py @@ -1,6 +1,7 @@ import os from configparser import ConfigParser from .trackers import datalad as dl +from typing import Optional def get_tracker(path: str) -> str: @@ -21,7 +22,7 @@ def get(path: str, file: str) -> None: return -def save(path: str, message: str, files: list[str]) -> None: +def save(path: str, message: str, files: Optional[list[str]]=None) -> None: tracker = get_tracker(path) if tracker == 'datalad': dl.save(path, message, files) From b0ef8c3fc0b84670b0ab3d5ed8e80fe063b231ad Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Thu, 4 Dec 2025 12:05:17 +0100 Subject: [PATCH 2/2] use init, not create --- corrlib/initialization.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/corrlib/initialization.py b/corrlib/initialization.py index 76b062f..e3a078e 100644 --- a/corrlib/initialization.py +++ b/corrlib/initialization.py @@ -1,6 +1,5 @@ from configparser import ConfigParser import sqlite3 -import datalad.api as dl import os from .tracker import save, init @@ -63,7 +62,7 @@ def create(path: str) -> None: Create folder of backlogs. """ - create(path) + init(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)