Skip to content

Commit

Permalink
clean up the code
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledk2 committed Sep 26, 2024
1 parent a26e98b commit 0f35814
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
3 changes: 0 additions & 3 deletions omero_search_engine/api/v1/resources/resource_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,6 @@ def get_resource_names(resource, name=None, description=False, data_source=None)
return build_error_message(
"This release does not support search by description."
)

print ("data source: ", data_source)

if resource != "all":
returned_results = get_the_results(resource, name, description, data_source)
else:
Expand Down
2 changes: 0 additions & 2 deletions omero_search_engine/api/v1/resources/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,6 @@ def search_index_using_search_after(
e_index, query, bookmark_, pagination_dict, return_containers, data_source=None, ret_type=None
) -> object:
#toz ya
print ("========================>>>>>>%s"%data_source)
returned_results = []
if bookmark_ and not pagination_dict:
add_paination = False
Expand Down Expand Up @@ -1190,7 +1189,6 @@ def search_resource_annotation(
query["aggs"] = json.loads(
count_attr_template.substitute(field="project_name.keyvalue")
)
print("===>>>>>>",data_source)
query["_source"] = {"includes": [""]}
res = search_index_using_search_after(
res_index,
Expand Down
10 changes: 2 additions & 8 deletions omero_search_engine/validation/results_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,11 @@ def get_results_searchengine(self, operator=None):
"""
if self.type == "buckets":
if self.name:
print ("11111111111111111111111111")
res = get_key_values_return_contents(
self.name, "image", data_source=self.data_source, csv=False
)
self.searchengine_results = json.loads(res.data)
elif self.value:
print("2222222222222222222222222222222")

self.searchengine_results = search_value_for_resource(
"image", self.value, self.data_source
)
Expand Down Expand Up @@ -800,8 +797,8 @@ def test_no_images(data_source):

headers = lines[0]
headers = headers.split("\t")
for i in range(len(headers) - 1):
print(i, headers[i])
#for i in range(len(headers) - 1):
# print(i, headers[i])
names = {}
for line in lines:
if lines.index(line) == 0:
Expand Down Expand Up @@ -1018,10 +1015,8 @@ def check_number_images_sql_containers_using_ids(data_source):
test_array.append(res.get("id"))
for ress in results:
if ress["id"] not in test_array:
print("================>>>>")
print(ress["id"])
search_omero_app.logger.info("ERROR: Not equal results")
print("=====================")
print (sql, query_data)
print ("searchengine_results:",searchengine_results)
print ("postgres_results: ",postgres_results)
Expand Down Expand Up @@ -1059,7 +1054,6 @@ def get_no_images_sql_containers(data_source, write_report=True):
for data_source_ in search_omero_app.config.database_connectors.keys():
if data_source_.lower()!=data_source.lower():
continue
print (data_source)
conn = search_omero_app.config.database_connectors[data_source]

all_names = get_resource_names("all",data_source=json.dumps(data_source))
Expand Down

0 comments on commit 0f35814

Please sign in to comment.