-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tweak ingest.run, outward api * move ingest staging dir to more sensible place * move ingest outputs to local filesystem * add ability to override source with local file * simplify archive_dataset
- Loading branch information
1 parent
790636e
commit 38b10fd
Showing
10 changed files
with
146 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from pathlib import Path | ||
import typer | ||
|
||
from .run import ingest | ||
|
||
app = typer.Typer(add_completion=False) | ||
|
||
|
||
@app.command("ingest") | ||
def _cli_wrapper_run( | ||
dataset_id: str = typer.Argument(), | ||
version: str = typer.Option( | ||
None, | ||
"-v", | ||
"--version", | ||
help="Version of dataset being archived", | ||
), | ||
mode: str = typer.Option(None, "-m", "--mode", help="Preprocessing mode"), | ||
latest: bool = typer.Option( | ||
False, "-l", "--latest", help="Push to latest folder in s3" | ||
), | ||
skip_archival: bool = typer.Option(False, "--skip-archival", "-s"), | ||
csv: bool = typer.Option( | ||
False, "-c", "--csv", help="Output csv locally as well as parquet" | ||
), | ||
local_file_path: Path = typer.Option( | ||
None, | ||
"--local-file-path", | ||
"-p", | ||
help="Use local file path as source, overriding source in template", | ||
), | ||
): | ||
ingest( | ||
dataset_id, | ||
version, | ||
mode=mode, | ||
latest=latest, | ||
skip_archival=skip_archival, | ||
output_csv=csv, | ||
local_file_path=local_file_path, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.