Skip to content

Commit 46b0d0a

Browse files
committed
v 0.6.1
1 parent df755b4 commit 46b0d0a

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
Release dates are in YYYY-MM-DD
88

9+
## [0.6.1] - 2022-07-25
10+
11+
- Fix base_blocks_list passed to the compute engine.
12+
913
## [0.6.0] - 2022-07-19
1014

1115
- Add option to categories the Blocks with a category in a sub-menu in the context menu on right-click>add-node.

barfi/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ def st_barfi(base_blocks: Union[List[Block], Dict], load_schema: str = None, com
6161

6262
if isinstance(base_blocks, List):
6363
base_blocks_data = [block._export() for block in base_blocks]
64+
base_blocks_list = base_blocks
6465
elif isinstance(base_blocks, Dict):
6566
base_blocks_data = []
67+
base_blocks_list = []
6668
for category, block_list in base_blocks.items():
6769
if isinstance(block_list, List):
6870
for block in block_list:
71+
base_blocks_list.append(block)
6972
block_data = block._export()
7073
block_data['category'] = category
7174
base_blocks_data.append(block_data)
@@ -82,13 +85,13 @@ def st_barfi(base_blocks: Union[List[Block], Dict], load_schema: str = None, com
8285

8386
if _from_client['command'] == 'execute':
8487
if compute_engine:
85-
_ce = ComputeEngine(blocks=base_blocks)
88+
_ce = ComputeEngine(blocks=base_blocks_list)
8689
_ce.add_editor_state(_from_client['editor_state'])
8790
_ce._map_block_link()
8891
_ce._execute_compute()
8992
return _ce.get_result()
9093
else:
91-
_ce = ComputeEngine(blocks=base_blocks)
94+
_ce = ComputeEngine(blocks=base_blocks_list)
9295
_ce.add_editor_state(_from_client['editor_state'])
9396
_ce._map_block_link()
9497
# return _ce.get_result()

barfi/compute_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _map_block_link(self):
4343

4444
for _block in self._editor_state['nodes']:
4545

46-
# Create a child block object for the active the block and associate with its id
46+
# Create a child block object for the active block and associate with its id
4747
_parent_block = next(
4848
_b for _b in self._blocks if _b._type == _block['type'])
4949
# Create an independent deep copy of the parent block type

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setuptools.setup(
1111
name="barfi",
12-
version="0.6.0",
12+
version="0.6.1",
1313
author="Adithya Krishnan",
1414
author_email="krishsandeep@gmail.com",
1515
description="Framework for a graphical programming environment.",

tests/test_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
compute_engine = st.checkbox('Activate barfi compute engine', value=False)
1212

13-
barfi_result = st_barfi(base_blocks=base_blocks, compute_engine=compute_engine,
13+
barfi_result = st_barfi(base_blocks=base_blocks_category, compute_engine=compute_engine,
1414
load_schema=barfi_schema_name)
1515

1616
if barfi_result:

0 commit comments

Comments
 (0)