Commit f95466d9 authored by Christophe Benz's avatar Christophe Benz
Browse files

Make code testable

parent 57bc453f
......@@ -46,6 +46,32 @@ def cli(
max_commits: Optional[int] = None,
verbose: bool = typer.Option(os.getenv("VERBOSE"), "--verbose", "-v"),
doltpy_log_level: str = typer.Option(os.getenv("DOLTPY_LOG_LEVEL", "INFO")),
):
import_json_data(
git_repo_dir,
csv_target_dir,
dolt_repo_dir,
datasets,
delete_first,
rev,
from_rev,
max_commits,
verbose,
doltpy_log_level,
)
def import_json_data(
git_repo_dir: Path,
csv_target_dir: Optional[Path] = None,
dolt_repo_dir: Optional[Path] = None,
datasets: list[str] = [],
delete_first: bool = False,
rev: str = "HEAD",
from_rev: Optional[str] = None,
max_commits: Optional[int] = None,
verbose: bool = False,
doltpy_log_level: str = "INFO",
):
daiquiri.setup()
logging.getLogger("import_json_data").setLevel(logging.DEBUG if verbose else logging.INFO)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment