GitHub Actions / Tested with Harmony
failed
Apr 26, 2024 in 0s
1 fail in 31s
1 tests 0 ✅ 31s ⏱️
1 suites 0 💤
1 files 1 ❌
Results for commit 1a28014.
Annotations
Check warning on line 0 in tests.verify_collection
github-actions / Tested with Harmony
test_concatenate[C2799465507-POCLOUD] (tests.verify_collection) failed
test-results/test_report.xml [took 28s]
Raw output
AssertionError: False is not true
collection_concept_id = 'C2799465507-POCLOUD'
harmony_env = <Environment.PROD: 4>
bearer_token = 'eyJ0eXAiOiJKV1QiLCJvcmlnaW4iOiJFYXJ0aGRhdGEgTG9naW4iLCJzaWciOiJlZGxqd3RwdWJrZXlfb3BzIiwiYWxnIjoiUlMyNTYifQ.eyJ0eXBlIj...bhQcCf8RvuUS3g7yXEmer0-_49RfAtrjKUH8REO5WQQObA0WqlcpLYf-nomnhm1C9oWCvsmAmhPKTKB-xP7MHZm4y-fV2CcYpWaPfnye_9nVygVP-5IetA'
@pytest.mark.timeout(600)
def test_concatenate(collection_concept_id, harmony_env, bearer_token):
max_results = 2
harmony_client = harmony.Client(env=harmony_env, token=bearer_token)
collection = harmony.Collection(id=collection_concept_id)
request = harmony.Request(
collection=collection,
concatenate=True,
max_results=max_results,
skip_preview=True,
format="application/x-netcdf4",
)
request.is_valid()
print(harmony_client.request_as_curl(request))
job1_id = harmony_client.submit(request)
print(f'\n{job1_id}')
print(harmony_client.status(job1_id))
print('\nWaiting for the job to finish')
results = harmony_client.result_json(job1_id)
print('\nDownloading results:')
futures = harmony_client.download_all(job1_id)
file_names = [f.result() for f in futures]
print('\nDone downloading.')
filename = file_names[0]
# Handle time dimension and variables dropping
merge_dataset = netCDF4.Dataset(filename, 'r')
headers = {
"Authorization": f"Bearer {bearer_token}"
}
original_files = merge_dataset.variables['subset_files']
history_json = json.loads(merge_dataset.history_json)
assert len(original_files) == max_results
for url in history_json[0].get("derived_from"):
local_file_name = os.path.basename(url)
download_file(url, local_file_name, headers)
for i, file in enumerate(original_files):
origin_dataset = netCDF4.Dataset(file)
> verify_groups(merge_dataset, origin_dataset, i, file=file)
tests/verify_collection.py:491:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/verify_collection.py:417: in verify_groups
verify_variables(merged_group, origin_group, subset_index, both_merged)
tests/verify_collection.py:408: in verify_variables
unittest.TestCase().assertTrue(np.array_equal(merged_data, origin_data, equal_nan=equal_nan))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <unittest.case.TestCase testMethod=runTest>, expr = False
msg = 'False is not true'
def assertTrue(self, expr, msg=None):
"""Check that the expression is true."""
if not expr:
msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr))
> raise self.failureException(msg)
E AssertionError: False is not true
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/unittest/case.py:687: AssertionError
--------------------------------- Captured Log ---------------------------------
Loading