Skip to content

Commit

Permalink
Do not call deprecated remove_jobs_silently
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrv committed Sep 12, 2022
1 parent d997564 commit 3854b44
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion tests/atomistics/job/test_sqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestSQS(unittest.TestCase):
def setUpClass(cls):
cls.file_location = os.path.dirname(os.path.abspath(__file__))
cls.project = Project(os.path.join(cls.file_location, "test_sqs"))
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)

@classmethod
def tearDownClass(cls):
Expand Down
2 changes: 1 addition & 1 deletion tests/atomistics/master/test_elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def setUpClass(cls):
cls.basis = CrystalStructure(
element="Fe", bravais_basis="bcc", lattice_constant=2.83
)
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)

@classmethod
def tearDownClass(cls):
Expand Down
6 changes: 2 additions & 4 deletions tests/atomistics/master/test_murnaghan_master_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ def setUpClass(cls):
cls.basis = CrystalStructure(
element="Fe", bravais_basis="bcc", lattice_constant=2.8
)
cls.project.remove_jobs_silently(recursive=True)
# cls.project.remove_jobs(recursive=True)
# self.project.set_logging_level('INFO')
cls.project.remove_jobs(recursive=True, silently=True)

@classmethod
def tearDownClass(cls):
file_location = os.path.dirname(os.path.abspath(__file__))
project = Project(os.path.join(file_location, "testing_murnaghan_master_modal"))
project.remove_jobs_silently(recursive=True)
project.remove_jobs(recursive=True, silently=True)
project.remove(enable=True, enforce=True)

def test_run(self):
Expand Down
4 changes: 2 additions & 2 deletions tests/atomistics/master/test_murnaghan_non_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ def setUpClass(cls):
cls.basis = CrystalStructure(
element="Fe", bravais_basis="bcc", lattice_constant=2.8
)
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)
# cls.project.remove_jobs(recursive=True)
# self.project.set_logging_level('INFO')

@classmethod
def tearDownClass(cls):
file_location = os.path.dirname(os.path.abspath(__file__))
project = Project(os.path.join(file_location, "testing_murnaghan_non_modal"))
project.remove_jobs_silently(recursive=True)
project.remove_jobs(recursive=True, silently=True)
project.remove(enable=True, enforce=True)

def test_run(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/interactive/test_activation_relaxation_technique.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.file_location = os.path.dirname(os.path.abspath(__file__))
cls.project = Project(os.path.join(cls.file_location, 'art'))
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)
cls.project.remove(enable=True)

def test_R(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/interactive/test_quasi_newton.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.file_location = os.path.dirname(os.path.abspath(__file__))
cls.project = Project(os.path.join(cls.file_location, 'qn'))
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)
cls.project.remove(enable=True)

def test_run_qn_regularization(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/interactive/test_scipyminimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setUpClass(cls):

@classmethod
def tearDownClass(cls):
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)
cls.project.remove(enable=True, enforce=True)

def test_run(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/interactive/test_sxextoptint.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_input(self):
def tearDownClass(cls):
cls.file_location = os.path.dirname(os.path.abspath(__file__))
cls.project = Project(os.path.join(cls.file_location, "../static/sxextopt"))
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion tests/lammps/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def setUp(self) -> None:

def tearDown(self) -> None:
super().tearDown()
self.ref_project.remove_jobs_silently(recursive=True) # cf. comment in setUp
self.ref_project.remove_jobs(recursive=True, silently=True) # cf. comment in setUp

def test_selective_dynamics(self):
atoms = Atoms("Fe8", positions=np.zeros((8, 3)), cell=np.eye(3))
Expand Down
2 changes: 1 addition & 1 deletion tests/lammps/test_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.execution_path = os.path.dirname(os.path.abspath(__file__))
project = Project(os.path.join(cls.execution_path, "lammps"))
project.remove_jobs_silently(recursive=True)
project.remove_jobs(recursive=True, silently=True)
project.remove(enable=True)

def test_interactive_cells_setter(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/lammps/test_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setUp(self) -> None:

def tearDown(self) -> None:
super().tearDown()
self.ref_project.remove_jobs_silently(recursive=True) # cf. comment in setUp
self.ref_project.remove_jobs(recursive=True, silently=True) # cf. comment in setUp

def test_velocity_basics(self):
creator = Creator(self.project)
Expand Down
2 changes: 1 addition & 1 deletion tests/table/test_datamining.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.execution_path = os.path.dirname(os.path.abspath(__file__))
project = Project(os.path.join(cls.execution_path, "table"))
project.remove_jobs_silently(recursive=True)
project.remove_jobs(recursive=True, silently=True)
project.remove(enable=True)

def test_get_majority(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.execution_path = os.path.dirname(os.path.abspath(__file__))
project = Project(os.path.join(cls.execution_path, "test_project"))
project.remove_jobs_silently(recursive=True)
project.remove_jobs(recursive=True, silently=True)
project.remove(enable=True)

def test_structure_creation(self):
Expand Down
4 changes: 2 additions & 2 deletions tests/testing/test_exampleJob_non_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ def setUpClass(cls):
cls.project = Project(
os.path.join(cls.file_location, "random_testing_non_modal")
)
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)
cls.project.set_logging_level("INFO")

@classmethod
def tearDownClass(cls):
# print('tear down')
file_location = os.path.dirname(os.path.abspath(__file__))
project = Project(os.path.join(file_location, "random_testing_non_modal"))
project.remove_jobs_silently()
project.remove_jobs(silently=True)
project.remove(enable=True)

def test_non_modal_run(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/testing/test_serialMaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TestSerialMaster(unittest.TestCase):
def setUpClass(cls):
cls.file_location = os.path.dirname(os.path.abspath(__file__))
cls.project = Project(os.path.join(cls.file_location, "testing_serial"))
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)

@classmethod
def tearDownClass(cls):
Expand Down
2 changes: 1 addition & 1 deletion tests/testing/test_serialMaster_non_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def setUpClass(cls):
cls.project = Project(
os.path.join(cls.file_location, "testing_serial_non_modal")
)
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)

@classmethod
def tearDownClass(cls):
Expand Down
2 changes: 1 addition & 1 deletion tests/thermodynamics/test_hessianJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setUpClass(cls):
cls.project = Project(
os.path.join(cls.file_location, "hessian_class")
)
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)
cls.job = cls.project.create_job(
"HessianJob", "job_test_hessian"
)
Expand Down
2 changes: 1 addition & 1 deletion tests/thermodynamics/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setUpClass(cls):
cls.project = Project(
os.path.join(cls.file_location, "interface")
)
cls.project.remove_jobs_silently(recursive=True)
cls.project.remove_jobs(recursive=True, silently=True)
cls.structure = Atoms(
positions=[[0, 0, 0], [1, 1, 1]], elements=["Fe", "Fe"], cell=2 * np.eye(3)
)
Expand Down
2 changes: 1 addition & 1 deletion tests/vasp/test_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.execution_path = os.path.dirname(os.path.abspath(__file__))
project = Project(os.path.join(cls.execution_path, "test_vasp"))
project.remove_jobs_silently(recursive=True)
project.remove_jobs(recursive=True, silently=True)
project.remove(enable=True)
state.update()

Expand Down
2 changes: 1 addition & 1 deletion tests/vasp/test_vasp_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.file_location = os.path.dirname(os.path.abspath(__file__))
project = Project(os.path.join(cls.file_location, "vasp_import_testing"))
project.remove_jobs_silently(recursive=True)
project.remove_jobs(recursive=True, silently=True)
project.remove(enable=True)

def test_import(self):
Expand Down

0 comments on commit 3854b44

Please sign in to comment.