Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump min deps #7300

Merged
merged 6 commits into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions ci/min_deps_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
POLICY_MONTHS = {"python": 24, "numpy": 18}
POLICY_MONTHS_DEFAULT = 12
POLICY_OVERRIDE: Dict[str, Tuple[int, int]] = {}
has_errors = False
errors = []


def error(msg: str) -> None:
global has_errors
has_errors = True
global errors
errors.append(msg)
print("ERROR:", msg)


Expand All @@ -48,7 +48,7 @@ def parse_requirements(fname) -> Iterator[Tuple[str, int, int, Optional[int]]]:

Yield (package name, major version, minor version, [patch version])
"""
global has_errors
global errors

with open(fname) as fh:
contents = yaml.safe_load(fh)
Expand Down Expand Up @@ -157,9 +157,9 @@ def process_pkg(
status = "> (!)"
delta = relativedelta(datetime.now(), policy_published_actual).normalized()
n_months = delta.years * 12 + delta.months
error(
f"Package is too new: {pkg}={req_major}.{req_minor} was "
f"published on {versions[req_major, req_minor]:%Y-%m-%d} "
warning(
f"Package is too new: {pkg}={policy_major}.{policy_minor} was "
f"published on {versions[policy_major, policy_minor]:%Y-%m-%d} "
f"which was {n_months} months ago (policy is {policy_months} months)"
)
else:
Expand Down Expand Up @@ -193,13 +193,18 @@ def main() -> None:
for pkg, major, minor, patch in parse_requirements(fname)
]

print("Package Required Policy Status")
print("\nPackage Required Policy Status")
print("----------------- -------------------- -------------------- ------")
fmt = "{:17} {:7} ({:10}) {:7} ({:10}) {}"
for row in rows:
print(fmt.format(*row))

assert not has_errors
if errors:
print("\nErrors:")
print("-------")
for i, e in enumerate(errors):
print(f"{i+1}. {e}")
sys.exit(1)


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements/bare-minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies:
- pytest-env
- pytest-xdist
- numpy=1.20
- packaging=21.0
- packaging=21.3
- pandas=1.3
26 changes: 13 additions & 13 deletions ci/requirements/min-all-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ dependencies:
# When upgrading python, numpy, or pandas, must also change
# doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py.
- python=3.8
- boto3=1.18
- boto3=1.20
- bottleneck=1.3
- cartopy=0.19
- cartopy=0.20
- cdms2=3.1
- cfgrib=0.9
- cftime=1.5
- coveralls
- dask-core=2021.09
- distributed=2021.09
- dask-core=2021.11
- distributed=2021.11
- flox=0.5
- h5netcdf=0.11
# h5py and hdf5 tend to cause conflicrs
# for e.g. hdf5 1.12 conflicts with h5py=3.1
# prioritize bumping other packages instead
- h5py=3.1
- hdf5=1.10
- h5py=3.6
- hdf5=1.12
- hypothesis
- iris=3.1
- lxml=4.6 # Optional dep of pydap
- matplotlib-base=3.4
- nc-time-axis=1.3
- matplotlib-base=3.5
- nc-time-axis=1.4
# netcdf follows a 1.major.minor[.patch] convention
# (see https://github.com/Unidata/netcdf4-python/issues/1090)
# bumping the netCDF4 version is currently blocked by #4491
- netcdf4=1.5.3
- netcdf4=1.5.7
- numba=0.54
- numpy=1.20
- packaging=21.0
- packaging=21.3
- pandas=1.3
- pint=0.17
- pint=0.18
- pip
- pseudonetcdf=3.1
- pseudonetcdf=3.2
- pydap=3.2
# - pynio=1.5.5
- pytest
Expand All @@ -51,7 +51,7 @@ dependencies:
- seaborn=0.11
- sparse=0.13
- toolz=0.11
- typing_extensions=3.10
- typing_extensions=4.0
- zarr=2.10
- pip:
- numbagg==0.1
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# https://help.github.com/en/github/visualizing-repository-data-with-graphs/listing-the-packages-that-a-repository-depends-on

numpy >= 1.20
packaging >= 21.0
packaging >= 21.3
pandas >= 1.3
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ python_requires = >=3.8
install_requires =
numpy >= 1.20 # recommended to use >= 1.22 for full quantile method support
pandas >= 1.3
packaging >= 21.0
packaging >= 21.3

[options.extras_require]
io =
Expand Down