Skip to content

Commit

Permalink
min_deps_check: show age of required pkg on error (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathause committed May 17, 2024
1 parent a6b0552 commit 2161e2c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ci/min_deps_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def process_pkg(
- publication date of version suggested by policy (YYYY-MM-DD)
- status ("<", "=", "> (!)")
"""
print("Analyzing %s..." % pkg)
print(f"Analyzing {pkg}...")
versions = query_conda(pkg)

try:
Expand Down Expand Up @@ -163,11 +163,11 @@ def process_pkg(
status = "<"
elif (req_major, req_minor) > (policy_major, policy_minor):
status = "> (!)"
delta = relativedelta(datetime.now(), policy_published_actual).normalized()
delta = relativedelta(datetime.now(), req_published).normalized()
n_months = delta.years * 12 + delta.months
warning(
f"Package is too new: {pkg}={policy_major}.{policy_minor} was "
f"published on {versions[policy_major, policy_minor]:%Y-%m-%d} "
f"Package is too new: {pkg}={req_major}.{req_minor} was "
f"published on {req_published:%Y-%m-%d} "
f"which was {n_months} months ago (policy is {policy_months} months)"
)
else:
Expand Down

0 comments on commit 2161e2c

Please sign in to comment.