Skip to content

Commit

Permalink
Merge pull request #844 from neo4j-contrib/rust-extension
Browse files Browse the repository at this point in the history
Add rust driver extension
  • Loading branch information
mariusconjeaud authored Dec 10, 2024
2 parents bbae94d + 4941d1d commit 60f84d1
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 12 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ 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 }}
AURA_TEST_DB_PASSWORD: ${{ secrets.AURA_TEST_DB_PASSWORD }}
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:
Expand Down
3 changes: 3 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion doc/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,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]
Expand All @@ -34,6 +34,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",
Expand All @@ -42,11 +47,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"]
Expand Down
5 changes: 2 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# neomodel
-e .[pandas,numpy]
-e .[extras]

unasync>=0.5.0
pytest>=7.1
Expand All @@ -8,5 +8,4 @@ pytest-cov>=4.0
pytest-mock
pre-commit
black
isort
Shapely>=2.0.0
isort
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
neo4j~=5.26.0
neo4j~=5.27.0

0 comments on commit 60f84d1

Please sign in to comment.