memory-graph 0.3.1__tar.gz → 0.3.2__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 (38) hide show
  1. {memory_graph-0.3.1 → memory_graph-0.3.2}/PKG-INFO +2 -2
  2. {memory_graph-0.3.1 → memory_graph-0.3.2}/README.md +1 -1
  3. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/__init__.py +1 -1
  4. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/memory_to_nodes.py +3 -2
  5. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/node_base.py +6 -0
  6. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph.egg-info/PKG-INFO +2 -2
  7. {memory_graph-0.3.1 → memory_graph-0.3.2}/setup.py +1 -1
  8. {memory_graph-0.3.1 → memory_graph-0.3.2}/LICENSE.txt +0 -0
  9. {memory_graph-0.3.1 → memory_graph-0.3.2}/MANIFEST.in +0 -0
  10. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/config.py +0 -0
  11. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/config_default.py +0 -0
  12. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/config_helpers.py +0 -0
  13. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/extension_numpy.py +0 -0
  14. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/extension_pandas.py +0 -0
  15. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/html_table.py +0 -0
  16. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/list_view.py +0 -0
  17. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/node_key_value.py +0 -0
  18. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/node_linear.py +0 -0
  19. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/node_table.py +0 -0
  20. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/sequence.py +0 -0
  21. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/slicer.py +0 -0
  22. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/slices.py +0 -0
  23. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/slices_iterator.py +0 -0
  24. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/slices_table_iterator.py +0 -0
  25. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/t.py +0 -0
  26. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/test.py +0 -0
  27. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/test_memory_graph.py +0 -0
  28. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/test_memory_to_nodes.py +0 -0
  29. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/test_sequence.py +0 -0
  30. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/test_slicer.py +0 -0
  31. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/test_slices.py +0 -0
  32. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/test_slices_iterator.py +0 -0
  33. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph/utils.py +0 -0
  34. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph.egg-info/SOURCES.txt +0 -0
  35. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph.egg-info/dependency_links.txt +0 -0
  36. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph.egg-info/requires.txt +0 -0
  37. {memory_graph-0.3.1 → memory_graph-0.3.2}/memory_graph.egg-info/top_level.txt +0 -0
  38. {memory_graph-0.3.1 → memory_graph-0.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: memory_graph
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Draws a graph of your data to analyze its structure.
5
5
  Home-page: https://github.com/bterwijn/memory_graph
6
6
  Author: Bas Terwijn
@@ -131,7 +131,7 @@ The [Python Data Model](https://docs.python.org/3/reference/datamodel.html) make
131
131
  In the code below variable `a` and `b` both reference the same `int` value 10. An `int` is an immutable type and therefore when we change variable `a` its value can **not** be mutated in place, and thus a copy is made and `a` and `b` reference a different value afterwards.
132
132
  ```python
133
133
  import memory_graph
134
- memory_graph.config.not_node_types.remove(int) # show references to ints
134
+ memory_graph.config.no_reference_types.pop(int, None) # show references to ints
135
135
 
136
136
  a = 10
137
137
  b = a
@@ -112,7 +112,7 @@ The [Python Data Model](https://docs.python.org/3/reference/datamodel.html) make
112
112
  In the code below variable `a` and `b` both reference the same `int` value 10. An `int` is an immutable type and therefore when we change variable `a` its value can **not** be mutated in place, and thus a copy is made and `a` and `b` reference a different value afterwards.
113
113
  ```python
114
114
  import memory_graph
115
- memory_graph.config.not_node_types.remove(int) # show references to ints
115
+ memory_graph.config.no_reference_types.pop(int, None) # show references to ints
116
116
 
117
117
  a = 10
118
118
  b = a
@@ -9,7 +9,7 @@ import sys
9
9
 
10
10
  import graphviz
11
11
 
12
- __version__ = "0.3.01"
12
+ __version__ = "0.3.02"
13
13
  __author__ = 'Bas Terwijn'
14
14
 
15
15
  log_file=sys.stdout
@@ -31,7 +31,8 @@ def read_nodes(data):
31
31
  for index in node.get_children().indices_all():
32
32
  child = node.get_children()[index]
33
33
  memory_to_nodes_recursive(nodes, child, node, index)
34
- node.add_parent_index(parent, parent_index)
34
+ if not parent is None:
35
+ node.add_parent_index(parent, parent_index)
35
36
 
36
37
  nodes = {}
37
38
  memory_to_nodes_recursive(nodes, data, None, None)
@@ -135,7 +136,7 @@ def add_to_graphviz_graph(graphviz_graph, nodes, node, slices, id_to_slices, sub
135
136
  html_table = node.get_html_table(nodes, slices, id_to_slices)
136
137
  edges = html_table.get_edges()
137
138
  color = config_helpers.get_color(node)
138
- border = 1 #3 if node.is_root() else 1 # TODO
139
+ border = 3 if node.is_root() else 1
139
140
  graphviz_graph.node(node.get_name(),
140
141
  html_table.to_string(border, color),
141
142
  xlabel=node.get_label(slices))
@@ -30,6 +30,12 @@ class Node_Base:
30
30
  self.parent_indices[parent] = []
31
31
  self.parent_indices[parent].append(parent_index)
32
32
 
33
+ def is_root(self):
34
+ """
35
+ Return if the node is the root node.
36
+ """
37
+ return len(self.parent_indices) == 0
38
+
33
39
  def get_parent_indices(self):
34
40
  return self.parent_indices
35
41
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: memory-graph
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Draws a graph of your data to analyze its structure.
5
5
  Home-page: https://github.com/bterwijn/memory_graph
6
6
  Author: Bas Terwijn
@@ -131,7 +131,7 @@ The [Python Data Model](https://docs.python.org/3/reference/datamodel.html) make
131
131
  In the code below variable `a` and `b` both reference the same `int` value 10. An `int` is an immutable type and therefore when we change variable `a` its value can **not** be mutated in place, and thus a copy is made and `a` and `b` reference a different value afterwards.
132
132
  ```python
133
133
  import memory_graph
134
- memory_graph.config.not_node_types.remove(int) # show references to ints
134
+ memory_graph.config.no_reference_types.pop(int, None) # show references to ints
135
135
 
136
136
  a = 10
137
137
  b = a
@@ -7,7 +7,7 @@ long_description_from_readme = (this_directory / "README.md").read_text()
7
7
 
8
8
  setup(
9
9
  name = 'memory_graph',
10
- version = '0.3.01',
10
+ version = '0.3.02',
11
11
  description = 'Draws a graph of your data to analyze its structure.',
12
12
  long_description = long_description_from_readme,
13
13
  long_description_content_type = 'text/markdown',
File without changes
File without changes
File without changes