def reset_dict(self):
env.sos_dict = WorkflowDict()
env.parameter_vars.clear()
env.config.update(self.config)
env.sos_dict.set('__null_func__', __null_func__)
env.sos_dict.set('__args__', self.args)
# initial values
env.sos_dict.set('SOS_VERSION', __version__)
env.sos_dict.set('__step_output__', [])
# load configuration files
load_config_files(self.config['config_file'])
SoS_exec('import os, sys, glob', None)
SoS_exec('from sos.runtime import *', None)
self._base_symbols = set(dir(__builtins__)) | set(env.sos_dict['sos_symbols_']) | set(keyword.kwlist)
# if users use sos_run, the "scope" of the step goes beyong names in this step
# so we cannot save signatures for it.
self._base_symbols -= {'dynamic', 'sos_run'}
if isinstance(self.args, dict):
for key, value in self.args.items():
if not key.startswith('__'):
env.sos_dict.set(key, value)
评论列表
文章目录