Skip to content

Commit

Permalink
Fix min_deps_check; revert to support numpy=1.14 and pandas=0.24
Browse files Browse the repository at this point in the history
Fixes the issue noticed in:
pydata#4175 (comment)
  • Loading branch information
shoyer committed Jun 25, 2020
1 parent 5121d86 commit 1ba2401
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
21 changes: 11 additions & 10 deletions ci/min_deps_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,22 @@ def process_pkg(
policy_months = POLICY_MONTHS.get(pkg, POLICY_MONTHS_DEFAULT)
policy_published = datetime.now() - timedelta(days=policy_months * 30)

policy_major = req_major
policy_minor = req_minor
policy_published_actual = req_published
for (major, minor), published in reversed(sorted(versions.items())):
if published < policy_published:
break
policy_major = major
policy_minor = minor
policy_published_actual = published
policy_versions = {
version: date for version, date in versions.items() if date < policy_published
}
version_and_date = lambda version: (version, policy_versions[version])
policy_major, policy_minor = max(policy_versions, key=version_and_date)
policy_published_actual = versions[policy_major, policy_minor]

if (req_major, req_minor) < (policy_major, policy_minor):
status = "<"
elif (req_major, req_minor) > (policy_major, policy_minor):
status = "> (!)"
error("Package is too new: " + pkg)
error(
f"Package is too new: {pkg}={req_major}.{req_minor} was "
f"published on {versions[req_major, req_minor]:%Y-%m-%d} "
f"(within the past {policy_months} months)"
)
else:
status = "="

Expand Down
4 changes: 2 additions & 2 deletions ci/requirements/py36-bare-minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ dependencies:
- pytest
- pytest-cov
- pytest-env
- numpy=1.15
- pandas=0.25
- numpy=1.14
- pandas=0.24
- setuptools=41.2
4 changes: 2 additions & 2 deletions ci/requirements/py36-min-all-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ dependencies:
- nc-time-axis=1.2
- netcdf4=1.4
- numba=0.44
- numpy=1.15
- pandas=0.25
- numpy=1.14
- pandas=0.24
# - pint # See py36-min-nep18.yml
- pip
- pseudonetcdf=3.0
Expand Down

0 comments on commit 1ba2401

Please sign in to comment.