|
1 | 1 | from ngcsimlib.utils import make_unique_path, check_attributes, \ |
2 | 2 | check_serializable, load_from_path, get_compartment_by_name, \ |
3 | 3 | 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 |
5 | 5 | from ngcsimlib.logger import warn, info, critical |
6 | 6 | from ngcsimlib import preload_modules |
7 | 7 | from ngcsimlib.compilers import dynamic_compile, wrap_command |
@@ -479,7 +479,7 @@ def make_process(self, path_to_process_file): |
479 | 479 |
|
480 | 480 | all_processes = [Process.make_process(p) for p in process_spec] |
481 | 481 | for p in all_processes: |
482 | | - self.add_command(p.pure, p.name) |
| 482 | + self.__setattr__(p.name, p) |
483 | 483 |
|
484 | 484 | @staticmethod |
485 | 485 | def dynamicCommand(fn): |
@@ -648,3 +648,9 @@ def view_guide(self, guide, skip=None): |
648 | 648 | for klass in klasses: |
649 | 649 | guides += klass.guides.__dict__[guide.value] |
650 | 650 | 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