Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 🎨 Add persistent colors #276

Merged
merged 21 commits into from
Feb 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b917251
:tada: :art: Add persitent colors
MathisFederico Feb 16, 2022
8fc2034
:hammer: Refactor ExecutableBlock.run_state using Enum
MathisFederico Feb 16, 2022
793b9fb
:hammer: Add Executable class
MathisFederico Feb 16, 2022
532b9ab
:wrench: Update mnist example
MathisFederico Feb 16, 2022
dbd1073
:art: Make the outline more visible
FabienRoger Feb 17, 2022
cad6fa2
:beetle: Don't mark blocks as executed after execution was canceled
FabienRoger Feb 17, 2022
2665ce2
:sparkles: Correct typing
FabienRoger Feb 17, 2022
51d8c6d
:sparkles: Remove useless import
FabienRoger Feb 17, 2022
e404261
:beetle: Fix multiple execution bug
FabienRoger Feb 18, 2022
4d01d8d
:sparkles: Remove unused variable
FabienRoger Feb 18, 2022
ceee345
:art: Changed selection and running/pending colors
MathisFederico Feb 19, 2022
63beaf0
:beetle: Run right now relauch next blocks even if they were done
MathisFederico Feb 19, 2022
f145bd0
:memo: Add executable docstrings
MathisFederico Feb 19, 2022
56ddc56
:sparkles: Fix pylint issues
MathisFederico Feb 19, 2022
746c450
:wrench: Refactor custom_bfs
MathisFederico Feb 19, 2022
3fbfc68
:wrench: Refactor right_traversal
MathisFederico Feb 19, 2022
c6dfbf2
Merge remote-tracking branch 'origin/dev' into feature/persistent_colors
MathisFederico Feb 19, 2022
0d58e55
:memo: Add missing docstrings
MathisFederico Feb 19, 2022
25a5c05
:sparkles: Fix some pylint issues
MathisFederico Feb 19, 2022
0d78e96
:art: Make the pending outline more visible
FabienRoger Feb 19, 2022
a2824b4
Merge remote-tracking branch 'origin/feature/persistent_colors' into …
FabienRoger Feb 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
✨ Fix pylint issues
  • Loading branch information
MathisFederico committed Feb 19, 2022
commit 56ddc56cd9e01adb8fdec22d14546d3cd3b87d9f
6 changes: 3 additions & 3 deletions pyflow/blocks/executableblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def custom_bfs(self, start_node, reverse=False):
# Blocks to run in topological order
blocks_to_run: List["ExecutableBlock"] = []
# List of lists of blocks/edges to animate in order
to_transmit: List[List[Union["ExecutableBlock", "Edge"]]] = [[start_node]]
to_transmit: List[List[Union["ExecutableBlock", Edge]]] = [[start_node]]

to_visit: List["ExecutableBlock"] = [start_node]
while to_visit:
Expand Down Expand Up @@ -200,7 +200,7 @@ def right_traversal(self):
list: each element is a list of blocks/edges to animate in order
"""
# Result
to_transmit: List[List[Union["ExecutableBlock", "Edge"]]] = [[self]]
to_transmit: List[List[Union["ExecutableBlock", Edge]]] = [[self]]

# To check if a block has been visited
visited: Set["ExecutableBlock"] = set([])
Expand All @@ -210,7 +210,7 @@ def right_traversal(self):
to_visit_output: Set["ExecutableBlock"] = set([self])

# Next stage to put in to_transmit
next_edges: List["Edge"] = []
next_edges: List[Edge] = []
next_blocks: List["ExecutableBlock"] = []

while to_visit_input or to_visit_output:
Expand Down
5 changes: 5 additions & 0 deletions pyflow/core/add_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def __init__(
self.setAcceptHoverEvents(True)

def set_highlight(self, value: bool) -> None:
"""Set the AddButton highlight to the given boolean value.

Args:
value (bool): New highlight value.
"""
if value:
self._brush = self._block_hover_brush
else:
Expand Down