Compare commits
No commits in common. "3b64d8457b7f92daf3ba788e0c99b56fe8d6b08c" and "641c612a593aab58739be89ec1a21128410acd06" have entirely different histories.
3b64d8457b
...
641c612a59
4 changed files with 21 additions and 1 deletions
7
corrlib/data_backend/databackend.py
Normal file
7
corrlib/data_backend/databackend.py
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
import .datalad as dl
|
||||||
|
|
||||||
|
|
||||||
|
class DataBackend:
|
||||||
|
@abstractmethod
|
||||||
|
def get_file(self, data, file):
|
||||||
|
pass
|
||||||
13
corrlib/data_backend/datalad.py
Normal file
13
corrlib/data_backend/datalad.py
Normal 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")
|
||||||
|
|
@ -2,7 +2,7 @@ from configparser import ConfigParser
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import datalad.api as dl
|
import datalad.api as dl
|
||||||
import os
|
import os
|
||||||
import .tracker as tr
|
import tracker as tr
|
||||||
|
|
||||||
|
|
||||||
def _create_db(db: str) -> None:
|
def _create_db(db: str) -> None:
|
||||||
|
|
|
||||||
0
tests/test_import_project.py
Normal file
0
tests/test_import_project.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue