8000 First cut changes in preparation for environment upgrade by gavinevans · Pull Request #2124 · metoppv/improver · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

First cut changes in preparation for environment upgrade #2124

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

Open
wants to merge 15 commits into
base: mobt_800_env_upgrade_feature_branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
20 changes: 6 additions & 14 deletions envs/conda-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,14 @@ name: improver_conda_forge
channels:
- conda-forge
dependencies:
- python>=3.6
- python=3.12
# Included in improver-feedstock requirements
- cartopy<0.20
- cftime<1.5
- cf-units=2.1.5
- cartopy
- clize
- dask
- iris>=3.0,<3.1
- netCDF4
- numpy<1.21
- scipy<1.7
- sigtools
- sphinx=5.3.0
- iris=3.12
- numpy=2.2
- scipy=1.15
- sphinx
# Additional libraries to run tests, not included in improver-feedstock
- bandit
- filelock
Expand All @@ -29,6 +24,3 @@ dependencies:
- sphinx-autodoc-typehints
- sphinx_rtd_theme
- threadpoolctl
# Pinned dependencies of dependencies
- pillow<=10.0.1 # https://github.com/metoppv/improver/issues/2010
- pandas<=2.0.0 # https://github.com/metoppv/improver/issues/2010
37 changes: 15 additions & 22 deletions envs/environment_a.yml
EDBE
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,24 @@
name: improver_a
channels:
- conda-forge
- main
dependencies:
- python=3.7
- python=3.12
# Required
- cartopy=0.19
- cftime=1.2.1
- cf-units=2.1.5
- clize=4.1.1
- dask=2021.8.1
- iris=3.0.3
- netCDF4=1.4.1
- numpy=1.20.2
- pandas=1.2.4
- pytz=2020.5
- scipy=1.6.2
- sigtools=2.0.2
- sphinx=4.0.1
- cartopy
- clize
- iris=3.12
- numpy=2.2
- pandas
- pytz
- scipy=1.15
- sphinx
# Optional
- fastparquet=0.7.1
- statsmodels=0.12.2
- numba=0.53.1
- pygam=0.8.0
- pysteps=1.4.1
- python-stratify=0.1.1
- python-utils=3.5.2
- fastparquet
- statsmodels
- numba
- pygam
- pysteps
- python-stratify
# Development
- astroid
- bandit
Expand Down
33 changes: 13 additions & 20 deletions envs/environment_b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,21 @@ name: improver_b
channels:
- conda-forge
dependencies:
- python=3.8
- python=3.12
# Required
- cartopy=0.19
- cftime=1.2.1
- cf-units=2.1.5
- clize=4.2.0
- dask=2021.8.1
- iris=3.0.3
- netCDF4=1.5.7
- numpy=1.20
- pandas=1.3.4
- pytz=2020.5
- scipy=1.6.2
- sigtools=2.0.3
- sphinx=4.0.2
- cartopy
- clize
- iris=3.12
- numpy=2.2
- pandas
- pytz
- scipy=1.15
- sphinx
# Optional
- lightgbm=3.2.1
- numba=0.53.1
- python-stratify=0.2.post0
- treelite=2.3.0
- lightgbm
- numba
- python-stratify
- treelite
# Development
- astroid
- bandit
Expand All @@ -40,5 +35,3 @@ dependencies:
- sphinx-autodoc-typehints
- sphinx_rtd_theme
- threadpoolctl
# pinned dependencies of dependencies
- pyparsing=3.1.2
21 changes: 6 additions & 15 deletions envs/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,23 @@ name: improver_latest
channels:
- conda-forge
dependencies:
- python=3
- python
# Required
- cartopy<0.20
- cftime<1.5
- cf-units=2.1.5
- cartopy
- clize
- dask
- iris>=3.0
- netCDF4
- numpy<1.21
- iris
- numpy
- pytz
- scipy
- sigtools
- sphinx
# Optional
- python-stratify
- statsmodels
- lightgbm
- numba
- pygam=0.8.0
- pygam
- pysteps
- python-utils=3.5.2
- treelite=2.3.0
- treelite
# Development
- astroid
- bandit
Expand All @@ -44,6 +38,3 @@ dependencies:
- sphinx-autodoc-typehints
- sphinx_rtd_theme
- threadpoolctl
# Pinned dependencies of dependencies
- pillow<=10.0.1 # https://github.com/metoppv/improver/issues/2010
- pandas<=2.0.0 # https://github.com/metoppv/improver/issues/2010
5 changes: 3 additions & 2 deletions improver/calibration/__init__.py
10000
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

from collections import OrderedDict
from typing import Dict, List, Optional, Tuple
from typing import Dict, List, Optional, Tuple, Union

from iris.cube import Cube, CubeList

Expand Down Expand Up @@ -95,7 +95,8 @@ def split_forecasts_and_truth(


def split_forecasts_and_coeffs(
cubes: CubeList, land_sea_mask_name: Optional[str] = None
cubes: Union[List[CubeList[Cube]], List[List[Cube]]],
land_sea_mask_name: Optional[str] = None,
):
"""Split the input forecast, coefficients, static additional predictors,
land sea-mask and probability template, if provided. The coefficients
Expand Down
6 changes: 3 additions & 3 deletions improver/psychrometric_calculations/cloud_top_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def __init__(self, model_id_attr: str = None):
Name of model ID attribute to be copied from source cubes to output cube
"""
self.model_id_attr = model_id_attr
self.t_at_ccl = Cube(None)
self.p_at_ccl = Cube(None)
self.temperature = Cube(None)
self.t_at_ccl = Cube(shape=(0,))
self.p_at_ccl = Cube(shape=(0,))
self.temperature = Cube(shape=(0,))
self.minimum_t_diff = 4

def _calculate_cct(self) -> ndarray:
Expand Down
4 changes: 2 additions & 2 deletions improver/wind_calculations/vertical_updraught.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def __init__(self, model_id_attr: str = None):
Name of model ID attribute to be copied from source cubes to output cube
"""
self.model_id_attr = model_id_attr
self.cape = Cube(None)
self.precip = Cube(None)
self.cape = Cube(shape=(0,))
self.precip = Cube(shape=(0,))
self.cube_names = [
"atmosphere_convective_available_potential_energy",
"lwe_precipitation_rate_max",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def thresholds():

@pytest.fixture
def lead_times():
return np.array([24, 48], dtype=np.int)
return np.array([24, 48], dtype=np.int32)


@pytest.fixture
Expand Down
Loading
Loading
0