diff --git a/antarctica_today/__main__.py b/antarctica_today/__main__.py index 4521a20..b184fe2 100644 --- a/antarctica_today/__main__.py +++ b/antarctica_today/__main__.py @@ -22,7 +22,7 @@ def cli(): @cli.group() def init(): - """Initialize the Antarctica Today database.""" + """Initialize the Antarctica Today database and generate all plots.""" pass @@ -59,12 +59,20 @@ def preprocess(): logger.success("Preprocess complete.") +@init.command("04-all-plots") +def all_plots(): + """Generate all Antarctica Today plot images from the database.""" + generate_all_plots_and_maps_main() + logger.success("All plots generated.") + + @init.command("all") def init_all(): - """Initialize the Antarctica Today database.""" + """Initialize the Antarctica Today database and generate all plots.""" download_new_files() generate_new_daily_melt_files(overwrite=False) preprocessing_main() + generate_all_plots_and_maps_main() logger.success("Antarctica Today database initialized.") @@ -88,12 +96,5 @@ def daily_update_and_plots(): logger.success("Database updated to the current date. New plots produced.") -@cli.command() -def all_plots(): - """Generate all Antarctica Today plot images from the database.""" - generate_all_plots_and_maps_main() - logger.success("All plots generated.") - - if __name__ == "__main__": cli() diff --git a/doc/operation.md b/doc/operation.md index dd94050..6adc551 100644 --- a/doc/operation.md +++ b/doc/operation.md @@ -47,7 +47,6 @@ These steps will use Docker, as we expect that to be the main operation mode. Se ```bash docker compose run cli init all -docker compose run cli plots ``` @@ -188,7 +187,7 @@ This will go through the entire database and produce summary maps and plots for ```bash PYTHONPATH=. -python antarctica_today plots +python antarctica_today init plots ```
🛠️ _TODO_