From 94b51a9890f2dd2dc1f1bc1028421066066a34b6 Mon Sep 17 00:00:00 2001 From: Marvin Poul Date: Tue, 10 Dec 2024 12:08:31 +0100 Subject: [PATCH 1/2] Use either pyscal2/3 in calphy job MPIE env recently switched from pyscal2 to pyscal3 because calphy dropped the dependency on pyscal2. --- pyiron_atomistics/calphy/job.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyiron_atomistics/calphy/job.py b/pyiron_atomistics/calphy/job.py index 9c32eb19a..0d825cffb 100644 --- a/pyiron_atomistics/calphy/job.py +++ b/pyiron_atomistics/calphy/job.py @@ -27,7 +27,12 @@ from calphy import Alchemy, Calculation, Liquid, Solid from calphy import __version__ as calphy_version from calphy.routines import routine_alchemy, routine_fe, routine_pscale, routine_ts - from pyscal.trajectory import Trajectory as PyscalTrajectory + # both trajectory classes behave the same, so we can use either depending + # on the env + try: + from pyscal.trajectory import Trajectory as PyscalTrajectory + except ImportError: + from pyscal3.trajectory import Trajectory as PyscalTrajectory __author__ = "Sarath Menon" __copyright__ = ( From c13916eec5c6db60c459ad204163fafe267df4d0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:10:19 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyiron_atomistics/calphy/job.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyiron_atomistics/calphy/job.py b/pyiron_atomistics/calphy/job.py index 0d825cffb..8ea30c071 100644 --- a/pyiron_atomistics/calphy/job.py +++ b/pyiron_atomistics/calphy/job.py @@ -27,6 +27,7 @@ from calphy import Alchemy, Calculation, Liquid, Solid from calphy import __version__ as calphy_version from calphy.routines import routine_alchemy, routine_fe, routine_pscale, routine_ts + # both trajectory classes behave the same, so we can use either depending # on the env try: