def tearDownClass(cls): project = Project( os.path.join(os.path.dirname(os.path.abspath(__file__)), "hdf5_content")) ham = project.load(project.get_job_ids()[0]) ham.remove() project.remove(enable=True)
def tearDownClass(cls): project = Project( os.path.join(os.path.dirname(os.path.abspath(__file__)), "random_testing")) job = project.load(project.get_job_ids()[0]) job.remove() project.remove(enable=True)
def __init__(self, working_directory, job_id, debug=False): self.working_directory = working_directory pr = Project(path=working_directory) self.job = pr.load(int(job_id)) # setup logger self._logger = self.setup_logger(debug=debug)
def __init__(self, working_directory, job_id=None, hdf5_file=None, h5_path=None, submit_on_remote=False, debug=False): self.working_directory = working_directory self._remote_flag = submit_on_remote pr = Project(path=os.path.join(working_directory, '..', '..')) if job_id is not None: self.job = pr.load(int(job_id)) else: projectpath = s.top_path(hdf5_file) if projectpath is None: project = os.path.dirname(hdf5_file) else: project = os.path.relpath(os.path.dirname(hdf5_file), projectpath) job_name = h5_path[1:] self.job = pr.load_from_jobpath( job_id=None, db_entry={ "job": job_name, "subjob": h5_path, "projectpath": projectpath, "project": project + '/', "status": get_job_status_from_file(hdf5_file=hdf5_file, job_name=job_name), "hamilton": get_hamilton_from_file(hdf5_file=hdf5_file, job_name=job_name), "hamversion": get_hamilton_version_from_file(hdf5_file=hdf5_file, job_name=job_name) }, convert_to_object=True) # setup logger self._logger = self.setup_logger(debug=debug)
def tearDownClass(cls): cls.job.interactive_close() project = Project(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'random_testing_atomistic')) job = project.load(project.get_job_ids()[0]) job.remove() project.remove(enable=True)
def tearDownClass(cls): file_location = os.path.dirname(os.path.abspath(__file__)) project = Project(os.path.join(file_location, "random_testing_lib")) ham = project.load(project.get_job_ids()[0]) ham.remove() project.remove(enable=True)