Compare commits
No commits in common. "30dba29426f6b7b32f0cb7e46e74895339f2f267" and "0d01df1ca47c3c5c15f4542381187d6e00351842" have entirely different histories.
30dba29426
...
0d01df1ca4
2 changed files with 3 additions and 4 deletions
|
|
@ -3,7 +3,6 @@ import sqlite3
|
||||||
import os
|
import os
|
||||||
from .tracker import save, init
|
from .tracker import save, init
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from .tools import CONFIG_FILENAME
|
|
||||||
|
|
||||||
|
|
||||||
def _create_db(db: Path) -> None:
|
def _create_db(db: Path) -> None:
|
||||||
|
|
@ -88,7 +87,7 @@ def _write_config(path: Path, config: ConfigParser) -> None:
|
||||||
config: ConfigParser
|
config: ConfigParser
|
||||||
The configuration to be used as a ConfigParser, e.g. generated by _create_config.
|
The configuration to be used as a ConfigParser, e.g. generated by _create_config.
|
||||||
"""
|
"""
|
||||||
with open(os.path.join(path, CONFIG_FILENAME), 'w') as configfile:
|
with open(os.path.join(path, '.corrlib'), 'w') as configfile:
|
||||||
config.write(configfile)
|
config.write(configfile)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ from configparser import ConfigParser
|
||||||
import datalad.api as dl
|
import datalad.api as dl
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
import shutil
|
import shutil
|
||||||
from .tools import get_db_file, CONFIG_FILENAME
|
from .tools import get_db_file
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ def get_tracker(path: Path) -> str:
|
||||||
tracker: str
|
tracker: str
|
||||||
The tracker used in the dataset.
|
The tracker used in the dataset.
|
||||||
"""
|
"""
|
||||||
config_path = os.path.join(path, CONFIG_FILENAME)
|
config_path = os.path.join(path, '.corrlib')
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
if os.path.exists(config_path):
|
if os.path.exists(config_path):
|
||||||
config.read(config_path)
|
config.read(config_path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue