memory-graph 0.3.70__tar.gz → 0.3.71__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.
- {memory_graph-0.3.70 → memory_graph-0.3.71}/PKG-INFO +8 -5
- {memory_graph-0.3.70 → memory_graph-0.3.71}/README.md +7 -4
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/__init__.py +1 -1
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/memory_to_nodes.py +6 -4
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph.egg-info/PKG-INFO +8 -5
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph.egg-info/SOURCES.txt +1 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/pyproject.toml +1 -1
- memory_graph-0.3.71/setup.py +7 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/LICENSE.txt +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/call_stack.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/config.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/config_default.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/config_helpers.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/extension_numpy.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/extension_pandas.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/extension_torch.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/html_table.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/list_view.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/node_base.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/node_key_value.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/node_leaf.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/node_linear.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/node_table.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/sequence.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/slicer.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/slices.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/slices_iterator.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/slices_table_iterator.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/test.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/test_max_graph_depth.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/test_memory_graph.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/test_memory_to_nodes.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/test_sequence.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/test_slicer.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/test_slices.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/test_slices_iterator.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph/utils.py +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph.egg-info/dependency_links.txt +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph.egg-info/requires.txt +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/memory_graph.egg-info/top_level.txt +0 -0
- {memory_graph-0.3.70 → memory_graph-0.3.71}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memory_graph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.71
|
|
4
4
|
Summary: Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy.
|
|
5
5
|
Author-email: Bas Terwijn <bterwijn@gmail.com>
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -1045,10 +1045,10 @@ import memory_graph as mg
|
|
|
1045
1045
|
class MyClass:
|
|
1046
1046
|
def __init__(self):
|
|
1047
1047
|
self.children = {i: [i]*10 for i in range(5)}
|
|
1048
|
-
|
|
1049
1048
|
a = 1
|
|
1050
|
-
b = (1,2,3)
|
|
1049
|
+
b = (1, 2, 3)
|
|
1051
1050
|
c = MyClass()
|
|
1051
|
+
d = (4, 5, 6, 7)
|
|
1052
1052
|
|
|
1053
1053
|
mg.l()
|
|
1054
1054
|
```
|
|
@@ -1064,10 +1064,13 @@ class MyClass:
|
|
|
1064
1064
|
self.children = {i: [i]*10 for i in range(5)}
|
|
1065
1065
|
|
|
1066
1066
|
a = 1
|
|
1067
|
-
b = (1,2,3)
|
|
1067
|
+
b = (1, 2, 3)
|
|
1068
1068
|
c = MyClass()
|
|
1069
|
+
d = (4, 5, 6, 7)
|
|
1069
1070
|
|
|
1070
|
-
|
|
1071
|
+
# for better graph readability in large graphs:
|
|
1072
|
+
mg.collapse_type(type(c)) # collapse type(c)
|
|
1073
|
+
mg.collapse_type(id(d)) # collapse id(d)
|
|
1071
1074
|
mg.l()
|
|
1072
1075
|
```
|
|
1073
1076
|

|
|
@@ -1025,10 +1025,10 @@ import memory_graph as mg
|
|
|
1025
1025
|
class MyClass:
|
|
1026
1026
|
def __init__(self):
|
|
1027
1027
|
self.children = {i: [i]*10 for i in range(5)}
|
|
1028
|
-
|
|
1029
1028
|
a = 1
|
|
1030
|
-
b = (1,2,3)
|
|
1029
|
+
b = (1, 2, 3)
|
|
1031
1030
|
c = MyClass()
|
|
1031
|
+
d = (4, 5, 6, 7)
|
|
1032
1032
|
|
|
1033
1033
|
mg.l()
|
|
1034
1034
|
```
|
|
@@ -1044,10 +1044,13 @@ class MyClass:
|
|
|
1044
1044
|
self.children = {i: [i]*10 for i in range(5)}
|
|
1045
1045
|
|
|
1046
1046
|
a = 1
|
|
1047
|
-
b = (1,2,3)
|
|
1047
|
+
b = (1, 2, 3)
|
|
1048
1048
|
c = MyClass()
|
|
1049
|
+
d = (4, 5, 6, 7)
|
|
1049
1050
|
|
|
1050
|
-
|
|
1051
|
+
# for better graph readability in large graphs:
|
|
1052
|
+
mg.collapse_type(type(c)) # collapse type(c)
|
|
1053
|
+
mg.collapse_type(id(d)) # collapse id(d)
|
|
1051
1054
|
mg.l()
|
|
1052
1055
|
```
|
|
1053
1056
|

|
|
@@ -20,9 +20,11 @@ def read_nodes(data):
|
|
|
20
20
|
- the id of 'data' as root node.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
-
def data_to_node(data_type, data):
|
|
24
|
-
""" Returns the Node for 'data' based on it's type. """
|
|
25
|
-
if
|
|
23
|
+
def data_to_node(data_id, data_type, data):
|
|
24
|
+
""" Returns the Node for 'data' based on it's id or type. """
|
|
25
|
+
if data_id in config.type_to_node: # for ids
|
|
26
|
+
return config.type_to_node[data_id](data)
|
|
27
|
+
elif data_type in config.type_to_node: # for predefined types
|
|
26
28
|
return config.type_to_node[data_type](data)
|
|
27
29
|
elif utils.has_dict_attributes(data): # for user defined classes
|
|
28
30
|
return Node_Key_Value(data, utils.filter_dict(utils.get_dict_attributes(data)) )
|
|
@@ -41,7 +43,7 @@ def read_nodes(data):
|
|
|
41
43
|
if data_id in nodes:
|
|
42
44
|
node = nodes[data_id]
|
|
43
45
|
else:
|
|
44
|
-
node = data_to_node(data_type, data)
|
|
46
|
+
node = data_to_node(data_id, data_type, data)
|
|
45
47
|
if isinstance(node, Node_Key_Value):
|
|
46
48
|
nodes_key_value.append(data_id)
|
|
47
49
|
nodes[data_id] = node
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memory_graph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.71
|
|
4
4
|
Summary: Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy.
|
|
5
5
|
Author-email: Bas Terwijn <bterwijn@gmail.com>
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -1045,10 +1045,10 @@ import memory_graph as mg
|
|
|
1045
1045
|
class MyClass:
|
|
1046
1046
|
def __init__(self):
|
|
1047
1047
|
self.children = {i: [i]*10 for i in range(5)}
|
|
1048
|
-
|
|
1049
1048
|
a = 1
|
|
1050
|
-
b = (1,2,3)
|
|
1049
|
+
b = (1, 2, 3)
|
|
1051
1050
|
c = MyClass()
|
|
1051
|
+
d = (4, 5, 6, 7)
|
|
1052
1052
|
|
|
1053
1053
|
mg.l()
|
|
1054
1054
|
```
|
|
@@ -1064,10 +1064,13 @@ class MyClass:
|
|
|
1064
1064
|
self.children = {i: [i]*10 for i in range(5)}
|
|
1065
1065
|
|
|
1066
1066
|
a = 1
|
|
1067
|
-
b = (1,2,3)
|
|
1067
|
+
b = (1, 2, 3)
|
|
1068
1068
|
c = MyClass()
|
|
1069
|
+
d = (4, 5, 6, 7)
|
|
1069
1070
|
|
|
1070
|
-
|
|
1071
|
+
# for better graph readability in large graphs:
|
|
1072
|
+
mg.collapse_type(type(c)) # collapse type(c)
|
|
1073
|
+
mg.collapse_type(id(d)) # collapse id(d)
|
|
1071
1074
|
mg.l()
|
|
1072
1075
|
```
|
|
1073
1076
|

|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "memory_graph"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.71"
|
|
8
8
|
description = "Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy."
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Bas Terwijn", email = "bterwijn@gmail.com"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|