Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use download options #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path

from kghub_downloader.download_utils import download_from_yaml
from kghub_downloader.model import DownloadOptions
from koza.cli_utils import transform_source
import typer

Expand All @@ -24,10 +25,12 @@ def callback(version: bool = typer.Option(False, "--version", is_eager=True),
@app.command()
def download(force: bool = typer.Option(False, help="Force download of data, even if it exists")):
"""Download data for {{cookiecutter.project_name}}."""
typer.echo("Downloading data for {{cookiecutter.project_name}}...")
typer.echo("Downloading data for {{cookiecutter.project_name}}...")
download_config = Path(__file__).parent / "download.yaml"
download_from_yaml(yaml_file=download_config, output_dir=".", ignore_cache=force)

download_options = DownloadOptions(ignore_cache=force)
download_from_yaml(yaml_file=download_config,
output_dir=".",
download_options=download_options)

@app.command()
def transform(
Expand Down