From e44eb5391dd06ebedd3265db749c1cc4592a38a8 Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 26 Jul 2024 09:48:21 +0200 Subject: [PATCH] clean up --- polytope/datacube/backends/fdb.py | 3 --- polytope/engine/hullslicer.py | 2 -- tests/test_fdb_unmap_tree.py | 3 --- tests/test_union_gj.py | 3 --- 4 files changed, 11 deletions(-) diff --git a/polytope/datacube/backends/fdb.py b/polytope/datacube/backends/fdb.py index 776e77630..607be35f7 100644 --- a/polytope/datacube/backends/fdb.py +++ b/polytope/datacube/backends/fdb.py @@ -102,8 +102,6 @@ def get(self, requests: TensorIndexTree): request_combis = product(*interm_branch_tuple_values) # Need to extract the possible requests and add them to the right nodes - # complete_list_complete_uncompressed_requests = [] - # complete_fdb_decoding_info = [] for combi in request_combis: uncompressed_request = {} for i, key in enumerate(compressed_request[0].keys()): @@ -286,7 +284,6 @@ def assign_fdb_output_to_nodes(self, output_values, fdb_requests_decoding_info): # If we are here, no data was found for this path in the fdb none_array = [None] * len(n.values) n.result.extend(none_array) - # n.remove_branch() else: interm_request_output_values = request_output_values[0][i][0] n.result.extend(interm_request_output_values) diff --git a/polytope/engine/hullslicer.py b/polytope/engine/hullslicer.py index b3a17d3d0..5fe8290e6 100644 --- a/polytope/engine/hullslicer.py +++ b/polytope/engine/hullslicer.py @@ -194,8 +194,6 @@ def find_compressed_axes(self, datacube, polytopes): # add the last axis of the grid always (longitude) as a compressed axis k, last_value = _, datacube.axes[k] = datacube.axes.popitem() self.compressed_axes.append(k) - # if len(datacube.coupled_axes) != 0: - # self.compressed_axes.append(datacube.coupled_axes[0][-1]) def remove_compressed_axis_in_union(self, polytopes): for p in polytopes: diff --git a/tests/test_fdb_unmap_tree.py b/tests/test_fdb_unmap_tree.py index e304c53dd..bfc71f1ee 100644 --- a/tests/test_fdb_unmap_tree.py +++ b/tests/test_fdb_unmap_tree.py @@ -5,9 +5,6 @@ from polytope.polytope import Polytope, Request from polytope.shapes import Box, Select -# import geopandas as gpd -# import matplotlib.pyplot as plt - class TestSlicingFDBDatacube: def setup_method(self, method): diff --git a/tests/test_union_gj.py b/tests/test_union_gj.py index eaa9c7da4..30f22fc54 100644 --- a/tests/test_union_gj.py +++ b/tests/test_union_gj.py @@ -164,6 +164,3 @@ def test_fdb_datacube_complete_overlap_v2(self): total_lons += len(leaf.values) total_vals += len(leaf.result) assert total_lons == 9 - # TODO: there is a problem somewhere when we assign the values to the nodes - # OR the problem is when we remove duplicates before giving to gribjump? Check - assert total_vals == 9