[
https://issues.apache.org/jira/browse/CLIMATE-906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15950339#comment-15950339
]
Lewis John McGibbney commented on CLIMATE-906:
----------------------------------------------
Actually the only test failing for me when I run Python 3.5 is the PO.DAAC
test. I'll fix that over elsewhere. If anyone else can double check then it
would be appreciated.
> Fix tests in master
> -------------------
>
> Key: CLIMATE-906
> URL: https://issues.apache.org/jira/browse/CLIMATE-906
> Project: Apache Open Climate Workbench
> Issue Type: Bug
> Components: data sources
> Reporter: Lewis John McGibbney
> Assignee: Lewis John McGibbney
> Fix For: 1.2.0
>
>
> It looks like the tests broke a while back in master.
> {code}
> ======================================================================
> ERROR: test_temporal_subset_attributes
> (ocw.tests.test_dataset_processor.TestTemporalSubset)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/travis/build/apache/climate/ocw/tests/test_dataset_processor.py", line
> 67, in test_temporal_subset_attributes
> average_each_year=True)
> File "/home/travis/build/apache/climate/ocw/dataset_processor.py", line 83,
> in temporal_subset
> averaged_values = ma.zeros([nyear, ny, nx])
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/numpy/ma/core.py",
> line 7887, in __call__
> result = self._func.__call__(*args, **params).view(MaskedArray)
> TypeError: 'float' object cannot be interpreted as an integer
> ======================================================================
> ERROR: test_temporal_subset_equal_start_end_month
> (ocw.tests.test_dataset_processor.TestTemporalSubset)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/travis/build/apache/climate/ocw/tests/test_dataset_processor.py", line
> 82, in test_temporal_subset_equal_start_end_month
> average_each_year=True)
> File "/home/travis/build/apache/climate/ocw/dataset_processor.py", line 83,
> in temporal_subset
> averaged_values = ma.zeros([nyear, ny, nx])
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/numpy/ma/core.py",
> line 7887, in __call__
> result = self._func.__call__(*args, **params).view(MaskedArray)
> TypeError: 'float' object cannot be interpreted as an integer
> ======================================================================
> ERROR: test_temporal_subset_with_average_time
> (ocw.tests.test_dataset_processor.TestTemporalSubset)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/travis/build/apache/climate/ocw/tests/test_dataset_processor.py", line
> 50, in test_temporal_subset_with_average_time
> average_each_year=True)
> File "/home/travis/build/apache/climate/ocw/dataset_processor.py", line 83,
> in temporal_subset
> averaged_values = ma.zeros([nyear, ny, nx])
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/numpy/ma/core.py",
> line 7887, in __call__
> result = self._func.__call__(*args, **params).view(MaskedArray)
> TypeError: 'float' object cannot be interpreted as an integer
> ======================================================================
> ERROR: test_temporal_subset_with_average_values
> (ocw.tests.test_dataset_processor.TestTemporalSubset)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/travis/build/apache/climate/ocw/tests/test_dataset_processor.py", line
> 57, in test_temporal_subset_with_average_values
> average_each_year=True)
> File "/home/travis/build/apache/climate/ocw/dataset_processor.py", line 83,
> in temporal_subset
> averaged_values = ma.zeros([nyear, ny, nx])
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/numpy/ma/core.py",
> line 7887, in __call__
> result = self._func.__call__(*args, **params).view(MaskedArray)
> TypeError: 'float' object cannot be interpreted as an integer
> ======================================================================
> ERROR: test suite for <class 'ocw.tests.test_podaac.TestPodaacDataSource'>
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/nose/suite.py",
> line 210, in run
> self.setUp()
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/nose/suite.py",
> line 293, in setUp
> self.setupContext(ancestor)
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/nose/suite.py",
> line 316, in setupContext
> try_run(context, names)
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/nose/util.py",
> line 471, in try_run
> return func()
> File "/home/travis/build/apache/climate/ocw/tests/test_podaac.py", line 36,
> in setUpClass
> cls.variable, cls.datasetId, cls.name)
> File
> "/home/travis/build/apache/climate/ocw/data_source/podaac_datasource.py",
> line 103, in load_level4_granule
> dataset_id=datasetId, path=path)
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/podaac/podaac.py",
> line 594, in extract_l4_granule
> granule_name = granule_name.split('\t')[3][:-1]
> IndexError: list index out of range
> -------------------- >> begin captured logging << --------------------
> requests.packages.urllib3.connectionpool: DEBUG: Starting new HTTP connection
> (1): podaac.jpl.nasa.gov
> requests.packages.urllib3.connectionpool: DEBUG:
> http://podaac.jpl.nasa.gov:80 "GET
> /ws/search/granule/?datasetId=PODAAC-GHCMC-4FM02&startIndex=1&sortBy=timeAsc&itemsPerPage=7&format=atom&pretty=True
> HTTP/1.1" 302 346
> requests.packages.urllib3.connectionpool: DEBUG: Starting new HTTPS
> connection (1): podaac.jpl.nasa.gov
> requests.packages.urllib3.connectionpool: DEBUG:
> https://podaac.jpl.nasa.gov:443 "GET
> /ws/search/granule/?datasetId=PODAAC-GHCMC-4FM02&startIndex=1&sortBy=timeAsc&itemsPerPage=7&format=atom&pretty=True
> HTTP/1.1" 200 None
> --------------------- >> end captured logging << ---------------------
> ======================================================================
> ERROR: test_calc_climatology_monthly
> (ocw.tests.test_utils.TestCalcClimatologyMonthly)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/travis/build/apache/climate/ocw/tests/test_utils.py", line 400,
> in test_calc_climatology_monthly
> self.dataset)
> File "/home/travis/build/apache/climate/ocw/utils.py", line 351, in
> calc_climatology_monthly
> values = reshape_monthly_to_annually(dataset).mean(axis=0)
> File "/home/travis/build/apache/climate/ocw/utils.py", line 282, in
> reshape_monthly_to_annually
> values.shape = new_shape
> TypeError: 'float' object cannot be interpreted as an integer
> ======================================================================
> ERROR: test_annually_mean (ocw.tests.test_utils.TestCalcClimatologyYear)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/travis/build/apache/climate/ocw/tests/test_utils.py", line 364,
> in test_annually_mean
> utils.calc_climatology_year(self.test_dataset)[0], annually_mean)
> File "/home/travis/build/apache/climate/ocw/utils.py", line 318, in
> calc_climatology_year
> values = reshape_monthly_to_annually(dataset)
> File "/home/travis/build/apache/climate/ocw/utils.py", line 282, in
> reshape_monthly_to_annually
> values.shape = new_shape
> TypeError: 'float' object cannot be interpreted as an integer
> ======================================================================
> ERROR: test_total_mean (ocw.tests.test_utils.TestCalcClimatologyYear)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/travis/build/apache/climate/ocw/tests/test_utils.py", line 370,
> in test_total_mean
> utils.calc_climatology_year(self.test_dataset)[1], total_mean)
> File "/home/travis/build/apache/climate/ocw/utils.py", line 318, in
> calc_climatology_year
> values = reshape_monthly_to_annually(dataset)
> File "/home/travis/build/apache/climate/ocw/utils.py", line 282, in
> reshape_monthly_to_annually
> values.shape = new_shape
> TypeError: 'float' object cannot be interpreted as an integer
> ======================================================================
> ERROR: test_reshape_full_year
> (ocw.tests.test_utils.TestReshapeMonthlyToAnnually)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/travis/build/apache/climate/ocw/tests/test_utils.py", line 257,
> in test_reshape_full_year
> utils.reshape_monthly_to_annually(self.test_dataset), new_values)
> File "/home/travis/build/apache/climate/ocw/utils.py", line 282, in
> reshape_monthly_to_annually
> values.shape = new_shape
> TypeError: 'float' object cannot be interpreted as an integer
> ======================================================================
> ERROR: test_reshape_not_full_year
> (ocw.tests.test_utils.TestReshapeMonthlyToAnnually)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/travis/build/apache/climate/ocw/tests/test_utils.py", line 269,
> in test_reshape_not_full_year
> ValueError, utils.reshape_monthly_to_annually, bad_dataset)
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/unittest/case.py",
> line 728, in assertRaises
> return context.handle('assertRaises', args, kwargs)
> File
> "/home/travis/miniconda/envs/test-environment/lib/python3.5/unittest/case.py",
> line 177, in handle
> callable_obj(*args, **kwargs)
> File "/home/travis/build/apache/climate/ocw/utils.py", line 282, in
> reshape_monthly_to_annually
> values.shape = new_shape
> TypeError: 'float' object cannot be interpreted as an integer
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)