diff --git a/README.md b/README.md index 37cf114..49cdb89 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,6 @@ [![Build](https://github.com/nismod/snail/actions/workflows/build.yml/badge.svg)](https://github.com/nismod/snail/actions/workflows/build.yml) [![License](https://img.shields.io/pypi/l/nismod-snail.svg)](https://opensource.org/licenses/MIT) -> This code is under early development - # 🤔 What is this? This is a Python package to help with analysis of the potential impacts of @@ -108,7 +106,7 @@ Change directory into the root of the project: To create and activate a conda environment with snail's dependencies installed: - conda env create -f .environment.yml + conda env create -f environment.yml conda activate snail-dev Run this to install the source code as a package: diff --git a/.environment.yml b/environment.yml similarity index 68% rename from .environment.yml rename to environment.yml index d582a4f..c557013 100644 --- a/.environment.yml +++ b/environment.yml @@ -12,9 +12,8 @@ dependencies: - matplotlib - nbstripout - networkx - - numpy <2.0.0 + - numpy - openpyxl - - pandera - pip - pyarrow - pyogrio @@ -25,9 +24,10 @@ dependencies: - shapely - scipy - pip: - - hilbertcurve - - irv_autopkg_client - - python-igraph - - snkit - - tqdm - - -e . + - hilbertcurve + - irv_autopkg_client + - pandera>=0.20.0 + - python-igraph + - snkit + - tqdm + - -e . diff --git a/pyproject.toml b/pyproject.toml index aba7667..128fe18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ requires-python = ">=3.8" dependencies = [ "geopandas", "matplotlib", - "numpy<2.0.0", + "numpy", "openpyxl", "pandera", "pyarrow", diff --git a/tests/test_damages.py b/tests/test_damages.py index 8a696a0..0ecb1cc 100644 --- a/tests/test_damages.py +++ b/tests/test_damages.py @@ -1,4 +1,5 @@ """Test damage assessment""" + import os import numpy @@ -115,7 +116,7 @@ def test_linear_curve_interpolation(curve): def test_linear_curve_out_of_bounds(curve): # sense-check out-of-bounds intensities = numpy.array( - [numpy.NINF, -999, numpy.NZERO, 0, 30, 999, numpy.inf, numpy.nan] + [-numpy.inf, -999, -0.0, 0, 30, 999, numpy.inf, numpy.nan] ) expected = numpy.array([0, 0, 0, 0, 1, 1, 1, numpy.nan]) actual = curve.damage_fraction(intensities)