Skip to content

Commit

Permalink
160 make dag progress bar optional (#162)
Browse files Browse the repository at this point in the history
* closes #160. progress bar optional, plus untested dag bugfix.

* closes #160. second dag bugfix.
  • Loading branch information
elphick authored May 16, 2024
1 parent 0d984d7 commit 430d9d2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Mass_Composition 0.6.2 (2024-05-16)
===================================

Bugfix
------

- Second fix for DAG.run ValueError('generator already running') - managed result type. (160a)


Mass_Composition 0.6.1 (2024-05-16)
===================================

Expand Down
8 changes: 7 additions & 1 deletion elphick/mass_composition/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,13 @@ def execute_node(self, node: str, strms: dict):
for successor in self.graph.successors(node):
updated_edges[(node, successor)] = result

return node, list(result), updated_edges
# Check the type of the result
if isinstance(result, MassComposition):
# If the result is a Stream object, return it as is
return node, result, updated_edges
else:
# If the result is a generator or a tuple of Stream objects, convert it to a list
return node, list(result), updated_edges

def plot(self):
plt.figure(figsize=(8, 6))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mass-composition"
version = "0.6.1"
version = "0.6.2"
description = "For managing multi-dimensional mass-composition datasets, supporting weighted mathematical operations and visualisation."
authors = ["Greg <greg@elphick.com.au>"]
packages = [{ include = "elphick/mass_composition" }]
Expand Down
3 changes: 0 additions & 3 deletions scripts/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

def run_command(command):
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
print(f"stdout: {stdout.decode()}")
print(f"stderr: {stderr.decode()}")
process.wait()


Expand Down

0 comments on commit 430d9d2

Please sign in to comment.