Skip to content

Commit 8bead45

Browse files
committed
Loaded processes acsessable
1 parent 98df2d1 commit 8bead45

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ngcsimlib/context.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ngcsimlib.utils import make_unique_path, check_attributes, \
22
check_serializable, load_from_path, get_compartment_by_name, \
33
get_context, add_context, get_current_path, get_current_context, \
4-
set_new_context, load_module, GuideList, infer_context
4+
set_new_context, load_module, GuideList, infer_context, Get_Compartment_Batch
55
from ngcsimlib.logger import warn, info, critical
66
from ngcsimlib import preload_modules
77
from ngcsimlib.compilers import dynamic_compile, wrap_command
@@ -479,7 +479,7 @@ def make_process(self, path_to_process_file):
479479

480480
all_processes = [Process.make_process(p) for p in process_spec]
481481
for p in all_processes:
482-
self.add_command(p.pure, p.name)
482+
self.__setattr__(p.name, p)
483483

484484
@staticmethod
485485
def dynamicCommand(fn):
@@ -648,3 +648,9 @@ def view_guide(self, guide, skip=None):
648648
for klass in klasses:
649649
guides += klass.guides.__dict__[guide.value]
650650
return guides
651+
652+
def get_current_state(self):
653+
for component in self.components.values():
654+
print(component.path)
655+
656+
exit()

0 commit comments

Comments
 (0)