Skip to content

adapt to changed Exposures interface #103

adapt to changed Exposures interface

adapt to changed Exposures interface #103

GitHub Actions / Petals / Unit Test Results (3.10) failed Jul 11, 2024 in 0s

10 fail, 182 pass in 4m 36s

192 tests  ±0   182 ✅  - 1   4m 36s ⏱️ -3s
  1 suites ±0     0 💤 ±0 
  1 files   ±0    10 ❌ +1 

Results for commit 877398a. ± Comparison against earlier commit 5aef35f.

Annotations

Check warning on line 0 in climada_petals.engine.test.test_supplychain.TestSupplyChain

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_calc_shock_to_sectors (climada_petals.engine.test.test_supplychain.TestSupplyChain) failed

climada_petals/tests_xml/tests.xml [took 1s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'lon'
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain testMethod=test_calc_shock_to_sectors>

    def test_calc_shock_to_sectors(self):
        """Test sectorial exposure, impact and shock calculations."""
    
        mriot = build_mriot()
        sup = SupplyChain(mriot)
    
        # take one mriot type that supports iso-3
        sup.mriot.meta.change_meta("name", "WIOD16-2011")
    
>       exp, imp = dummy_exp_imp()

climada_petals/engine/test/test_supplychain.py:243: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/engine/test/test_supplychain.py:107: in dummy_exp_imp
    exp = Exposures(
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa564809600>
data = {'region_id': [840, 608], 'value': array([150.,  80.])}, geometry = None
crs = None, args = (), kwargs = {'lat': array([1, 3]), 'lon': array([1.5, 3.5])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'lon'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_crop_production.TestCropProduction

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_from_area_and_yield_nc4 (climada_petals.entity.exposures.test.test_crop_production.TestCropProduction) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'
self = <climada_petals.entity.exposures.test.test_crop_production.TestCropProduction testMethod=test_from_area_and_yield_nc4>

    def test_from_area_and_yield_nc4(self):
        """Test defining crop_production Exposure from area and yield
        data extracted from netcdf test data for Switzerland"""
>       exp = cp.CropProduction.from_area_and_yield_nc4('whe', 2, 2,
                                                     FILENAME_YIELD, FILENAME_AREA,
                                                     'yield.tot', 'cultivated area all',
                                                     input_dir=INPUT_DIR)

climada_petals/entity/exposures/test/test_crop_production.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/crop_production.py:482: in from_area_and_yield_nc4
    exp = cls(
climada_petals/entity/exposures/crop_production.py:152: in __init__
    super().__init__(*args, meta=meta, **kwargs)
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa564120ca0>
data = {'region_id': array([250, 250, 250, 250, 276, 276, 276, 276, 276, 276, 276, 250, 250,
       250, 756, 756, 756, 756, ...6912348,  15668.36263266,   9518.1236234 ,   4489.85631878,
        20377.89080888,   5209.63305472,   8143.23064451])}
geometry = None, crs = None, args = ()
kwargs = {'lat': array([47.75, 47.75, 47.75, 47.75, 47.75, 47.75, 47.75, 47.75, 47.75,
       47.75, 47.75, 47.25, 47.25, 47.25...9.25,  9.75, 10.25, 10.75,  5.75,
        6.25,  6.75,  7.25,  7.75,  8.25,  8.75,  9.25,  9.75, 10.25,
       10.75])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_crop_production.TestCropProduction

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_isimip_load_central_EU (climada_petals.entity.exposures.test.test_crop_production.TestCropProduction) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'
self = <climada_petals.entity.exposures.test.test_crop_production.TestCropProduction testMethod=test_isimip_load_central_EU>

    def test_isimip_load_central_EU(self):
        """Test defining crop_production Exposure from complete demo file
        (Central Europe), isimip approach"""
>       exp = cp.CropProduction.from_isimip_netcdf(input_dir=INPUT_DIR, filename=FILENAME, hist_mean=FILENAME_MEAN,
                                      bbox=[-5, 42, 16, 55], yearrange=np.array([2001, 2005]),
                                      scenario='flexible', unit='t/y', crop = 'mai', irr='firr')

climada_petals/entity/exposures/test/test_crop_production.py:53: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/crop_production.py:284: in from_isimip_netcdf
    exp = cls(
climada_petals/entity/exposures/crop_production.py:152: in __init__
    super().__init__(*args, meta=meta, **kwargs)
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa55b2c6050>
data = {'region_id': array([0, 0, 0, ..., 0, 0, 0])}, geometry = None
crs = None, args = ()
kwargs = {'lat': array([54.75, 54.75, 54.75, ..., 42.25, 42.25, 42.25]), 'lon': array([-4.75, -4.25, -3.75, ..., 14.75, 15.25, 15.75])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_crop_production.TestCropProduction

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_normalize_with_fao_cp (climada_petals.entity.exposures.test.test_crop_production.TestCropProduction) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'
self = <climada_petals.entity.exposures.test.test_crop_production.TestCropProduction testMethod=test_normalize_with_fao_cp>

    def test_normalize_with_fao_cp(self):
        """ Test normalizing of two given exposures countrywise (usually firr + norr)
        with the mean crop production quantity"""
>       exp = cp.CropProduction.from_isimip_netcdf(input_dir=INPUT_DIR, filename=FILENAME, hist_mean=FILENAME_MEAN,
                                          bbox=[-5, 42, 16, 55], yearrange=np.array([2001, 2005]),
                                          scenario='flexible', crop = 'mai', unit='t/y', irr='firr')

climada_petals/entity/exposures/test/test_crop_production.py:179: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/crop_production.py:284: in from_isimip_netcdf
    exp = cls(
climada_petals/entity/exposures/crop_production.py:152: in __init__
    super().__init__(*args, meta=meta, **kwargs)
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa55af306a0>
data = {'region_id': array([0, 0, 0, ..., 0, 0, 0])}, geometry = None
crs = None, args = ()
kwargs = {'lat': array([54.75, 54.75, 54.75, ..., 42.25, 42.25, 42.25]), 'lon': array([-4.75, -4.25, -3.75, ..., 14.75, 15.25, 15.75])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_crop_production.TestCropProduction

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_set_value_to_kcal (climada_petals.entity.exposures.test.test_crop_production.TestCropProduction) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'
self = <climada_petals.entity.exposures.test.test_crop_production.TestCropProduction testMethod=test_set_value_to_kcal>

    def test_set_value_to_kcal(self):
        """Test calculating crop_production Exposure in [kcal/y] (deprecated  setmethod)"""
    
        # (1) biomass = True
>       exp = cp.CropProduction.from_isimip_netcdf(input_dir=INPUT_DIR, filename=FILENAME, hist_mean=FILENAME_MEAN,
                                      bbox=[-5, 45, 10, 50], yearrange=np.array([2001, 2005]),
                                      scenario='flexible', unit='t/y', crop = 'mai', irr='firr')

climada_petals/entity/exposures/test/test_crop_production.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/crop_production.py:284: in from_isimip_netcdf
    exp = cls(
climada_petals/entity/exposures/crop_production.py:152: in __init__
    super().__init__(*args, meta=meta, **kwargs)
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa55abec2b0>
data = {'region_id': array([  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 250, 250,
       250, 250, 250, 250, 250, ...50, 250, 250, 250, 250, 250, 250,
       250, 250, 250, 250, 250, 250, 250, 250, 380, 380, 380, 380, 380,
       380])}
geometry = None, crs = None, args = ()
kwargs = {'lat': array([49.75, 49.75, 49.75, 49.75, 49.75, 49.75, 49.75, 49.75, 49.75,
       49.75, 49.75, 49.75, 49.75, 49.75...2.75,  3.25,  3.75,
        4.25,  4.75,  5.25,  5.75,  6.25,  6.75,  7.25,  7.75,  8.25,
        8.75,  9.25,  9.75])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_crop_production.TestCropProduction

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_set_value_to_usd (climada_petals.entity.exposures.test.test_crop_production.TestCropProduction) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'
self = <climada_petals.entity.exposures.test.test_crop_production.TestCropProduction testMethod=test_set_value_to_usd>

    def test_set_value_to_usd(self):
        """Test calculating crop_production Exposure in [USD/y] (deprecated set method)"""
>       exp = cp.CropProduction.from_isimip_netcdf(input_dir=INPUT_DIR, filename=FILENAME, hist_mean=FILENAME_MEAN,
                                      bbox=[-5, 42, 16, 55], yearrange=np.array([2001, 2005]),
                                      scenario='flexible', unit='t/y', crop = 'mai', irr='firr')

climada_petals/entity/exposures/test/test_crop_production.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/crop_production.py:284: in from_isimip_netcdf
    exp = cls(
climada_petals/entity/exposures/crop_production.py:152: in __init__
    super().__init__(*args, meta=meta, **kwargs)
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa558be6920>
data = {'region_id': array([0, 0, 0, ..., 0, 0, 0])}, geometry = None
crs = None, args = ()
kwargs = {'lat': array([54.75, 54.75, 54.75, ..., 42.25, 42.25, 42.25]), 'lon': array([-4.75, -4.25, -3.75, ..., 14.75, 15.25, 15.75])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_crop_production.TestCropProduction

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_value_to_kcal (climada_petals.entity.exposures.test.test_crop_production.TestCropProduction) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'
self = <climada_petals.entity.exposures.test.test_crop_production.TestCropProduction testMethod=test_value_to_kcal>

    def test_value_to_kcal(self):
        """Test calculating crop_production Exposure in [kcal/y] (new function)"""
    
        # (1) biomass = True
>       exp = cp.CropProduction.from_isimip_netcdf(input_dir=INPUT_DIR, filename=FILENAME, hist_mean=FILENAME_MEAN,
                                      bbox=[-5, 45, 10, 50], yearrange=np.array([2001, 2005]),
                                      scenario='flexible', unit='t/y', crop = 'mai', irr='firr')

climada_petals/entity/exposures/test/test_crop_production.py:136: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/crop_production.py:284: in from_isimip_netcdf
    exp = cls(
climada_petals/entity/exposures/crop_production.py:152: in __init__
    super().__init__(*args, meta=meta, **kwargs)
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa56411bd00>
data = {'region_id': array([  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 250, 250,
       250, 250, 250, 250, 250, ...50, 250, 250, 250, 250, 250, 250,
       250, 250, 250, 250, 250, 250, 250, 250, 380, 380, 380, 380, 380,
       380])}
geometry = None, crs = None, args = ()
kwargs = {'lat': array([49.75, 49.75, 49.75, 49.75, 49.75, 49.75, 49.75, 49.75, 49.75,
       49.75, 49.75, 49.75, 49.75, 49.75...2.75,  3.25,  3.75,
        4.25,  4.75,  5.25,  5.75,  6.25,  6.75,  7.25,  7.75,  8.25,
        8.75,  9.25,  9.75])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_crop_production.TestCropProduction

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_value_to_usd (climada_petals.entity.exposures.test.test_crop_production.TestCropProduction) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'
self = <climada_petals.entity.exposures.test.test_crop_production.TestCropProduction testMethod=test_value_to_usd>

    def test_value_to_usd(self):
        """Test calculating crop_production Exposure in [USD/y] (new function)"""
>       exp = cp.CropProduction.from_isimip_netcdf(input_dir=INPUT_DIR, filename=FILENAME, hist_mean=FILENAME_MEAN,
                                      bbox=[-5, 42, 16, 55], yearrange=np.array([2001, 2005]),
                                      scenario='flexible', unit='t/y', crop = 'mai', irr='firr')

climada_petals/entity/exposures/test/test_crop_production.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/crop_production.py:284: in from_isimip_netcdf
    exp = cls(
climada_petals/entity/exposures/crop_production.py:152: in __init__
    super().__init__(*args, meta=meta, **kwargs)
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa563ac7520>
data = {'region_id': array([0, 0, 0, ..., 0, 0, 0])}, geometry = None
crs = None, args = ()
kwargs = {'lat': array([54.75, 54.75, 54.75, ..., 42.25, 42.25, 42.25]), 'lon': array([-4.75, -4.25, -3.75, ..., 14.75, 15.25, 15.75])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'lat'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_gdp_asset.TestGDP2AssetFunctions

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_read_GDP (climada_petals.entity.exposures.test.test_gdp_asset.TestGDP2AssetFunctions) failed

climada_petals/tests_xml/tests.xml [took 1s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'value'
self = <climada_petals.entity.exposures.test.test_gdp_asset.TestGDP2AssetFunctions testMethod=test_read_GDP>

    def test_read_GDP(self):
    
>       exp_test = ga.GDP2Asset._set_one_country('LIE', 2000, DEMO_GDP2ASSET)

climada_petals/entity/exposures/test/test_gdp_asset.py:91: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/gdp_asset.py:133: in _set_one_country
    return GDP2Asset(
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa55af30dc0>
data = {'impf_RF': array([3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3.]), 'region_id': array([11., 11., 11., 11., 11., 11., 11., 11., 11., 11., 11., 11., 11.])}
geometry = None, crs = None, args = ()
kwargs = {'lat': array([47.0622474, 47.0622474, 47.0622474, 47.103914 , 47.103914 ,
       47.103914 , 47.1455806, 47.1455806, ...00e+00, 4.13708136e+06,
       2.74111963e+07, 0.00000000e+00, 4.12584731e+06, 8.85575584e+07,
       1.91881403e+08])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'value'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError

Check warning on line 0 in climada_petals.entity.exposures.test.test_gdp_asset.TestGDP2AssetFunctions

See this annotation in the file changed.

@github-actions github-actions / Petals / Unit Test Results (3.10)

test_set_one_country (climada_petals.entity.exposures.test.test_gdp_asset.TestGDP2AssetFunctions) failed

climada_petals/tests_xml/tests.xml [took 2s]
Raw output
TypeError: DataFrame.__init__() got an unexpected keyword argument 'value'
self = <climada_petals.entity.exposures.test.test_gdp_asset.TestGDP2AssetFunctions testMethod=test_set_one_country>

    def test_set_one_country(self):
        with self.assertRaises(KeyError):
            ga.GDP2Asset._set_one_country('LIE', 2001, path=DEMO_GDP2ASSET)
    
>       exp_test = ga.GDP2Asset._set_one_country('LIE', 2000, path=DEMO_GDP2ASSET)

climada_petals/entity/exposures/test/test_gdp_asset.py:56: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/entity/exposures/gdp_asset.py:133: in _set_one_country
    return GDP2Asset(
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/entity/exposures/base.py:210: in __init__
    self.set_gdf(GeoDataFrame(*args, **kwargs), crs=crs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[RecursionError('maximum recursion depth exceeded while calling a Python object') raised in repr()] GeoDataFrame object at 0x7fa559739690>
data = {'impf_RF': array([3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3.]), 'region_id': array([11., 11., 11., 11., 11., 11., 11., 11., 11., 11., 11., 11., 11.])}
geometry = None, crs = None, args = ()
kwargs = {'lat': array([47.0622474, 47.0622474, 47.0622474, 47.103914 , 47.103914 ,
       47.103914 , 47.1455806, 47.1455806, ...00e+00, 4.13708136e+06,
       2.74111963e+07, 0.00000000e+00, 4.12584731e+06, 8.85575584e+07,
       1.91881403e+08])}

    def __init__(self, data=None, *args, geometry=None, crs=None, **kwargs):
        with compat.ignore_shapely2_warnings():
            if (
                kwargs.get("copy") is None
                and isinstance(data, DataFrame)
                and not isinstance(data, GeoDataFrame)
            ):
                kwargs.update(copy=True)
>           super().__init__(data, *args, **kwargs)
E           TypeError: DataFrame.__init__() got an unexpected keyword argument 'value'

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/geopandas/geodataframe.py:139: TypeError