From 6a9c3fd05902b4fc9320a1d0348d40a2b87cfcdb Mon Sep 17 00:00:00 2001 From: Kfir Kaplan Date: Tue, 9 May 2023 10:38:52 +0300 Subject: [PATCH 1/5] Create new wip without nosetests --- arc/utils/wip.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/arc/utils/wip.py b/arc/utils/wip.py index ce7f1589ad..f33748851d 100644 --- a/arc/utils/wip.py +++ b/arc/utils/wip.py @@ -1,26 +1,12 @@ -#!/usr/bin/env python -# encoding: utf-8 -# -# Decorator to mark a unit test as a "work_in_progress" -# From http://www.natpryce.com/articles/000788.html -# Copyright 2011 Nat Pryce. Posted 2011-05-30 +import unittest from functools import wraps -from nose.plugins.attrib import attr -from nose.plugins.skip import SkipTest - - -def fail(message): - raise AssertionError(message) - - def work_in_progress(f): @wraps(f) - def run_test(*args, **kwargs): + def wrapper(*args, **kwargs): try: f(*args, **kwargs) except Exception as e: - raise SkipTest("WIP test failed: " + str(e)) - fail("test passed but marked as work in progress") - - return attr('work_in_progress')(run_test) + raise unittest.SkipTest("WIP test failed: " + str(e)) + raise AssertionError("test passed but marked as work in progress") + return wrapper From 265fca0b946ad51cc4762744c310b5f2aac5ea6d Mon Sep 17 00:00:00 2001 From: Kfir Kaplan Date: Sat, 13 May 2023 10:36:31 +0300 Subject: [PATCH 2/5] Update arc_env file This is due to the recent rmg environment update. removed nosetests (deprecated), xTB (not needed) and updated numpy and cantera versions. Also added anaconda channel, for openssl. --- environment.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/environment.yml b/environment.yml index c19dd0dcd6..6a0001cbdd 100644 --- a/environment.yml +++ b/environment.yml @@ -3,10 +3,12 @@ channels: - defaults - rmg - conda-forge + - cantera + - anaconda dependencies: - cairo - cairocffi - - rmg::cantera >=2.3.0 + - cantera::cantera=2.6 - conda-forge::cclib >=1.7.0 - rmg::chemprop - coolprop @@ -25,9 +27,8 @@ dependencies: - mpmath - rmg::muq2 - networkx - - nose - rmg::numdifftools - - numpy >=1.10.0 + - numpy==1.20.1 - conda-forge::openbabel >= 3 - pandas - psutil @@ -57,5 +58,4 @@ dependencies: - mako - pytables - anaconda::pytest - - conda-forge::xtb - conda-forge::pytest-cov From a2e18fdec8f1d701b7f9570cb11583196363a2a4 Mon Sep 17 00:00:00 2001 From: Calvin Pieters Date: Fri, 12 May 2023 19:16:22 +0300 Subject: [PATCH 3/5] Change where we look for xtb It appears we did not fully update which xtb we use. Even though we installed xtb_env (xtb = 6.6.0), we kept using xtb in arc_env (xtb = 6.3.3) --- arc/settings/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arc/settings/settings.py b/arc/settings/settings.py index 7e067a112a..5d9a2557b1 100644 --- a/arc/settings/settings.py +++ b/arc/settings/settings.py @@ -334,7 +334,7 @@ paths = list() paths.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))), - 'arc_env', 'bin', 'xtb')) + 'xtb_env', 'bin', 'xtb')) paths.append(os.path.join(home, 'anaconda3', 'envs', 'arc_env', 'bin', 'xtb')) paths.append(os.path.join(home, 'anaconda3', 'envs', 'xtb_env', 'bin', 'xtb')) paths.append(os.path.join(home, 'miniconda3', 'envs', 'arc_env', 'bin', 'xtb')) @@ -349,7 +349,7 @@ break arc_pypath_1 = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))), - 'arc_env', 'bin', 'python') + 'xtb_env', 'bin', 'python') arc_pypath_2 = os.path.join(home, 'anaconda3', 'envs', 'arc_env', 'bin', 'python') arc_pypath_3 = os.path.join(home, 'miniconda3', 'envs', 'arc_env', 'bin', 'python') arc_pypath_4 = os.path.join(home, '.conda', 'envs', 'arc_env', 'bin', 'python') From 2d40aa866424bc9d4f803825b4e4fab2b8654fae Mon Sep 17 00:00:00 2001 From: Calvin Pieters Date: Sat, 13 May 2023 17:19:45 +0300 Subject: [PATCH 4/5] XTB 6.3.3 Since we updated numpy on the arc_env, it allowed us inadvertently to update our xtb to 6.6.0 which means we were not writing the correct input file for xtb anymore (STILL TO BE ASSESSED) Thus, we need to revert our xtb_env to 6.3.3 for the time being --- arc/settings/settings.py | 2 +- devtools/install_xtb.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arc/settings/settings.py b/arc/settings/settings.py index 5d9a2557b1..b637a3c4f0 100644 --- a/arc/settings/settings.py +++ b/arc/settings/settings.py @@ -349,7 +349,7 @@ break arc_pypath_1 = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))), - 'xtb_env', 'bin', 'python') + 'arc_env', 'bin', 'python') arc_pypath_2 = os.path.join(home, 'anaconda3', 'envs', 'arc_env', 'bin', 'python') arc_pypath_3 = os.path.join(home, 'miniconda3', 'envs', 'arc_env', 'bin', 'python') arc_pypath_4 = os.path.join(home, '.conda', 'envs', 'arc_env', 'bin', 'python') diff --git a/devtools/install_xtb.sh b/devtools/install_xtb.sh index b80b9c6978..b8fbdc7187 100644 --- a/devtools/install_xtb.sh +++ b/devtools/install_xtb.sh @@ -38,6 +38,10 @@ else conda activate xtb_env fi -$COMMAND_PKG install -c conda-forge xtb -y +# Install xtb +$COMMAND_PKG install -n xtb_env -c conda-forge xtb=6.3.3 -y + +# Install pyyaml $COMMAND_PKG install -c anaconda pyyaml -y -$COMMAND_PKG activate base + +$COMMAND_PKG deactivate From 8d1aac84e923b8acd7be32fa94a980474537ae3f Mon Sep 17 00:00:00 2001 From: Calvin Pieters Date: Sat, 13 May 2023 22:32:37 +0300 Subject: [PATCH 5/5] Clean up paths for xtb_path --- arc/settings/settings.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arc/settings/settings.py b/arc/settings/settings.py index b637a3c4f0..f3d466d901 100644 --- a/arc/settings/settings.py +++ b/arc/settings/settings.py @@ -335,13 +335,9 @@ paths = list() paths.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))), 'xtb_env', 'bin', 'xtb')) -paths.append(os.path.join(home, 'anaconda3', 'envs', 'arc_env', 'bin', 'xtb')) paths.append(os.path.join(home, 'anaconda3', 'envs', 'xtb_env', 'bin', 'xtb')) -paths.append(os.path.join(home, 'miniconda3', 'envs', 'arc_env', 'bin', 'xtb')) paths.append(os.path.join(home, 'miniconda3', 'envs', 'xtb_env', 'bin', 'xtb')) -paths.append(os.path.join(home, '.conda', 'envs', 'arc_env', 'bin', 'xtb')) paths.append(os.path.join(home, '.conda', 'envs', 'xtb_env', 'bin', 'xtb')) -paths.append(os.path.join('/Local/ce_dana', 'anaconda3', 'envs', 'arc_env', 'bin', 'xtb')) paths.append(os.path.join('/Local/ce_dana', 'anaconda3', 'envs', 'xtb_env', 'bin', 'xtb')) for xtb_path in paths: if os.path.isfile(xtb_path):