From 551169fa307bbc0ca1cf219adac3923b8e3bb470 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 17 Nov 2023 18:19:47 -0600 Subject: [PATCH] Clean up script. --- ci/check_conda_nightly_env.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/check_conda_nightly_env.py b/ci/check_conda_nightly_env.py index c887af15..9030a8a8 100644 --- a/ci/check_conda_nightly_env.py +++ b/ci/check_conda_nightly_env.py @@ -13,9 +13,7 @@ def is_rapids_nightly_package(package_info): def get_package_date(package): - date_re = re.compile(r"(2\d{5})") - - # 2\d{5} matches 6 digits starting with "2" + # Matches 6 digits starting with "2", which should be YYMMDD date_re = r"_(2\d{5})_" # Use regex to find the date string in the input @@ -65,7 +63,8 @@ def check_env(json_path): for package in rapids_package_data } - old_threshold = datetime.now() - timedelta(days=OLD_PACKAGE_THRESHOLD_DAYS) + today = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0) + old_threshold = today - timedelta(days=OLD_PACKAGE_THRESHOLD_DAYS) old_packages = { package: date for package, date in rapids_package_dates.items()