Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt code from py2neo to remove the use of the id function in cypher queries #302

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

ianmkenney
Copy link
Member

The unmaintained py2neo package generated queries contain functions that are deprecated. In order to avoid the a torrent of deprecation warnings in the near future and broken functionality on the next major release of neo4j, we are adopting the query generators from within py2neo and modifying them to satisfy our needs in alchemiscale.

In compliance with the Apache v2.0 license, we are providing a copy of the Apache v2.0 license with our distribution and providing a NOTICE containing a log of our modifications.

Code included from py2neo is under the apache 2.0 license and therefore
we need to include a copy of apache 2.0 along with a NOTICE with
information on our changes to the code.
@dotsdl
Copy link
Member

dotsdl commented Sep 17, 2024

Closes #291.

@ianmkenney ianmkenney changed the title DNM adopt code from py2neo WIP adopt code from py2neo to remove the use of the id function in cypher queries Oct 7, 2024
@ianmkenney ianmkenney changed the title WIP adopt code from py2neo to remove the use of the id function in cypher queries Adopt code from py2neo to remove the use of the id function in cypher queries Oct 15, 2024
Our documentation is numpy style. The adopted docstrings have been
modified to be consistent.
@dotsdl dotsdl self-requested a review October 26, 2024 01:05
@ianmkenney ianmkenney marked this pull request as ready for review November 6, 2024 18:03
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 65.21739% with 8 lines in your changes missing coverage. Please review.

Project coverage is 80.18%. Comparing base (6d2dd5a) to head (d39b2eb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
alchemiscale/storage/cypher.py 61.11% 7 Missing ⚠️
alchemiscale/storage/subgraph.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #302      +/-   ##
==========================================
- Coverage   80.28%   80.18%   -0.10%     
==========================================
  Files          27       27              
  Lines        3454     3472      +18     
==========================================
+ Hits         2773     2784      +11     
- Misses        681      688       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@dotsdl dotsdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @ianmkenney! Merge when satisfied; I only found 1 typo.

NOTICE Outdated
- switched all usage of the id function to elementId

- alchemiscale/storage/subgraph.py
- Functions modified form the py2neo.data module:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Functions modified form the py2neo.data module:
- Functions modified from the py2neo.data module:

@ianmkenney ianmkenney merged commit 2cf0ab5 into main Nov 7, 2024
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecation warnings from neo4j: "The query used a deprecated function: id"
2 participants