Skip to content

setup develop branch for v5.0.1-dev #117

setup develop branch for v5.0.1-dev

setup develop branch for v5.0.1-dev #117

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

1 fail, 2 skipped, 189 pass in 5m 2s

192 tests  ±0   189 ✅  - 1   5m 2s ⏱️ +51s
  1 suites ±0     2 💤 ±0 
  1 files   ±0     1 ❌ +1 

Results for commit b020a69. ± Comparison against earlier commit 410f154.

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_impacts (climada_petals.engine.test.test_supplychain.TestSupplyChain) failed

climada_petals/tests_xml/tests.xml [took 1s]
Raw output
climada.util.api_client.Client.NoConnection: there is no internet connection and the client has not found any cached result for this request.
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain testMethod=test_calc_impacts>

    def setUp(self) -> None:
        client = Client()
    
        tf = "WIOTtest_Nov16_ROW"
        if not MRIOT_DIRECTORY.joinpath(tf).is_file():
>           dsf = client.get_dataset_info(name=tf, status="test_dataset").files[0]

climada_petals/engine/test/test_supplychain.py:138: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/util/api_client.py:457: in get_dataset_info
    jarr = self.list_dataset_infos(
../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/util/api_client.py:418: in list_dataset_infos
    DatasetInfo.from_json(ds) for ds in self._request_200(url, params=params)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <climada.util.api_client.Client object at 0x7f71cf4facb0>
url = 'https://climada.ethz.ch/data-api/v2/dataset/'
params = {'data_type': None, 'limit': 100000, 'name': 'WIOTtest_Nov16_ROW', 'status': 'test_dataset', ...}

    def _request_200(self, url, params=None):
        """Helper method, triaging successfull and failing requests.
    
        Returns
        -------
        dict
            loaded from the json object of a successful request.
    
        Raises
        ------
        NoResult
            if the response status code is different from 200
        """
        # pylint: disable=no-else-return
    
        if params is None:
            params = dict()
    
        if self.online:
            page = requests.get(url, params=params, timeout=Client.QUERY_TIMEOUT)
            if page.status_code != 200:
                raise Client.NoResult(page.content.decode())
            result = json.loads(page.content.decode())
            if self.cache.enabled:
                self.cache.store(result, url, **params)
            return result
    
        else:  # try to restore previous results from an identical request
            if not self.cache.enabled:
                raise Client.NoConnection(
                    "there is no internet connection and the client does"
                    " not cache results."
                )
            cached_result = self.cache.fetch(url, **params)
            if not cached_result:
>               raise Client.NoConnection(
                    "there is no internet connection and the client has not"
                    " found any cached result for this request."
                )
E               climada.util.api_client.Client.NoConnection: there is no internet connection and the client has not found any cached result for this request.

../../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/climada/util/api_client.py:341: NoConnection