Skip to content

Commit

Permalink
Merge pull request #68 from datakind/chore/doc-updates
Browse files Browse the repository at this point in the history
Chore/doc updates
  • Loading branch information
dividor authored Jul 11, 2024
2 parents 804b463 + b90660b commit fc4c73c
Show file tree
Hide file tree
Showing 3 changed files with 1,444 additions and 1,453 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,15 @@ Once you have put your files in the above folders, you can update your assistant
### Analysis on Ingested Data
By default, the repo comes with some demo HAPI data. To run the ingestion module for ingested datasets yourself, so assistants and plugins can analysis data on-the-fly as an experimental feature:
By default, the repo comes with some demo HAPI data. To run the ingestion module for ingested datasets yourself ...
1. `docker exec -it haa-ingestion /bin/bash`
2. `python3 ingest.py`
`docker compose exec ingestion python ingest.py`
It may take a while!
Note: By default, rerunning the ingestion will not download data if the file already exists locally. To override this, you can run with ...
`python3 ingest.py --force_download`
`docker compose exec ingestion python ingest.py --force_download`
#### Running ingestion without running full environment
Expand Down
2,867 changes: 1,428 additions & 1,439 deletions db/recipedb/4-demo-data-recipes.sql

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions management/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
to_be_deleted_file = "work/checked_out/to_be_deleted.txt"
cli_config_file = ".cli_config"
checked_out_dir = "work/checked_out"
env_cmd = "docker exec recipes-ai-manager python "
env_cmd = "python "

environment = Environment(loader=FileSystemLoader("../templates/"))

Expand All @@ -72,15 +72,16 @@ def _get_checkout_folders():
else:

# list directory in chronological orger
checked_out_folders = sorted(
os.listdir(checked_out_dir),
key=lambda x: os.path.getctime(os.path.join(checked_out_dir, x)),
)
checked_out_folders = [
folder
for folder in checked_out_folders
if os.path.isdir(os.path.join(checked_out_dir, folder))
]
# checked_out_folders = sorted(
# os.listdir(checked_out_dir),
# key=lambda x: os.path.getctime(os.path.join(checked_out_dir, x)),
# )
# checked_out_folders = [
# folder
# for folder in checked_out_folders
# if os.path.isdir(os.path.join(checked_out_dir, folder))
# ]
checked_out_folders = os.listdir(checked_out_dir)
count = 0
for folder in checked_out_folders:
recipes[count] = folder
Expand Down Expand Up @@ -206,6 +207,8 @@ def run(recipe_index: Optional[int] = typer.Argument(None)):
cmd = f"{env_cmd} recipe_sync.py --run_recipe --recipe_path work/checked_out/{recipe}/recipe.py"
typer.echo(f"Running recipe {recipe} ...\n\n")
os.system(cmd)
typer.echo("\n\n ========== DONE ==========\n\n")
typer.echo(f"Now check folder './work/checked_out/{recipe}' for the output\n\n")


def edit(recipe_index: Optional[int] = typer.Argument(None)):
Expand Down

0 comments on commit fc4c73c

Please sign in to comment.