Skip to content

Commit

Permalink
Merge branch 'rc/5.1.1' into automatic_path_inflation
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusconjeaud authored Aug 23, 2023
2 parents 69242d8 + f3eb90b commit 3196f29
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Creating Neo4j Container
run: |
chmod +x ./docker-scripts/docker-neo4j.sh
Expand Down
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Version 5.1.1 2023-08
* Add impersonation
* Bumped neo4j-driver to 5.11.0
* Improve code quality and tooling

Version 5.1.0 2023-07
Expand Down
3 changes: 2 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

import alabaster

from neomodel import __author__, __package__, __version__
from neomodel import __author__, __package__
from neomodel._version import __version__

#
# neomodel documentation build configuration file, created by
Expand Down
2 changes: 1 addition & 1 deletion doc/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Adjust driver configuration::
config.MAX_TRANSACTION_RETRY_TIME = 30.0 # default
config.RESOLVER = None # default
config.TRUST = neo4j.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES # default
config.USER_AGENT = None # default
config.USER_AGENT = neomodel/vNeo4j.Major.minor # default

Setting the database name, for neo4j >= 4::

Expand Down
1 change: 0 additions & 1 deletion neomodel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@
__email__ = "[email protected]"
__license__ = "MIT"
__package__ = "neomodel"
__version__ = "5.1.1"
1 change: 1 addition & 0 deletions neomodel/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "5.1.1"
4 changes: 3 additions & 1 deletion neomodel/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import neo4j

from ._version import __version__

AUTO_INSTALL_LABELS = False
DATABASE_URL = "bolt://neo4j:foobarbaz@localhost:7687"
FORCE_TIMEZONE = False
Expand All @@ -13,4 +15,4 @@
MAX_TRANSACTION_RETRY_TIME = 30.0
RESOLVER = None
TRUSTED_CERTIFICATES = neo4j.TrustSystemCAs()
USER_AGENT = None
USER_AGENT = f"neomodel/v{__version__}"
3 changes: 2 additions & 1 deletion neomodel/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from neo4j import DEFAULT_DATABASE, GraphDatabase, basic_auth
from neo4j.api import Bookmarks
from neo4j.debug import watch
from neo4j.exceptions import ClientError, ServiceUnavailable, SessionExpired
from neo4j.graph import Node, Relationship
from neo4j.graph import Path
Expand All @@ -24,6 +23,8 @@
)


logger = logging.getLogger(__name__)

# make sure the connection url has been set prior to executing the wrapped function
def ensure_connection(func):
def wrapper(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ classifiers = [
"Topic :: Database",
]
dependencies = [
"neo4j==5.10.0",
"neo4j==5.11.0",
"pytz>=2021.1",
"neobolt==1.7.17",
"six==1.16.0",
Expand Down
7 changes: 7 additions & 0 deletions test/test_connection.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

import pytest
from neo4j.debug import watch

from neomodel import config, db

Expand All @@ -16,6 +17,12 @@ def setup_teardown():
db.set_connection(INITIAL_URL)


@pytest.fixture(autouse=True, scope="session")
def neo4j_logging():
with watch("neo4j"):
yield


@pytest.mark.parametrize("protocol", ["neo4j+s", "neo4j+ssc", "bolt+s", "bolt+ssc"])
def test_connect_to_aura(protocol):
cypher_return = "hello world"
Expand Down

0 comments on commit 3196f29

Please sign in to comment.