From d616e8011ed398b9ddfeb256091578dfaaa3fd8e Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Wed, 17 Apr 2024 00:21:01 -0400 Subject: [PATCH] fix up paths --- pytest.ini | 6 ++---- qcmanybody/models/manybody_pydv1.py | 2 +- qcmanybody/{qcengine.py => qcengine_helper.py} | 0 qcmanybody/tests/__init__.py | 0 qcmanybody/tests/test_mbe_he4_multilevel.py | 4 ++-- qcmanybody/tests/test_mbe_he4_singlelevel.py | 2 +- qcmanybody/tests/test_multi.py | 4 ++-- qcmanybody/tests/test_multi_ss.py | 4 ++-- qcmanybody/tests/test_single.py | 4 ++-- qcmanybody/tests/utils.py | 2 +- 10 files changed, 13 insertions(+), 15 deletions(-) rename qcmanybody/{qcengine.py => qcengine_helper.py} (100%) create mode 100644 qcmanybody/tests/__init__.py diff --git a/pytest.ini b/pytest.ini index 3a02610..71ac54b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,13 +4,11 @@ addopts = --import-mode=importlib # locations from which test helper fls can be imported pythonpath = - tests/ - qcmanybody/models + qcmanybody/tests # test fl locations rel to this fl to use if paths not specified testpaths = - tests/ - qcmanybody/models + qcmanybody/tests markers = addon: "tests require external non-required software" diff --git a/qcmanybody/models/manybody_pydv1.py b/qcmanybody/models/manybody_pydv1.py index 64bb860..7781f62 100644 --- a/qcmanybody/models/manybody_pydv1.py +++ b/qcmanybody/models/manybody_pydv1.py @@ -487,7 +487,7 @@ class Config(ProtoModel.Config): # if/else suppresses a warning about using dynamically generated class as Field type in ManyBodyResults ManyBodyResultProperties = create_model( "ManyBodyResultProperties", - __doc__=manybodyresultproperties_doc, # needs later pydantic + #__doc__=manybodyresultproperties_doc, # needs later pydantic __base__=ProtoModelSkipDefaults, **mbprop, ) diff --git a/qcmanybody/qcengine.py b/qcmanybody/qcengine_helper.py similarity index 100% rename from qcmanybody/qcengine.py rename to qcmanybody/qcengine_helper.py diff --git a/qcmanybody/tests/__init__.py b/qcmanybody/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/qcmanybody/tests/test_mbe_he4_multilevel.py b/qcmanybody/tests/test_mbe_he4_multilevel.py index 8e514c7..af8ce03 100644 --- a/qcmanybody/tests/test_mbe_he4_multilevel.py +++ b/qcmanybody/tests/test_mbe_he4_multilevel.py @@ -12,8 +12,8 @@ from qcmanybody.models.qcng_computer import ManyBodyComputerQCNG, qcvars_to_manybodyproperties import qcengine as qcng -from addons import using -from test_mbe_he4_singlelevel import sumdict +from .addons import using +from .test_mbe_he4_singlelevel import sumdict def skprop(qcvar): # qcng: return qcng.procedures.manybody.qcvars_to_manybodyproperties[qcvar] diff --git a/qcmanybody/tests/test_mbe_he4_singlelevel.py b/qcmanybody/tests/test_mbe_he4_singlelevel.py index b2f86ec..4177691 100644 --- a/qcmanybody/tests/test_mbe_he4_singlelevel.py +++ b/qcmanybody/tests/test_mbe_he4_singlelevel.py @@ -11,7 +11,7 @@ from qcmanybody.models.qcng_computer import ManyBodyComputerQCNG, qcvars_to_manybodyproperties import qcengine as qcng -from addons import using +from .addons import using def skprop(qcvar): # qcng: return qcng.procedures.manybody.qcvars_to_manybodyproperties[qcvar] diff --git a/qcmanybody/tests/test_multi.py b/qcmanybody/tests/test_multi.py index 405dc81..67e9c8d 100644 --- a/qcmanybody/tests/test_multi.py +++ b/qcmanybody/tests/test_multi.py @@ -2,8 +2,8 @@ from qcmanybody import ManyBodyCalculator from qcmanybody.models import BsseEnum -from common import mol_h2o_3 -from utils import load_ref_data, compare_results, load_component_data +from .common import mol_h2o_3 +from .utils import load_ref_data, compare_results, load_component_data @pytest.mark.parametrize( diff --git a/qcmanybody/tests/test_multi_ss.py b/qcmanybody/tests/test_multi_ss.py index 1a36551..872f35a 100644 --- a/qcmanybody/tests/test_multi_ss.py +++ b/qcmanybody/tests/test_multi_ss.py @@ -4,8 +4,8 @@ from qcmanybody import ManyBodyCalculator from qcmanybody.models import BsseEnum -from common import mol_h2o_3 -from utils import load_ref_data, compare_results, load_component_data +from .common import mol_h2o_3 +from .utils import load_ref_data, compare_results, load_component_data this_dir = os.path.dirname(os.path.abspath(__file__)) diff --git a/qcmanybody/tests/test_single.py b/qcmanybody/tests/test_single.py index 64e820a..9e81748 100644 --- a/qcmanybody/tests/test_single.py +++ b/qcmanybody/tests/test_single.py @@ -2,8 +2,8 @@ from qcmanybody import ManyBodyCalculator from qcmanybody.models import BsseEnum -from common import mol_h2o_3 -from utils import load_ref_data, compare_results, load_component_data +from .common import mol_h2o_3 +from .utils import load_ref_data, compare_results, load_component_data @pytest.mark.parametrize( diff --git a/qcmanybody/tests/utils.py b/qcmanybody/tests/utils.py index 563f98f..8c7c494 100644 --- a/qcmanybody/tests/utils.py +++ b/qcmanybody/tests/utils.py @@ -62,7 +62,7 @@ def load_component_data(file_base): def generate_component_data(mol, levels, specifications, bsse_type, return_total_data, out_filename): - from qcmanybody.qcengine import run_qcengine_base + from qcmanybody.qcengine_helper import run_qcengine_base mc, component_results = run_qcengine_base(mol, levels, specifications, bsse_type, return_total_data)