From 00ab133921f6bdf0ff301028de93bce51d0167e2 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 26 Feb 2024 09:28:32 +0300 Subject: [PATCH] generate.py: log after action I saw some advice once that we should log after the action completes instead of before. Let's at least be consistent. --- generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate.py b/generate.py index 6b454d4..18e334d 100755 --- a/generate.py +++ b/generate.py @@ -155,8 +155,8 @@ if __name__ == "__main__": # Get a random list of animal IDs. We will build a square grid using the # "across" parameter passed by the user. - logger.info(f"Generating random sample of {animals_df.shape[0]} animals...") animal_ids = animals_df["id"].sample(args.across * args.across) + logger.info(f"Generated random sample of {animals_df.shape[0]} animals...") # Slice those random animals from the dataframe animals_df_random = animals_df[animals_df["id"].isin(animal_ids)]