From d88bf35847e7595baf8dddf6a48a9f0b3ed686cb Mon Sep 17 00:00:00 2001 From: Marius Conjeaud Date: Thu, 5 Dec 2024 15:42:31 +0100 Subject: [PATCH 1/3] Add rust driver extension and prepare 5.4.2 rc --- .github/workflows/integration-tests.yml | 6 +++++- Changelog | 3 +++ README.md | 8 ++++++-- doc/source/configuration.rst | 2 +- pyproject.toml | 14 ++++++++++---- requirements-dev.txt | 5 ++--- requirements.txt | 2 +- 7 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7e6f23d0..867a7311 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -31,7 +31,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e '.[dev,pandas,numpy]' + pip install -e '.[dev,extras]' - name: Test with pytest env: AURA_TEST_DB_USER: ${{ secrets.AURA_TEST_DB_USER }} @@ -39,6 +39,10 @@ jobs: AURA_TEST_DB_HOSTNAME: ${{ secrets.AURA_TEST_DB_HOSTNAME }} run: | pytest --cov=neomodel --cov-report=html:coverage_report + - name: Install neo4j-rust-ext and verify it is installed + run: | + pip install -e '.[rust-driver-ext]' + pip list | grep neo4j-rust-ext || exit 1 - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: diff --git a/Changelog b/Changelog index 91170523..8bb5c08b 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +Vesion 5.4.2 2024-12 +* Add support for Neo4j Rust driver extension : pip install neomodel['rust-driver-ext'] + Version 5.4.1 2024-11 * Add support for Cypher parallel runtime * Add options for intermediate_transform : distinct, include_in_return, use a prop as source diff --git a/README.md b/README.md index 101e2cba..cf323c73 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,13 @@ Install from pypi (recommended): $ pip install neomodel ($ source dev # To install all things needed in a Python3 venv) - # Neomodel has some optional dependencies (including Shapely), to install these use: + # neomodel can use the Rust extension to the Neo4j driver for faster transport, to install use: - $ pip install neomodel['extras'] + $ pip install neomodel['rust-driver-ext'] + + # neomodel has some optional dependencies (Shapely, pandas, numpy), to install these use: + + $ pip install neomodel['extras, rust-driver-ext'] To install from github: diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 7c178c29..69f0f2db 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -32,7 +32,7 @@ Adjust driver configuration - these options are only available for this connecti config.MAX_TRANSACTION_RETRY_TIME = 30.0 # default config.RESOLVER = None # default config.TRUST = neo4j.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES # default - config.USER_AGENT = neomodel/v5.4.1 # default + config.USER_AGENT = neomodel/v5.4.2 # default Setting the database name, if different from the default one:: diff --git a/pyproject.toml b/pyproject.toml index 99335e40..a527036b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,9 +22,9 @@ classifiers = [ "Topic :: Database", ] dependencies = [ - "neo4j~=5.26.0", + "neo4j~=5.27.0", ] -requires-python = ">=3.8" +requires-python = ">=3.9" dynamic = ["version"] [project.urls] @@ -33,6 +33,11 @@ repository = "http://github.com/neo4j-contrib/neomodel" changelog = "https://github.com/neo4j-contrib/neomodel/releases" [project.optional-dependencies] +extras = [ + "shapely", + "pandas", + "numpy" +] dev = [ "unasync", "pytest>=7.1", @@ -41,11 +46,12 @@ dev = [ "pytest-mock", "pre-commit", "black", - "isort", - "Shapely>=2.0.0" + "isort" ] +shapely = ["Shapely>=2.0.0"] pandas = ["pandas"] numpy = ["numpy"] +rust-driver-ext = ["neo4j-rust-ext==5.27.0.0"] [build-system] requires = ["setuptools>=68"] diff --git a/requirements-dev.txt b/requirements-dev.txt index ad82ba50..e5a19c87 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ # neomodel --e .[pandas,numpy] +-e .[extras] unasync>=0.5.0 pytest>=7.1 @@ -8,5 +8,4 @@ pytest-cov>=4.0 pytest-mock pre-commit black -isort -Shapely>=2.0.0 \ No newline at end of file +isort \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e7a3f522..e068f61c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -neo4j~=5.26.0 +neo4j~=5.27.0 From ce7f71848cbbb75837361b6bef539e749a67cd2a Mon Sep 17 00:00:00 2001 From: Marius Conjeaud Date: Thu, 5 Dec 2024 15:50:10 +0100 Subject: [PATCH 2/3] Simply pip install in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf323c73..c7dc01d0 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,11 @@ Install from pypi (recommended): # neomodel can use the Rust extension to the Neo4j driver for faster transport, to install use: - $ pip install neomodel['rust-driver-ext'] + $ pip install neomodel[rust-driver-ext] # neomodel has some optional dependencies (Shapely, pandas, numpy), to install these use: - $ pip install neomodel['extras, rust-driver-ext'] + $ pip install neomodel[extras, rust-driver-ext] To install from github: From 4941d1d357c29efc4ed5f0255dc6aa5aa86c984c Mon Sep 17 00:00:00 2001 From: Marius Conjeaud Date: Thu, 5 Dec 2024 15:50:44 +0100 Subject: [PATCH 3/3] Update changelog --- Changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 8bb5c08b..4f78f667 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,5 @@ Vesion 5.4.2 2024-12 -* Add support for Neo4j Rust driver extension : pip install neomodel['rust-driver-ext'] +* Add support for Neo4j Rust driver extension : pip install neomodel[rust-driver-ext] Version 5.4.1 2024-11 * Add support for Cypher parallel runtime