memory-graph 0.3.85__tar.gz → 0.3.86__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 (41) hide show
  1. {memory_graph-0.3.85 → memory_graph-0.3.86}/PKG-INFO +1 -1
  2. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/__init__.py +1 -1
  3. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/memory_to_nodes.py +3 -3
  4. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/slices_iterator.py +0 -15
  5. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph.egg-info/PKG-INFO +1 -1
  6. {memory_graph-0.3.85 → memory_graph-0.3.86}/pyproject.toml +1 -1
  7. {memory_graph-0.3.85 → memory_graph-0.3.86}/LICENSE.txt +0 -0
  8. {memory_graph-0.3.85 → memory_graph-0.3.86}/README.md +0 -0
  9. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/call_stack.py +0 -0
  10. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/config.py +0 -0
  11. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/config_default.py +0 -0
  12. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/config_helpers.py +0 -0
  13. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/extension_numpy.py +0 -0
  14. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/extension_pandas.py +0 -0
  15. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/extension_torch.py +0 -0
  16. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/html_table.py +0 -0
  17. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/list_view.py +0 -0
  18. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/node_base.py +0 -0
  19. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/node_key_value.py +0 -0
  20. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/node_leaf.py +0 -0
  21. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/node_linear.py +0 -0
  22. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/node_table.py +0 -0
  23. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/sequence.py +0 -0
  24. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/slicer.py +0 -0
  25. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/slices.py +0 -0
  26. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/slices_table_iterator.py +0 -0
  27. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/test.py +0 -0
  28. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/test_max_graph_depth.py +0 -0
  29. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/test_memory_graph.py +0 -0
  30. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/test_memory_to_nodes.py +0 -0
  31. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/test_sequence.py +0 -0
  32. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/test_slicer.py +0 -0
  33. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/test_slices.py +0 -0
  34. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/test_slices_iterator.py +0 -0
  35. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph/utils.py +0 -0
  36. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph.egg-info/SOURCES.txt +0 -0
  37. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph.egg-info/dependency_links.txt +0 -0
  38. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph.egg-info/requires.txt +0 -0
  39. {memory_graph-0.3.85 → memory_graph-0.3.86}/memory_graph.egg-info/top_level.txt +0 -0
  40. {memory_graph-0.3.85 → memory_graph-0.3.86}/setup.cfg +0 -0
  41. {memory_graph-0.3.85 → memory_graph-0.3.86}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memory_graph
3
- Version: 0.3.85
3
+ Version: 0.3.86
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
@@ -2,7 +2,7 @@
2
2
  # Copyright (c) 2023, Bas Terwijn.
3
3
  # SPDX-License-Identifier: BSD-2-Clause
4
4
 
5
- __version__ = "0.3.85"
5
+ __version__ = "0.3.86"
6
6
  __author__ = 'Bas Terwijn'
7
7
 
8
8
  import memory_graph.memory_to_nodes as memory_to_nodes
@@ -208,6 +208,8 @@ def build_graph(graphviz_graph, nodes, root_id, id_to_slices):
208
208
  """ Adds a subgraph to 'graphviz_graph' for 'nodes_to_subgraph'. """
209
209
  new_node_names = [node.get_name() for node in nodes_to_subgraph]
210
210
  if len(new_node_names) > 1:
211
+ if config.horizontal:
212
+ new_node_names.reverse() # reverse order for horizontal layout
211
213
  graphviz_graph.body.append('subgraph { rank=same; '+ ' -> '.join(new_node_names) + '[weight='+str(config.graph_stability)+', style=invis]; }\n')
212
214
 
213
215
  def add_to_graphviz_graph(graphviz_graph, nodes, node, slices, id_to_slices):
@@ -223,7 +225,6 @@ def build_graph(graphviz_graph, nodes, root_id, id_to_slices):
223
225
  else:
224
226
  graphviz_graph.node(node.get_name(),
225
227
  html_table.to_string(border, color, config.foreground_color))
226
- # ------------ edges
227
228
  for parent,child,dashed in edges:
228
229
  graphviz_graph.edge(parent, child+':table', style='dashed' if dashed else 'solid')
229
230
 
@@ -239,8 +240,7 @@ def build_graph(graphviz_graph, nodes, root_id, id_to_slices):
239
240
  if node_id in id_to_slices:
240
241
  slices = id_to_slices[node_id]
241
242
  if not slices is None:
242
- slices_iter = slices.reverse_iter() if config.horizontal else iter(slices)
243
- for index in slices_iter:
243
+ for index in slices:
244
244
  child_id = id(children[index])
245
245
  build_graph_depth_first(graphviz_graph, nodes, child_id, id_to_slices, nodes_at_depth, subgraphed_nodes, depth+1)
246
246
  if not node.is_hidden_node():
@@ -30,12 +30,6 @@ class Slices_Iterator1D(Slices_Iterator):
30
30
  for i in range(slices[si][0], slices[si][1]):
31
31
  yield i
32
32
 
33
- def reverse_generate(self):
34
- slices = self.slices.get_slices()
35
- for si in range(len(slices)-1, -1, -1):
36
- for i in range(slices[si][1]-1, slices[si][0]-1, -1):
37
- yield i
38
-
39
33
  def __next__(self):
40
34
  return next(self.gen)
41
35
 
@@ -57,14 +51,5 @@ class Slices_Iterator2D(Slices_Iterator):
57
51
  for col_i in range(col_slice[0], col_slice[1]):
58
52
  yield (row_i, col_i)
59
53
 
60
- def reverse_generate(self):
61
- row_slices = self.slices.get_row_slices().get_slices()
62
- col_slices = self.slices.get_col_slices().get_slices()
63
- for row_slice in reversed(row_slices):
64
- for row_i in range(row_slice[1]-1, row_slice[0]-1, -1):
65
- for col_slice in reversed(col_slices):
66
- for col_i in range(col_slice[1]-1, col_slice[0]-1, -1):
67
- yield (row_i, col_i)
68
-
69
54
  def __next__(self):
70
55
  return next(self.gen)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memory_graph
3
- Version: 0.3.85
3
+ Version: 0.3.86
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "memory_graph"
7
- version = "0.3.85"
7
+ version = "0.3.86"
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