Skip to content

Commit

Permalink
Adding debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 committed Sep 4, 2024
1 parent f46d531 commit efcdfc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vfb_connect.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: vfb_connect
Version: 2.2.7.dev6+adf6da1
Version: 2.2.7.dev7+f46d531.dirty
Summary: Wrapper for querying VirtualFlyBrain servers.
Home-page: https://github.com/VirtualFlyBrain/VFB_connect
Author: David Osumi-Sutherland
Expand Down
6 changes: 5 additions & 1 deletion src/vfb_connect/cross_server_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def get_dbs(self, include_symbols=True, data_sources_only=True, verbose=False):
symbol_query += "WHERE i.is_data_source=[True] AND (i:Site OR i:API) "
else:
symbol_query += "WHERE i:Site OR i:API "
symbol_query += "AND exists(i.symbol) AND i.symbol[0] <> '' RETURN i.symbol[0] as symbol"
symbol_query += "AND exists(i.symbol) AND not i.symbol[0] = '' RETURN i.symbol[0] as symbol"

print("Querying for external database symbols:",symbol_query) if verbose else None
symbol_results = self.cypher_query(symbol_query, return_dataframe=False, verbose=verbose)
Expand Down Expand Up @@ -1119,9 +1119,13 @@ def cypher_query(self, query, return_dataframe=True, verbose=False):
:return: A DataFrame or list of results.
:rtype: pandas.DataFrame or list of dicts
"""
print(f"Running query: {query}") if verbose else None
r = self.nc.commit_list([query])
print(r) if verbose else None
dc = dict_cursor(r)
print(dc) if verbose else None
if return_dataframe:
print("Returning DataFrame") if verbose else None
return pd.DataFrame.from_records(dc)
return dc

Expand Down

0 comments on commit efcdfc0

Please sign in to comment.