Skip to content

Merge branch 'feature/centroids_as_gdf' of github.com:CLIMADA-project… #211

Merge branch 'feature/centroids_as_gdf' of github.com:CLIMADA-project…

Merge branch 'feature/centroids_as_gdf' of github.com:CLIMADA-project… #211

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / Unit Test Results Python 3.11 failed Dec 6, 2023 in 0s

2 fail, 628 pass in 6m 29s

630 tests  ±0   628 ✔️ +1   6m 29s ⏱️ -31s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       2  - 1 

Results for commit e4bc0db. ± Comparison against earlier commit 4460955.

Annotations

Check warning on line 0 in climada.hazard.centroids.test.test_vec_ras.TestRaster

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results Python 3.11

test_area_pass (climada.hazard.centroids.test.test_vec_ras.TestRaster) failed

tests_xml/tests.xml [took 0s]
Raw output
AssertionError: False is not true
self = <climada.hazard.centroids.test.test_vec_ras.TestRaster testMethod=test_area_pass>

    def test_area_pass(self):
        """Test set_area"""
        centr_ras = Centroids.from_raster_file(HAZ_DEMO_FL, window=Window(0, 0, 50, 60))
        #centr_ras.meta['crs'] = {'proj': 'cea'}
        area_pixel = centr_ras.get_area_pixel()
>       self.assertTrue(
            np.allclose(area_pixel,
                        np.ones(60 * 50) * 0.009000000000000341 * 0.009000000000000341))
E       AssertionError: False is not true

climada/hazard/centroids/test/test_vec_ras.py:241: AssertionError

Check warning on line 0 in climada.hazard.centroids.test.test_vec_ras.TestRaster

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results Python 3.11

test_ne_crs_geom_pass (climada.hazard.centroids.test.test_vec_ras.TestRaster) failed

tests_xml/tests.xml [took 0s]
Raw output
AssertionError: 4.51063496489 != -69.3326495969998 within 7 places (73.8432845618898 difference)
self = <climada.hazard.centroids.test.test_vec_ras.TestRaster testMethod=test_ne_crs_geom_pass>

    def test_ne_crs_geom_pass(self):
        """Test _ne_crs_geom"""
        centr_ras = Centroids.from_raster_file(HAZ_DEMO_FL, window=Window(0, 0, 50, 60))
    
        xy_vec = centr_ras._ne_crs_geom()
        x_vec, y_vec = xy_vec.geometry[:].x.values, xy_vec.geometry[:].y.values
>       self.assertAlmostEqual(4.51063496489, x_vec[0])
E       AssertionError: 4.51063496489 != -69.3326495969998 within 7 places (73.8432845618898 difference)

climada/hazard/centroids/test/test_vec_ras.py:202: AssertionError