class Resource(object): def __init__(self, smvApp, fqn): self.dsr = DataSetRepo(smvApp) self.fqn = fqn def __enter__(self): return self.dsr.loadDataSet(self.fqn) def __exit__(self, type, value, traceback): pass
class Resource(object): def __init__(self, smvApp, path, fqn): self.dsr = DataSetRepo(smvApp) self.path = path self.fqn = fqn def __enter__(self): sys.path.insert(1, self.path) return self.dsr.loadDataSet(self.fqn) def __exit__(self, type, value, traceback): sys.path.remove(self.path)
class Resource(object): def __init__(self, smvApp, path, fqn): self.dsr = DataSetRepo(smvApp) self.path = path self.fqn = fqn def __enter__(self): sys.path.insert(1,self.path) return self.dsr.loadDataSet(self.fqn) def __exit__(self, type, value, traceback): sys.path.remove(self.path)
class Resource(object): def __init__(self, smvApp, target_path, fqn): self.smvApp = smvApp self.dsr = DataSetRepo(smvApp) self.orig_path = os.getcwd() self.target_path = target_path self.fqn = fqn def __enter__(self): self.smvApp.setAppDir(self.target_path) return self.dsr.loadDataSet(self.fqn) def __exit__(self, type, value, traceback): self.smvApp.setAppDir(self.orig_path)
def refresh_provider_cache(self): """Re-discover providers and set provider_cache""" self.provider_cache = DataSetRepo(self)._all_providers()
def __init__(self, smvApp, path, fqn): self.dsr = DataSetRepo(smvApp) self.path = path self.fqn = fqn
def __init__(self, smvApp, fqn): self.dsr = DataSetRepo(smvApp) self.fqn = fqn
def build_new_repo(self): return DataSetRepo(self.smvApp) def test_discover_new_module_in_file(self):
def build_new_repo(self): return DataSetRepo(self.smvApp)
def __enter__(self): self.smvApp.setAppDir(self.target_path) dsr = DataSetRepo(self.smvApp) return dsr.loadDataSet(self.fqn)
def __init__(self, smvApp, target_path, fqn): self.smvApp = smvApp self.dsr = DataSetRepo(smvApp) self.orig_path = os.getcwd() self.target_path = target_path self.fqn = fqn