Skip to content

Commit 6d8abfe

Browse files
committed
Update finishline.py according to slight change in dash_building_blocks latest api
1 parent 51476d7 commit 6d8abfe

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

finishline/finishline.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ def register_vis(self, name, layout):
6262
}
6363

6464

65-
def register_data(self, name, input=None, state=None, data=None, on_update=None):
65+
def register_data(self, name, inputs=None, state=None, data=None, on_update=None):
6666

6767
self.client_data[name] = {
6868
'data': data or {},
6969
'src_file': self._curr_file
7070
}
7171

72-
ret = self.store.register(name, input=input, state=state, initially=data)
72+
ret = self.store.register(name, inputs=inputs, state=state, initially=data)
7373

7474
if on_update:
7575
@self.app.callback(
@@ -93,7 +93,7 @@ def generate_layout(self, components=gc, layouts=None, cols=None):
9393

9494
@self.register_data(
9595
page_config,
96-
input=[Input(page_layout, 'layouts')],
96+
inputs=[Input(page_layout, 'layouts')],
9797
data=layouts,
9898
on_update=self.on_layout_change
9999
)
@@ -139,7 +139,7 @@ def load_plugins(self, plugins_path='plugins/*'):
139139
modules = sorted(glob.glob(plugins_path))
140140

141141
for m in modules:
142-
print(m)
142+
# print(m)
143143
fname = m + '/__init__.py'
144144
if not os.path.isfile(fname):
145145
continue
@@ -149,7 +149,7 @@ def load_plugins(self, plugins_path='plugins/*'):
149149

150150
self.extra_files.append(fname) #TODO walk all py files in dir
151151
spec = importlib.util.spec_from_file_location(m, fname)
152-
print(spec)
152+
# print(spec)
153153
plugin = importlib.util.module_from_spec(spec)
154154

155155
try:
@@ -158,7 +158,8 @@ def load_plugins(self, plugins_path='plugins/*'):
158158
except:
159159
traceback.print_exc()
160160
print("Unexpected error in plugin, ", m, ": ", sys.exc_info()[0])
161-
self.register_vis(m, html.Pre("Unexpected error in " + m + '\n' + traceback.format_exc()));
161+
self.register_vis(m, html.Pre("Unexpected error in " + m + '\n' + traceback.format_exc()))
162+
# TODO: register 'XXX' instead of 'plugin/XXX'
162163

163164
self.plugins[m] = plugin
164165

@@ -202,5 +203,10 @@ def register(self, name, block):
202203

203204

204205
def __getitem__(self, name):
205-
print(self._blocks.keys())
206+
207+
return self._blocks[name]
208+
209+
210+
def __getattr__(self, name):
211+
206212
return self._blocks[name]

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def readme():
66

77
configuration = {
88
'name' : 'finishline',
9-
'version': '0.0.2',
9+
'version': '0.0.3',
1010
'description' : 'Framework for Building Beautiful and Functional Dashbords',
1111
'long_description' : readme(),
1212
'classifiers' : [
@@ -39,4 +39,4 @@ def readme():
3939
'data_files' : ()
4040
}
4141

42-
setup(**configuration)
42+
setup(**configuration)

0 commit comments

Comments
 (0)