Skip to content

Commit

Permalink
re-enable connectivity queries against unfiltered table in public dat…
Browse files Browse the repository at this point in the history
…aset
  • Loading branch information
schlegelp committed Apr 9, 2024
1 parent 6bb8b97 commit 8eba09b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
10 changes: 0 additions & 10 deletions fafbseg/flywire/synapses.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,6 @@ def get_synapses(
if not pre and not post:
raise ValueError("`pre` and `post` must not both be False")

if dataset in ("public",) and not filtered:
raise ValueError(
"Unable to query unfiltered synapses for the public " "release data."
)

if isinstance(materialization, str):
if materialization not in ("latest", "live", "auto"):
raise ValueError(
Expand Down Expand Up @@ -775,11 +770,6 @@ def get_adjacency(
if isinstance(targets, type(None)):
targets = sources

if dataset in ("public",) and not filtered:
raise ValueError(
"Unable to query unfiltered synapses for the public " "release data."
)

if isinstance(materialization, str):
if materialization not in ("latest", "live", "auto"):
raise ValueError(
Expand Down
10 changes: 9 additions & 1 deletion fafbseg/flywire/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,15 @@ def get_cave_client(*, dataset=None, token=None, check_stale=True,
cave_clients[datastack] = CAVEclient(datastack, auth_token=token)
cave_clients[datastack]._created_at = dt.datetime.now()

return cave_clients[datastack]
# The public datastack configuration currently does not set the .synapse_table
# That's intentional to avoid people using it - they are supposed to use the filtered view
# However, we want to enable our users to do that if they want, so we will add it back
client = cave_clients[datastack]
if client.materialize.synapse_table is None:
if "synapses_nt_v1" in client.materialize.get_tables():
client.materialize.synapse_table = "synapses_nt_v1"

return client


def get_chunkedgraph_secret(domain=('global.daf-apis.com', 'prod.flywire-daf.com')):
Expand Down

0 comments on commit 8eba09b

Please sign in to comment.