Skip to content

Commit

Permalink
qs
Browse files Browse the repository at this point in the history
  • Loading branch information
lostmygithubaccount committed Aug 16, 2024
1 parent 5e6d213 commit a443468
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/icarus/catalog.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# imports
import os
import ibis

Expand Down
11 changes: 9 additions & 2 deletions src/icarus/cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# imports
import os
import typer
import subprocess
Expand All @@ -15,18 +16,21 @@
gen_social_media_batch,
)

# typer settings
TYPER_KWARGS = {
"no_args_is_help": True,
"add_completion": False,
"context_settings": {"help_option_names": ["-h", "--help"]},
}

# typer apps
app = typer.Typer(help="Icarus", **TYPER_KWARGS)
clean_app = typer.Typer(help="Clean the data lake.", **TYPER_KWARGS)

## add subcommands
# add subcommands
app.add_typer(clean_app, name="clean")

## add subcommand aliases
# add subcommand aliases
app.add_typer(clean_app, name="c", hidden=True)


Expand All @@ -50,6 +54,7 @@ def check_data_lake_exists() -> bool:
return True


# commands
@app.command()
def gen():
"""Generate synthetic data."""
Expand Down Expand Up @@ -80,13 +85,15 @@ def run(
return

# run the ETL job
typer.echo("running ETL job...")
run_main()


@app.command("app")
def main_app():
"""Open the app."""
cmd = "shiny run -b apps/main.py"
typer.echo(f"running: {cmd}...")
subprocess.call(cmd, shell=True)


Expand Down
1 change: 1 addition & 0 deletions src/icarus/investments/extract.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# imports
import os
import ibis

Expand Down
1 change: 1 addition & 0 deletions src/icarus/investments/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
)


# functions
def main():
# instantiate catalog
catalog = Catalog()
Expand Down
1 change: 1 addition & 0 deletions src/icarus/investments/transform.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# imports
import ibis
import ibis.selectors as s

Expand Down
2 changes: 1 addition & 1 deletion website/onboarding.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ And activate the virtual environment:
. .venv/bin/activate
```

Then the `icarus` CLI is available. Use it to generate data and run stuff.
The `icarus` CLI is now available.

## Generating synthetic data

Expand Down

0 comments on commit a443468

Please sign in to comment.