Skip to content

Commit a1cbaf5

Browse files
authored
Merge pull request #684 from hubmapconsortium/Derek-Furst/update-neo4j
Derek furst/update neo4j
2 parents ec53867 + ef458b9 commit a1cbaf5

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/requirements.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
Flask==2.1.3
2-
neo4j==4.4
1+
Flask==3.0.3
2+
neo4j==5.20.0
33
prov==2.0.0
4-
5-
# Flask 2.1.3 installs the latest Werkzeug==3.0.0 (released on 9/30/2023) and causing import issues
6-
# Use a pinned version 2.3.7 (the latest release before 3.0.0) to mitigate temporaryly
7-
# Will upgrade Flask to newer version later on across all APIs. 10/3/2023 - Zhou
8-
Werkzeug==2.3.7
4+
Werkzeug==3.0.3
95

106
# For interacting with memcached
117
pymemcache==4.0.0
@@ -14,7 +10,7 @@ pymemcache==4.0.0
1410
nested-lookup==0.2.22
1511

1612
# The commons package requires requests>=2.22.0 and PyYAML>=5.3.1
17-
requests==2.25.1
13+
requests==2.32.0
1814
PyYAML==5.4.1
1915

2016
# Use the published package from PyPI as default

src/schema/schema_neo4j_queries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def get_dataset_organ_and_donor_info(neo4j_driver, uuid):
500500
with neo4j_driver.session() as session:
501501
# To improve the query performance, we implement the two-step queries to drastically reduce the DB hits
502502
sample_query = (f"MATCH (e:Dataset)<-[:ACTIVITY_INPUT|ACTIVITY_OUTPUT*]-(s:Sample) "
503-
f"WHERE e.uuid='{uuid}' AND s.sample_category='organ' AND EXISTS(s.organ) "
503+
f"WHERE e.uuid='{uuid}' AND s.sample_category='organ' AND s.organ IS NOT NULL "
504504
f"RETURN DISTINCT s.organ AS organ_name, s.uuid AS sample_uuid")
505505

506506
logger.info("======get_dataset_organ_and_donor_info() sample_query======")
@@ -513,7 +513,7 @@ def get_dataset_organ_and_donor_info(neo4j_driver, uuid):
513513
sample_uuid = sample_record['sample_uuid']
514514

515515
donor_query = (f"MATCH (s:Sample)<-[:ACTIVITY_OUTPUT]-(a:Activity)<-[:ACTIVITY_INPUT]-(d:Donor) "
516-
f"WHERE s.uuid='{sample_uuid}' AND s.sample_category='organ' AND EXISTS(s.organ) "
516+
f"WHERE s.uuid='{sample_uuid}' AND s.sample_category='organ' AND s.organ IS NOT NULL "
517517
f"RETURN DISTINCT d.metadata AS donor_metadata")
518518

519519
logger.info("======get_dataset_organ_and_donor_info() donor_query======")

0 commit comments

Comments
 (0)