pyneoinstance 4.0.0__tar.gz → 4.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {pyneoinstance-4.0.0/pyneoinstance.egg-info → pyneoinstance-4.0.1}/PKG-INFO +3 -2
  2. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/__init__.py +1 -1
  3. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/database/neo4jdbms.py +7 -14
  4. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1/pyneoinstance.egg-info}/PKG-INFO +3 -2
  5. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance.egg-info/requires.txt +2 -1
  6. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyproject.toml +3 -3
  7. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/cypher_queries.yaml +3 -3
  8. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/test_util_functions.py +1 -1
  9. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/LICENSE +0 -0
  10. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/MANIFEST.in +0 -0
  11. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/README.md +0 -0
  12. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/database/__init__.py +0 -0
  13. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/database/context.py +0 -0
  14. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/fileload/__init__.py +0 -0
  15. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/fileload/helpers.py +0 -0
  16. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/fileload/loadyaml.py +0 -0
  17. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/py.typed +0 -0
  18. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/util/__init__.py +0 -0
  19. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance/util/functions.py +0 -0
  20. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance.egg-info/SOURCES.txt +0 -0
  21. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance.egg-info/dependency_links.txt +0 -0
  22. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/pyneoinstance.egg-info/top_level.txt +0 -0
  23. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/setup.cfg +0 -0
  24. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/setup.py +0 -0
  25. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/__init__.py +0 -0
  26. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/age_data.csv +0 -0
  27. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/context.py +0 -0
  28. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/load_files.yaml +0 -0
  29. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/movies.csv +0 -0
  30. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/people.csv +0 -0
  31. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/roles.csv +0 -0
  32. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/test.py +0 -0
  33. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/test_fileload.py +0 -0
  34. {pyneoinstance-4.0.0 → pyneoinstance-4.0.1}/test/test_neo4jdb.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyneoinstance
3
- Version: 4.0.0
3
+ Version: 4.0.1
4
4
  Summary: Handle Neo4j read and write transactions and provide methods for performing graph EDA
5
5
  Author-email: "Jose A. Alvarado-Guzman" <jose.alvarado-guzman@neo4j.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -694,9 +694,10 @@ Requires-Dist: neo4j-rust-ext>=5.0.0
694
694
  Requires-Dist: pandas>=1.3.0
695
695
  Requires-Dist: PyYAML>=5.1
696
696
  Requires-Dist: pyvis>=0.3.0
697
- Requires-Dist: neo4j-viz>=0.5.0
697
+ Requires-Dist: neo4j-viz>=1.0.0
698
698
  Provides-Extra: docs
699
699
  Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
700
+ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == "docs"
700
701
  Dynamic: license-file
701
702
 
702
703
  # PyNeoInstance Package
@@ -1,5 +1,5 @@
1
1
  from .database.neo4jdbms import Neo4jInstance
2
2
  from .fileload.loadyaml import load_yaml_file
3
3
 
4
- __version__ = '4.0.0'
4
+ __version__ = '4.0.1'
5
5
  __all__ = ['Neo4jInstance', 'load_yaml_file']
@@ -84,8 +84,8 @@ class Neo4jInstance:
84
84
  kwargs: Optional[Dict[str, Any]]) -> None
85
85
  Execute a write query to a specific database.
86
86
  get_query_visualization(query: str, database: Optional[str],
87
- parameters: Optional[Dict[str, Any]]) -> Network
88
- Execute a read query and return the result as a pyvis graph visualization.
87
+ parameters: Optional[Dict[str, Any]]) -> VisualizationGraph
88
+ Execute a read query and return the result as a neo4j-viz graph visualization.
89
89
  execute_write_query_with_data(self, query: str, data: DataFrame,
90
90
  database: Optional[str] = None,
91
91
  partitions: Optional[int] = 1,
@@ -110,7 +110,7 @@ class Neo4jInstance:
110
110
  Parameters
111
111
  ----------
112
112
  uri : str
113
- The Uniform Resource Identifier of the database.
113
+ The Uniform Resource Identifier of the database.
114
114
  user : str
115
115
  The Neo4j username.
116
116
  password : str
@@ -206,9 +206,7 @@ class Neo4jInstance:
206
206
 
207
207
  def get_query_visualization(self, query: str,
208
208
  database: Optional[str] = None,
209
- parameters: Optional[Dict[str, Any]] = None,
210
- node_caption: Optional[str] = 'labels',
211
- relationship_caption: Optional[str] = 'type'
209
+ parameters: Optional[Dict[str, Any]] = None
212
210
  ) -> VisualizationGraph:
213
211
  """Execute a read query and return the result as a graph visualization.
214
212
 
@@ -221,15 +219,12 @@ class Neo4jInstance:
221
219
  If not provided the default database is used.
222
220
  parameters : Dict[str, Any], optional
223
221
  Extra arguments containing optional Cypher parameters.
224
- node_caption : str, optional
225
- Node property to use as the caption. Defaults to 'labels'.
226
- relationship_caption : str, optional
227
- Relationship property to use as the caption. Defaults to 'type'.
228
222
 
229
223
  Returns
230
224
  -------
231
225
  VisualizationGraph
232
- neo4j-viz VisualizationGraph object.
226
+ neo4j-viz VisualizationGraph object. Node captions are derived
227
+ from node labels; relationship captions from relationship type.
233
228
  In a Jupyter notebook call ``vg.render()`` to display it inline.
234
229
  To save as a standalone HTML file, wrap the fragment in a full document::
235
230
 
@@ -253,9 +248,7 @@ class Neo4jInstance:
253
248
  raise ServiceUnavailable() from exception
254
249
  except ClientError as exception:
255
250
  raise ClientError(str(exception)) from exception
256
- return from_neo4j(graph,
257
- node_caption=node_caption,
258
- relationship_caption=relationship_caption)
251
+ return from_neo4j(graph)
259
252
 
260
253
  def execute_write_queries(self, queries: List[str],
261
254
  database: Optional[str] = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyneoinstance
3
- Version: 4.0.0
3
+ Version: 4.0.1
4
4
  Summary: Handle Neo4j read and write transactions and provide methods for performing graph EDA
5
5
  Author-email: "Jose A. Alvarado-Guzman" <jose.alvarado-guzman@neo4j.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -694,9 +694,10 @@ Requires-Dist: neo4j-rust-ext>=5.0.0
694
694
  Requires-Dist: pandas>=1.3.0
695
695
  Requires-Dist: PyYAML>=5.1
696
696
  Requires-Dist: pyvis>=0.3.0
697
- Requires-Dist: neo4j-viz>=0.5.0
697
+ Requires-Dist: neo4j-viz>=1.0.0
698
698
  Provides-Extra: docs
699
699
  Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
700
+ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == "docs"
700
701
  Dynamic: license-file
701
702
 
702
703
  # PyNeoInstance Package
@@ -2,7 +2,8 @@ neo4j-rust-ext>=5.0.0
2
2
  pandas>=1.3.0
3
3
  PyYAML>=5.1
4
4
  pyvis>=0.3.0
5
- neo4j-viz>=0.5.0
5
+ neo4j-viz>=1.0.0
6
6
 
7
7
  [docs]
8
8
  mkdocs-material>=9.0.0
9
+ mkdocstrings[python]>=0.24.0
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "pyneoinstance"
9
- version = "4.0.0"
9
+ version = "4.0.1"
10
10
  description = "Handle Neo4j read and write transactions and provide methods for performing graph EDA"
11
11
  readme = "README.md"
12
12
  authors = [{ name = "Jose A. Alvarado-Guzman",email = "jose.alvarado-guzman@neo4j.com" }]
@@ -25,12 +25,12 @@ dependencies = [
25
25
  "pandas>=1.3.0",
26
26
  "PyYAML>=5.1",
27
27
  "pyvis>=0.3.0",
28
- "neo4j-viz>=0.5.0"
28
+ "neo4j-viz>=1.0.0"
29
29
  ]
30
30
  requires-python = ">=3.10"
31
31
 
32
32
  [project.optional-dependencies]
33
- docs = ["mkdocs-material>=9.0.0"]
33
+ docs = ["mkdocs-material>=9.0.0", "mkdocstrings[python]>=0.24.0"]
34
34
 
35
35
  [tool.setuptools.packages.find]
36
36
  exclude = ["test*"]
@@ -1,7 +1,7 @@
1
- database: test
1
+ database: neo4j
2
2
  pre_ingest:
3
- - CREATE CONSTRAINT nkPerson IF NOT EXISTS FOR(n:Person) REQUIRE (n.personId) IS NODE KEY;
4
- - CREATE CONSTRAINT nkMovie IF NOT EXISTS FOR(n:Movie) REQUIRE (n.movieId) IS NODE KEY;
3
+ - CREATE CONSTRAINT nkPerson IF NOT EXISTS FOR(n:Person) REQUIRE (n.personId) IS UNIQUE;
4
+ - CREATE CONSTRAINT nkMovie IF NOT EXISTS FOR(n:Movie) REQUIRE (n.movieId) IS UNIQUE;
5
5
 
6
6
  queries:
7
7
  load_person: |
@@ -65,7 +65,7 @@ class TestUtilFunctions(unittest.TestCase):
65
65
 
66
66
  def test_get_batches(self):
67
67
  batch_size = 100_000
68
- data = pd.read_csv(os.path.join(test_dir,'age_data.csv'))
68
+ data = pd.read_csv(os.path.join(test_dir,'people.csv'))
69
69
  batches = util.get_batches(data, batch_size)
70
70
  records = data.shape[0]
71
71
  remainder = records % batch_size
File without changes
File without changes
File without changes
File without changes
File without changes