start refactor for data backend by only improting datalad into one submodule

This commit is contained in:
Justus Kuhlmann 2025-11-28 16:13:53 +01:00
commit 44ab402c6c
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6
3 changed files with 20 additions and 9 deletions

View file

@ -0,0 +1,7 @@
import .datalad as dl
class DataBackend:
@abstractmethod
def get_file(self, data, file):
pass

View file

@ -0,0 +1,13 @@
import datalad.api as dl
import os
from corrlib.data_backend.databackend import
def DLBackend()
def get_file(path, file):
if file == "backlogger.db":
print("Downloading database...")
else:
print("Downloading data...")
dl.get(os.path.join(path, file), dataset=path)
print("> downloaded file")

View file

@ -17,13 +17,4 @@ def m2k(m):
def k2m(k):
return (1/(2*k))-4
def get_file(path, file):
if file == "backlogger.db":
print("Downloading database...")
else:
print("Downloading data...")
dl.get(os.path.join(path, file), dataset=path)
print("> downloaded file")