Skip to content

added check_existing_files method to handler class #268

added check_existing_files method to handler class

added check_existing_files method to handler class #268

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

5 fail, 2 skipped, 221 pass in 6m 32s

228 tests  ±0   221 ✅ ±0   6m 32s ⏱️ +34s
  1 suites ±0     2 💤 ±0 
  1 files   ±0     5 ❌ ±0 

Results for commit 1b53327. ± Comparison against earlier commit f2be149.

Annotations

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

See this annotation in the file changed.

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

test_calc_impacts_boario_rebuilding_missing (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'. Did you mean: '_from_series'?
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_rebuilding_missing>

    def test_calc_impacts_boario_rebuilding_missing(self):
        """Test running without params."""
    
        # We check that at least one warning is raised when
        # called without parameters.
        with self.assertRaises(ValueError):
            self.sup.calc_impacts("boario", boario_type="rebuild")
        with self.assertRaises(TypeError):
>           self.sup.calc_impacts("boario",
                              boario_type="rebuild",
                              boario_params={"event":{
                                  "rebuilding_sectors":{"Manuf. & Const.":1},
                              }
                                             })

climada_petals/engine/test/test_supplychain.py:707: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/engine/supplychain.py:809: in calc_impacts
    events_list = [EventKapitalRebuild.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   events_list = [EventKapitalRebuild.from_series(
                            impact=self.secs_imp.iloc[i],
                            occurrence = (self.events_date[i]-self.events_date.min()+1),
                            # event monetary factor equal to the impact units. self.secs_imp
                            # was rescaled by the conversion_factor upon its construction so
                            # we pass the conversion_factor as unit
                            event_monetary_factor = self.conversion_factor(),
                            **boario_params['event']
                ) for i in range(n_events)
    ]
E   AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'. Did you mean: '_from_series'?

climada_petals/engine/supplychain.py:809: AttributeError

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

See this annotation in the file changed.

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

test_calc_impacts_boario_rebuilding_no_param (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'. Did you mean: '_from_series'?
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_rebuilding_no_param>

    def test_calc_impacts_boario_rebuilding_no_param(self):
        """Test running without params."""
    
        # We check that at least one warning is raised when
        # called without parameters.
>       self.sup.calc_impacts("boario",
                              boario_type="rebuild",
                              boario_params={"event":{
                                  "rebuilding_sectors":{"Manuf. & Const.":1},
                                  "rebuild_tau":365,
                              }
                                             })

climada_petals/engine/test/test_supplychain.py:719: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/engine/supplychain.py:809: in calc_impacts
    events_list = [EventKapitalRebuild.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <range_iterator object at 0x7f42257bff30>

>   events_list = [EventKapitalRebuild.from_series(
                            impact=self.secs_imp.iloc[i],
                            occurrence = (self.events_date[i]-self.events_date.min()+1),
                            # event monetary factor equal to the impact units. self.secs_imp
                            # was rescaled by the conversion_factor upon its construction so
                            # we pass the conversion_factor as unit
                            event_monetary_factor = self.conversion_factor(),
                            **boario_params['event']
                ) for i in range(n_events)
    ]
E   AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'. Did you mean: '_from_series'?

climada_petals/engine/supplychain.py:809: AttributeError

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

See this annotation in the file changed.

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

test_calc_impacts_boario_rebuilding_sep (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'. Did you mean: '_from_series'?
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_rebuilding_sep>

    def test_calc_impacts_boario_rebuilding_sep(self):
        """Test running without params."""
    
        # We check that at least one warning is raised when
        # called without parameters.
>       self.sup.calc_impacts("boario",
                              boario_type="rebuild",
                              boario_aggregate="sep",
                              boario_params={"event":{
                                  "rebuilding_sectors":{"Manuf. & Const.":1},
                                  "rebuild_tau":365,
                              }
                                             })

climada_petals/engine/test/test_supplychain.py:769: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/engine/supplychain.py:809: in calc_impacts
    events_list = [EventKapitalRebuild.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <range_iterator object at 0x7f42257ad140>

>   events_list = [EventKapitalRebuild.from_series(
                            impact=self.secs_imp.iloc[i],
                            occurrence = (self.events_date[i]-self.events_date.min()+1),
                            # event monetary factor equal to the impact units. self.secs_imp
                            # was rescaled by the conversion_factor upon its construction so
                            # we pass the conversion_factor as unit
                            event_monetary_factor = self.conversion_factor(),
                            **boario_params['event']
                ) for i in range(n_events)
    ]
E   AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'. Did you mean: '_from_series'?

climada_petals/engine/supplychain.py:809: AttributeError

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

See this annotation in the file changed.

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

test_calc_impacts_boario_recovery_no_param (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRecover' has no attribute 'from_series'. Did you mean: '_from_series'?
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_recovery_no_param>

    def test_calc_impacts_boario_recovery_no_param(self):
        """Test running without params."""
    
        # We check that at least one warning is raised when
        # called without parameters.
        with self.assertWarns(Warning):
>           self.sup.calc_impacts("boario")

climada_petals/engine/test/test_supplychain.py:661: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/engine/supplychain.py:796: in calc_impacts
    events_list = [EventKapitalRecover.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <range_iterator object at 0x7f42257ad080>

>   events_list = [EventKapitalRecover.from_series(
                            impact=self.secs_imp.iloc[i],
                            occurrence = int(self.events_date[i]-self.events_date.min()+1),
                            # event monetary factor equals the impact units. self.secs_imp
                            # was rescaled by the conversion_factor upon its construction so
                            # we pass the conversion_factor as unit
                            event_monetary_factor = self.conversion_factor(),
                            **boario_params['event']
                ) for i in range(n_events)
    ]
E   AttributeError: type object 'EventKapitalRecover' has no attribute 'from_series'. Did you mean: '_from_series'?

climada_petals/engine/supplychain.py:796: AttributeError

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

See this annotation in the file changed.

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

test_calc_impacts_boario_unknown (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed

climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRecover' has no attribute 'from_series'. Did you mean: '_from_series'?
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_unknown>

    def test_calc_impacts_boario_unknown(self):
        with self.assertRaises(RuntimeError):
            self.sup.calc_impacts("boario", boario_type="xx")
    
        with self.assertRaises(RuntimeError):
>           self.sup.calc_impacts("boario", boario_aggregate="xx")

climada_petals/engine/test/test_supplychain.py:652: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
climada_petals/engine/supplychain.py:796: in calc_impacts
    events_list = [EventKapitalRecover.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   events_list = [EventKapitalRecover.from_series(
                            impact=self.secs_imp.iloc[i],
                            occurrence = int(self.events_date[i]-self.events_date.min()+1),
                            # event monetary factor equals the impact units. self.secs_imp
                            # was rescaled by the conversion_factor upon its construction so
                            # we pass the conversion_factor as unit
                            event_monetary_factor = self.conversion_factor(),
                            **boario_params['event']
                ) for i in range(n_events)
    ]
E   AttributeError: type object 'EventKapitalRecover' has no attribute 'from_series'. Did you mean: '_from_series'?

climada_petals/engine/supplychain.py:796: AttributeError