mirror of
https://github.com/pfloos/quack
synced 2024-12-22 12:23:42 +01:00
rm spinner simulation for CI
This commit is contained in:
parent
35d0df0eba
commit
f569587034
@ -119,6 +119,32 @@ class Quack_Job:
|
|||||||
print_col("File 'inp/{}' does not exist.".format(inp_file), "red")
|
print_col("File 'inp/{}' does not exist.".format(inp_file), "red")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
def run_ci(self):
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
|
os.chdir('..')
|
||||||
|
|
||||||
|
command = [
|
||||||
|
'python{}'.format(PYTHON_VERSION), 'PyDuck.py',
|
||||||
|
'--working_dir', '{}'.format(self.workdir),
|
||||||
|
'-x', '{}'.format(self.mol),
|
||||||
|
'-b', '{}'.format(self.basis),
|
||||||
|
'-m', '{}'.format(self.multip)
|
||||||
|
]
|
||||||
|
|
||||||
|
file_out = "{}/{}/{}_{}_{}.out".format(self.workdir, self.methd, self.mol, self.multip, self.basis)
|
||||||
|
with open(file_out, 'w') as fobj:
|
||||||
|
result = subprocess.run(command, stdout=fobj, stderr=subprocess.PIPE, text=True)
|
||||||
|
if result.stderr:
|
||||||
|
print("Error output:", result.stderr)
|
||||||
|
|
||||||
|
os.chdir('tests')
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
|
||||||
|
print_col(f"An error occurred: {str(e)}", "red")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
def display_spinner():
|
def display_spinner():
|
||||||
@ -216,6 +242,7 @@ def main():
|
|||||||
if not os.path.exists("{}/input".format(work_path)):
|
if not os.path.exists("{}/input".format(work_path)):
|
||||||
os.makedirs("{}/input".format(work_path))
|
os.makedirs("{}/input".format(work_path))
|
||||||
|
|
||||||
|
is_ci = os.getenv('CI')
|
||||||
test_failed = False
|
test_failed = False
|
||||||
for mol in molecules:
|
for mol in molecules:
|
||||||
|
|
||||||
@ -244,6 +271,9 @@ def main():
|
|||||||
|
|
||||||
New_Quack_Job = Quack_Job(mol_name, mol_mult, basis_name, mol_geom, methd, work_path)
|
New_Quack_Job = Quack_Job(mol_name, mol_mult, basis_name, mol_geom, methd, work_path)
|
||||||
New_Quack_Job.prep_inp()
|
New_Quack_Job.prep_inp()
|
||||||
|
if is_ci:
|
||||||
|
New_Quack_Job.run_ci()
|
||||||
|
else:
|
||||||
New_Quack_Job.run()
|
New_Quack_Job.run()
|
||||||
|
|
||||||
test_failed_ = False
|
test_failed_ = False
|
||||||
|
Loading…
Reference in New Issue
Block a user