Skip to content

Commit 27d19cc

Browse files
committed
Added the ability to see built components from make_components. This is needed for the lava context in ngclava
1 parent c098087 commit 27d19cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ngcsimlib/context.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ def make_components(self, path_to_components_file, custom_file_dir=None):
327327
this directory is named `custom` if the save_to_json method is
328328
used. (Default: None)
329329
"""
330+
made_components = []
330331
with open(path_to_components_file, 'r') as file:
331332
componentsConfig = json.load(file)
332333

@@ -349,6 +350,9 @@ def make_components(self, path_to_components_file, custom_file_dir=None):
349350
if check_attributes(obj, ["load"]):
350351
obj.load(custom_file_dir)
351352

353+
made_components.append(obj)
354+
return made_components
355+
352356
def make_ops(self, path_to_ops_file):
353357
"""
354358
Loads a collection of ops from a json file. Follow `ops.schema`
@@ -501,3 +505,4 @@ def make_modules(self):
501505
_modules.append({"absolute_path": key, "attributes": value["attributes"]})
502506

503507
return _modules
508+

0 commit comments

Comments
 (0)