neo4j-contrib / neomodel

An Object Graph Mapper (OGM) for the Neo4j graph database.
https://neomodel.readthedocs.io
MIT License
939 stars 231 forks source link

Add option to pass driver instead of database_url #744

Closed mariusconjeaud closed 10 months ago

mariusconjeaud commented 1 year ago

Work in progress.

config.py accepts a neo4j driver instead of a DATABASE_URL variable.

Adds close_connection method to db.

Adds a DATABASE_NAME config option, available for both URL and driver init methods

Fixes tests.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (970dae6) 88.74% compared to head (b679c52) 86.34%.

:exclamation: Current head b679c52 differs from pull request most recent head 4b7335f. Consider uploading reports for the commit 4b7335f to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## rc/5.2.0 #744 +/- ## ============================================ - Coverage 88.74% 86.34% -2.40% ============================================ Files 22 19 -3 Lines 2629 2416 -213 ============================================ - Hits 2333 2086 -247 - Misses 296 330 +34 ``` | [Files](https://app.codecov.io/gh/neo4j-contrib/neomodel/pull/744?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neo4j-contrib) | Coverage Δ | | |---|---|---| | [neomodel/\_version.py](https://app.codecov.io/gh/neo4j-contrib/neomodel/pull/744?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neo4j-contrib#diff-bmVvbW9kZWwvX3ZlcnNpb24ucHk=) | `100.00% <100.00%> (ø)` | | | [neomodel/config.py](https://app.codecov.io/gh/neo4j-contrib/neomodel/pull/744?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neo4j-contrib#diff-bmVvbW9kZWwvY29uZmlnLnB5) | `100.00% <ø> (ø)` | | | [neomodel/util.py](https://app.codecov.io/gh/neo4j-contrib/neomodel/pull/744?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neo4j-contrib#diff-bmVvbW9kZWwvdXRpbC5weQ==) | `91.55% <96.66%> (+0.26%)` | :arrow_up: | | [neomodel/scripts/neomodel\_install\_labels.py](https://app.codecov.io/gh/neo4j-contrib/neomodel/pull/744?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neo4j-contrib#diff-bmVvbW9kZWwvc2NyaXB0cy9uZW9tb2RlbF9pbnN0YWxsX2xhYmVscy5weQ==) | `0.00% <0.00%> (-85.72%)` | :arrow_down: | | [neomodel/scripts/neomodel\_remove\_labels.py](https://app.codecov.io/gh/neo4j-contrib/neomodel/pull/744?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neo4j-contrib#diff-bmVvbW9kZWwvc2NyaXB0cy9uZW9tb2RlbF9yZW1vdmVfbGFiZWxzLnB5) | `0.00% <0.00%> (-88.89%)` | :arrow_down: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/neo4j-contrib/neomodel/pull/744/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neo4j-contrib)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 12 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] commented 10 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication