diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index af37f377..4833a59a 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -70,7 +70,7 @@ jobs: micromamba list - name: Run Tests - run: python -m pytest -v --cov=openff --cov-config=setup.cfg openff/bespokefit/tests/ --cov-report=xml + run: python -m pytest -v --cov=openff --cov-config=setup.cfg openff/bespokefit/_tests/ --cov-report=xml - name: Codecov uses: codecov/codecov-action@v4 diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 93cb9c5c..cafba30b 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -89,5 +89,5 @@ jobs: echo "Starting tests:" PYTEST_ARGS=" -r fE --tb=short" - pytest $PYTEST_ARGS ../openff/bespokefit/tests/ + pytest $PYTEST_ARGS ../openff/bespokefit/_tests/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2bff58ec..d063abcb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ pip install -e . With this environment, tests can be run locally with [PyTest]: ```shell -pytest openff/bespokefit/tests +pytest openff/bespokefit/_tests ``` And documentation can be built with [Sphinx] and viewed in a web browser: diff --git a/docs/conf.py b/docs/conf.py index 8c4dc326..42bfb7ba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -83,7 +83,7 @@ # Modules to exclude from API docs "exclude_modules": [ "openff.bespokefit.cli", - "openff.bespokefit.tests", + "openff.bespokefit._tests", ] } autodoc_default_options = { diff --git a/docs/releasehistory.md b/docs/releasehistory.md index 485c20f4..e0f97b40 100644 --- a/docs/releasehistory.md +++ b/docs/releasehistory.md @@ -13,6 +13,7 @@ Releases follow the ``major.minor.micro`` scheme recommended by ### New Features * [#280] - Adds support for QCFractal 0.50 and newer [@mattwthompson] [@j-wags] [@ntBre] +* [#334] - Makes test pseudo-private [@mattwthompson] ### Documentation Updates * [#321] - Documents how to download pre-computed QC data and add it to the local cache, which can avoid the need for local calculcations. by [@jthorton] @@ -147,6 +148,13 @@ The first major release of bespokefit intended for public use. [#272]: https://github.com/openforcefield/openff-bespokefit/pull/272 [#277]: https://github.com/openforcefield/openff-bespokefit/pull/277 [#279]: https://github.com/openforcefield/openff-bespokefit/pull/279 +[#280]: https://github.com/openforcefield/openff-bespokefit/pull/280 +[#286]: https://github.com/openforcefield/openff-bespokefit/pull/286 +[#320]: https://github.com/openforcefield/openff-bespokefit/pull/320 +[#321]: https://github.com/openforcefield/openff-bespokefit/pull/321 +[#325]: https://github.com/openforcefield/openff-bespokefit/pull/325 +[#330]: https://github.com/openforcefield/openff-bespokefit/pull/330 +[#334]: https://github.com/openforcefield/openff-bespokefit/pull/334 [@Yoshanuikabundi]: https://github.com/Yoshanuikabundi diff --git a/openff/bespokefit/tests/__init__.py b/openff/bespokefit/_tests/__init__.py similarity index 100% rename from openff/bespokefit/tests/__init__.py rename to openff/bespokefit/_tests/__init__.py diff --git a/openff/bespokefit/tests/cli/__init__.py b/openff/bespokefit/_tests/cli/__init__.py similarity index 100% rename from openff/bespokefit/tests/cli/__init__.py rename to openff/bespokefit/_tests/cli/__init__.py diff --git a/openff/bespokefit/tests/cli/conftest.py b/openff/bespokefit/_tests/cli/conftest.py similarity index 100% rename from openff/bespokefit/tests/cli/conftest.py rename to openff/bespokefit/_tests/cli/conftest.py diff --git a/openff/bespokefit/tests/cli/executor/__init__.py b/openff/bespokefit/_tests/cli/executor/__init__.py similarity index 100% rename from openff/bespokefit/tests/cli/executor/__init__.py rename to openff/bespokefit/_tests/cli/executor/__init__.py diff --git a/openff/bespokefit/tests/cli/executor/test_launch.py b/openff/bespokefit/_tests/cli/executor/test_launch.py similarity index 97% rename from openff/bespokefit/tests/cli/executor/test_launch.py rename to openff/bespokefit/_tests/cli/executor/test_launch.py index b58fa5ec..0216ef72 100644 --- a/openff/bespokefit/tests/cli/executor/test_launch.py +++ b/openff/bespokefit/_tests/cli/executor/test_launch.py @@ -5,10 +5,10 @@ import pytest import rich +from openff.bespokefit._tests.executor import patch_settings from openff.bespokefit.cli.executor.launch import launch_cli, validate_redis_connection from openff.bespokefit.executor import BespokeExecutor from openff.bespokefit.executor.utilities.redis import RedisNotConfiguredError -from openff.bespokefit.tests.executor import patch_settings @pytest.fixture(scope="module", autouse=True) diff --git a/openff/bespokefit/tests/cli/executor/test_list.py b/openff/bespokefit/_tests/cli/executor/test_list.py similarity index 100% rename from openff/bespokefit/tests/cli/executor/test_list.py rename to openff/bespokefit/_tests/cli/executor/test_list.py diff --git a/openff/bespokefit/tests/cli/executor/test_retrieve.py b/openff/bespokefit/_tests/cli/executor/test_retrieve.py similarity index 100% rename from openff/bespokefit/tests/cli/executor/test_retrieve.py rename to openff/bespokefit/_tests/cli/executor/test_retrieve.py diff --git a/openff/bespokefit/tests/cli/executor/test_run.py b/openff/bespokefit/_tests/cli/executor/test_run.py similarity index 100% rename from openff/bespokefit/tests/cli/executor/test_run.py rename to openff/bespokefit/_tests/cli/executor/test_run.py diff --git a/openff/bespokefit/tests/cli/executor/test_submit.py b/openff/bespokefit/_tests/cli/executor/test_submit.py similarity index 99% rename from openff/bespokefit/tests/cli/executor/test_submit.py rename to openff/bespokefit/_tests/cli/executor/test_submit.py index 7b2b6adb..490bc020 100644 --- a/openff/bespokefit/tests/cli/executor/test_submit.py +++ b/openff/bespokefit/_tests/cli/executor/test_submit.py @@ -10,6 +10,7 @@ from openff.toolkit.topology import Molecule from openff.utilities import get_data_file_path +from openff.bespokefit._tests import does_not_raise from openff.bespokefit.cli.executor.submit import ( _submit, _submit_cli, @@ -21,7 +22,6 @@ CoordinatorPOSTResponse, ) from openff.bespokefit.schema.fitting import BespokeOptimizationSchema -from openff.bespokefit.tests import does_not_raise from openff.bespokefit.workflows import BespokeWorkflowFactory diff --git a/openff/bespokefit/tests/cli/executor/test_watch.py b/openff/bespokefit/_tests/cli/executor/test_watch.py similarity index 100% rename from openff/bespokefit/tests/cli/executor/test_watch.py rename to openff/bespokefit/_tests/cli/executor/test_watch.py diff --git a/openff/bespokefit/tests/cli/test_cache.py b/openff/bespokefit/_tests/cli/test_cache.py similarity index 99% rename from openff/bespokefit/tests/cli/test_cache.py rename to openff/bespokefit/_tests/cli/test_cache.py index 8e7c1df5..416082d0 100644 --- a/openff/bespokefit/tests/cli/test_cache.py +++ b/openff/bespokefit/_tests/cli/test_cache.py @@ -6,13 +6,13 @@ from openff.qcsubmit.results import TorsionDriveResultCollection from openff.utilities import get_data_file_path +from openff.bespokefit._tests import does_not_raise from openff.bespokefit.cli.cache import ( _connect_to_qcfractal, _results_from_file, _update_from_qcsubmit_result, update_cli, ) -from openff.bespokefit.tests import does_not_raise @pytest.mark.parametrize( diff --git a/openff/bespokefit/tests/cli/test_combine.py b/openff/bespokefit/_tests/cli/test_combine.py similarity index 100% rename from openff/bespokefit/tests/cli/test_combine.py rename to openff/bespokefit/_tests/cli/test_combine.py diff --git a/openff/bespokefit/tests/cli/test_prepare.py b/openff/bespokefit/_tests/cli/test_prepare.py similarity index 100% rename from openff/bespokefit/tests/cli/test_prepare.py rename to openff/bespokefit/_tests/cli/test_prepare.py diff --git a/openff/bespokefit/tests/cli/test_utilities.py b/openff/bespokefit/_tests/cli/test_utilities.py similarity index 100% rename from openff/bespokefit/tests/cli/test_utilities.py rename to openff/bespokefit/_tests/cli/test_utilities.py diff --git a/openff/bespokefit/tests/cli/test_worker.py b/openff/bespokefit/_tests/cli/test_worker.py similarity index 100% rename from openff/bespokefit/tests/cli/test_worker.py rename to openff/bespokefit/_tests/cli/test_worker.py diff --git a/openff/bespokefit/tests/conftest.py b/openff/bespokefit/_tests/conftest.py similarity index 100% rename from openff/bespokefit/tests/conftest.py rename to openff/bespokefit/_tests/conftest.py diff --git a/openff/bespokefit/tests/executor/__init__.py b/openff/bespokefit/_tests/executor/__init__.py similarity index 100% rename from openff/bespokefit/tests/executor/__init__.py rename to openff/bespokefit/_tests/executor/__init__.py diff --git a/openff/bespokefit/tests/executor/conftest.py b/openff/bespokefit/_tests/executor/conftest.py similarity index 100% rename from openff/bespokefit/tests/executor/conftest.py rename to openff/bespokefit/_tests/executor/conftest.py diff --git a/openff/bespokefit/tests/executor/mocking/__init__.py b/openff/bespokefit/_tests/executor/mocking/__init__.py similarity index 100% rename from openff/bespokefit/tests/executor/mocking/__init__.py rename to openff/bespokefit/_tests/executor/mocking/__init__.py diff --git a/openff/bespokefit/tests/executor/mocking/celery.py b/openff/bespokefit/_tests/executor/mocking/celery.py similarity index 100% rename from openff/bespokefit/tests/executor/mocking/celery.py rename to openff/bespokefit/_tests/executor/mocking/celery.py diff --git a/openff/bespokefit/tests/executor/services/__init__.py b/openff/bespokefit/_tests/executor/services/__init__.py similarity index 100% rename from openff/bespokefit/tests/executor/services/__init__.py rename to openff/bespokefit/_tests/executor/services/__init__.py diff --git a/openff/bespokefit/tests/executor/services/conftest.py b/openff/bespokefit/_tests/executor/services/conftest.py similarity index 100% rename from openff/bespokefit/tests/executor/services/conftest.py rename to openff/bespokefit/_tests/executor/services/conftest.py diff --git a/openff/bespokefit/tests/executor/services/coordinator/__init__.py b/openff/bespokefit/_tests/executor/services/coordinator/__init__.py similarity index 100% rename from openff/bespokefit/tests/executor/services/coordinator/__init__.py rename to openff/bespokefit/_tests/executor/services/coordinator/__init__.py diff --git a/openff/bespokefit/tests/executor/services/coordinator/conftest.py b/openff/bespokefit/_tests/executor/services/coordinator/conftest.py similarity index 89% rename from openff/bespokefit/tests/executor/services/coordinator/conftest.py rename to openff/bespokefit/_tests/executor/services/coordinator/conftest.py index de70ceb9..b0442deb 100644 --- a/openff/bespokefit/tests/executor/services/coordinator/conftest.py +++ b/openff/bespokefit/_tests/executor/services/coordinator/conftest.py @@ -4,8 +4,8 @@ from fastapi import FastAPI from starlette.testclient import TestClient +from openff.bespokefit._tests.executor import patch_settings from openff.bespokefit.executor.services.coordinator import app, worker -from openff.bespokefit.tests.executor import patch_settings @pytest.fixture(scope="module") diff --git a/openff/bespokefit/tests/executor/services/coordinator/test_app.py b/openff/bespokefit/_tests/executor/services/coordinator/test_app.py similarity index 100% rename from openff/bespokefit/tests/executor/services/coordinator/test_app.py rename to openff/bespokefit/_tests/executor/services/coordinator/test_app.py diff --git a/openff/bespokefit/tests/executor/services/coordinator/test_models.py b/openff/bespokefit/_tests/executor/services/coordinator/test_models.py similarity index 100% rename from openff/bespokefit/tests/executor/services/coordinator/test_models.py rename to openff/bespokefit/_tests/executor/services/coordinator/test_models.py diff --git a/openff/bespokefit/tests/executor/services/coordinator/test_stages.py b/openff/bespokefit/_tests/executor/services/coordinator/test_stages.py similarity index 100% rename from openff/bespokefit/tests/executor/services/coordinator/test_stages.py rename to openff/bespokefit/_tests/executor/services/coordinator/test_stages.py diff --git a/openff/bespokefit/tests/executor/services/coordinator/test_storage.py b/openff/bespokefit/_tests/executor/services/coordinator/test_storage.py similarity index 100% rename from openff/bespokefit/tests/executor/services/coordinator/test_storage.py rename to openff/bespokefit/_tests/executor/services/coordinator/test_storage.py diff --git a/openff/bespokefit/tests/executor/services/coordinator/test_utils.py b/openff/bespokefit/_tests/executor/services/coordinator/test_utils.py similarity index 100% rename from openff/bespokefit/tests/executor/services/coordinator/test_utils.py rename to openff/bespokefit/_tests/executor/services/coordinator/test_utils.py diff --git a/openff/bespokefit/tests/executor/services/coordinator/test_workers.py b/openff/bespokefit/_tests/executor/services/coordinator/test_workers.py similarity index 100% rename from openff/bespokefit/tests/executor/services/coordinator/test_workers.py rename to openff/bespokefit/_tests/executor/services/coordinator/test_workers.py diff --git a/openff/bespokefit/tests/executor/services/fragmenter/__init__.py b/openff/bespokefit/_tests/executor/services/fragmenter/__init__.py similarity index 100% rename from openff/bespokefit/tests/executor/services/fragmenter/__init__.py rename to openff/bespokefit/_tests/executor/services/fragmenter/__init__.py diff --git a/openff/bespokefit/tests/executor/services/fragmenter/conftest.py b/openff/bespokefit/_tests/executor/services/fragmenter/conftest.py similarity index 89% rename from openff/bespokefit/tests/executor/services/fragmenter/conftest.py rename to openff/bespokefit/_tests/executor/services/fragmenter/conftest.py index 31566dff..3795d9f6 100644 --- a/openff/bespokefit/tests/executor/services/fragmenter/conftest.py +++ b/openff/bespokefit/_tests/executor/services/fragmenter/conftest.py @@ -4,8 +4,8 @@ from fastapi import FastAPI from starlette.testclient import TestClient +from openff.bespokefit._tests.executor import patch_settings from openff.bespokefit.executor.services.fragmenter import app, worker -from openff.bespokefit.tests.executor import patch_settings @pytest.fixture(scope="module") diff --git a/openff/bespokefit/tests/executor/services/fragmenter/test_app.py b/openff/bespokefit/_tests/executor/services/fragmenter/test_app.py similarity index 97% rename from openff/bespokefit/tests/executor/services/fragmenter/test_app.py rename to openff/bespokefit/_tests/executor/services/fragmenter/test_app.py index 9cc12e08..85e284e9 100644 --- a/openff/bespokefit/tests/executor/services/fragmenter/test_app.py +++ b/openff/bespokefit/_tests/executor/services/fragmenter/test_app.py @@ -1,6 +1,7 @@ from celery.result import AsyncResult from openff.fragmenter.fragment import Fragment, FragmentationResult, PfizerFragmenter +from openff.bespokefit._tests.executor.mocking.celery import mock_celery_task from openff.bespokefit.executor.services.fragmenter import worker from openff.bespokefit.executor.services.fragmenter.models import ( FragmenterGETResponse, @@ -8,7 +9,6 @@ FragmenterPOSTResponse, ) from openff.bespokefit.executor.utilities.depiction import IMAGE_UNAVAILABLE_SVG -from openff.bespokefit.tests.executor.mocking.celery import mock_celery_task def _mock_fragment(monkeypatch, status: str = "SUCCESS") -> FragmentationResult: diff --git a/openff/bespokefit/tests/executor/services/fragmenter/test_cache.py b/openff/bespokefit/_tests/executor/services/fragmenter/test_cache.py similarity index 94% rename from openff/bespokefit/tests/executor/services/fragmenter/test_cache.py rename to openff/bespokefit/_tests/executor/services/fragmenter/test_cache.py index 0f2d7486..3342c851 100644 --- a/openff/bespokefit/tests/executor/services/fragmenter/test_cache.py +++ b/openff/bespokefit/_tests/executor/services/fragmenter/test_cache.py @@ -1,11 +1,11 @@ from openff.fragmenter.fragment import WBOFragmenter +from openff.bespokefit._tests.executor.mocking.celery import mock_celery_task from openff.bespokefit.executor.services.fragmenter import worker from openff.bespokefit.executor.services.fragmenter.cache import ( cached_fragmentation_task, ) from openff.bespokefit.executor.services.fragmenter.models import FragmenterPOSTBody -from openff.bespokefit.tests.executor.mocking.celery import mock_celery_task def test_cached_fragmentation_task(fragmenter_client, redis_connection, monkeypatch): diff --git a/openff/bespokefit/tests/executor/services/fragmenter/test_worker.py b/openff/bespokefit/_tests/executor/services/fragmenter/test_worker.py similarity index 100% rename from openff/bespokefit/tests/executor/services/fragmenter/test_worker.py rename to openff/bespokefit/_tests/executor/services/fragmenter/test_worker.py diff --git a/openff/bespokefit/tests/executor/services/optimizer/__init__.py b/openff/bespokefit/_tests/executor/services/optimizer/__init__.py similarity index 100% rename from openff/bespokefit/tests/executor/services/optimizer/__init__.py rename to openff/bespokefit/_tests/executor/services/optimizer/__init__.py diff --git a/openff/bespokefit/tests/executor/services/optimizer/conftest.py b/openff/bespokefit/_tests/executor/services/optimizer/conftest.py similarity index 89% rename from openff/bespokefit/tests/executor/services/optimizer/conftest.py rename to openff/bespokefit/_tests/executor/services/optimizer/conftest.py index 8a15702c..b501e636 100644 --- a/openff/bespokefit/tests/executor/services/optimizer/conftest.py +++ b/openff/bespokefit/_tests/executor/services/optimizer/conftest.py @@ -4,8 +4,8 @@ from fastapi import FastAPI from starlette.testclient import TestClient +from openff.bespokefit._tests.executor import patch_settings from openff.bespokefit.executor.services.optimizer import app, worker -from openff.bespokefit.tests.executor import patch_settings @pytest.fixture(scope="module") diff --git a/openff/bespokefit/tests/executor/services/optimizer/test_app.py b/openff/bespokefit/_tests/executor/services/optimizer/test_app.py similarity index 96% rename from openff/bespokefit/tests/executor/services/optimizer/test_app.py rename to openff/bespokefit/_tests/executor/services/optimizer/test_app.py index df5094c9..b664b3d4 100644 --- a/openff/bespokefit/tests/executor/services/optimizer/test_app.py +++ b/openff/bespokefit/_tests/executor/services/optimizer/test_app.py @@ -1,6 +1,7 @@ from celery.result import AsyncResult from openff.fragmenter.fragment import WBOFragmenter +from openff.bespokefit._tests.executor.mocking.celery import mock_celery_task from openff.bespokefit.executor.services.optimizer import worker from openff.bespokefit.executor.services.optimizer.models import ( OptimizerGETResponse, @@ -12,7 +13,6 @@ OptimizationStageSchema, ) from openff.bespokefit.schema.optimizers import ForceBalanceSchema -from openff.bespokefit.tests.executor.mocking.celery import mock_celery_task def test_get_optimize( diff --git a/openff/bespokefit/tests/executor/services/optimizer/test_worker.py b/openff/bespokefit/_tests/executor/services/optimizer/test_worker.py similarity index 100% rename from openff/bespokefit/tests/executor/services/optimizer/test_worker.py rename to openff/bespokefit/_tests/executor/services/optimizer/test_worker.py diff --git a/openff/bespokefit/tests/executor/services/qcgenerator/__init__.py b/openff/bespokefit/_tests/executor/services/qcgenerator/__init__.py similarity index 100% rename from openff/bespokefit/tests/executor/services/qcgenerator/__init__.py rename to openff/bespokefit/_tests/executor/services/qcgenerator/__init__.py diff --git a/openff/bespokefit/tests/executor/services/qcgenerator/conftest.py b/openff/bespokefit/_tests/executor/services/qcgenerator/conftest.py similarity index 89% rename from openff/bespokefit/tests/executor/services/qcgenerator/conftest.py rename to openff/bespokefit/_tests/executor/services/qcgenerator/conftest.py index 5c682a47..ca3fb026 100644 --- a/openff/bespokefit/tests/executor/services/qcgenerator/conftest.py +++ b/openff/bespokefit/_tests/executor/services/qcgenerator/conftest.py @@ -4,8 +4,8 @@ from fastapi import FastAPI from starlette.testclient import TestClient +from openff.bespokefit._tests.executor import patch_settings from openff.bespokefit.executor.services.qcgenerator import app, worker -from openff.bespokefit.tests.executor import patch_settings @pytest.fixture(scope="module") diff --git a/openff/bespokefit/tests/executor/services/qcgenerator/test_app.py b/openff/bespokefit/_tests/executor/services/qcgenerator/test_app.py similarity index 99% rename from openff/bespokefit/tests/executor/services/qcgenerator/test_app.py rename to openff/bespokefit/_tests/executor/services/qcgenerator/test_app.py index 908b3e51..01393d49 100644 --- a/openff/bespokefit/tests/executor/services/qcgenerator/test_app.py +++ b/openff/bespokefit/_tests/executor/services/qcgenerator/test_app.py @@ -11,6 +11,7 @@ TorsionDriveResult, ) +from openff.bespokefit._tests.executor.mocking.celery import mock_celery_task from openff.bespokefit.executor.services.qcgenerator import worker from openff.bespokefit.executor.services.qcgenerator.app import _retrieve_qc_result from openff.bespokefit.executor.services.qcgenerator.cache import _canonicalize_task @@ -22,7 +23,6 @@ ) from openff.bespokefit.executor.utilities.depiction import IMAGE_UNAVAILABLE_SVG from openff.bespokefit.schema.tasks import HessianTask, OptimizationTask, Torsion1DTask -from openff.bespokefit.tests.executor.mocking.celery import mock_celery_task @pytest.fixture() diff --git a/openff/bespokefit/tests/executor/services/qcgenerator/test_cache.py b/openff/bespokefit/_tests/executor/services/qcgenerator/test_cache.py similarity index 96% rename from openff/bespokefit/tests/executor/services/qcgenerator/test_cache.py rename to openff/bespokefit/_tests/executor/services/qcgenerator/test_cache.py index e6dd519d..2d9af706 100644 --- a/openff/bespokefit/tests/executor/services/qcgenerator/test_cache.py +++ b/openff/bespokefit/_tests/executor/services/qcgenerator/test_cache.py @@ -2,13 +2,13 @@ from openff.utilities import skip_if_missing from qcelemental.models.common_models import Model +from openff.bespokefit._tests.executor.mocking.celery import mock_celery_task from openff.bespokefit.executor.services.qcgenerator import worker from openff.bespokefit.executor.services.qcgenerator.cache import ( _canonicalize_task, cached_compute_task, ) from openff.bespokefit.schema.tasks import HessianTask, OptimizationTask, Torsion1DTask -from openff.bespokefit.tests.executor.mocking.celery import mock_celery_task @skip_if_missing("openeye.oechem") diff --git a/openff/bespokefit/tests/executor/services/qcgenerator/test_qcengine.py b/openff/bespokefit/_tests/executor/services/qcgenerator/test_qcengine.py similarity index 100% rename from openff/bespokefit/tests/executor/services/qcgenerator/test_qcengine.py rename to openff/bespokefit/_tests/executor/services/qcgenerator/test_qcengine.py diff --git a/openff/bespokefit/tests/executor/services/qcgenerator/test_worker.py b/openff/bespokefit/_tests/executor/services/qcgenerator/test_worker.py similarity index 100% rename from openff/bespokefit/tests/executor/services/qcgenerator/test_worker.py rename to openff/bespokefit/_tests/executor/services/qcgenerator/test_worker.py diff --git a/openff/bespokefit/tests/executor/services/test_gateway.py b/openff/bespokefit/_tests/executor/services/test_gateway.py similarity index 100% rename from openff/bespokefit/tests/executor/services/test_gateway.py rename to openff/bespokefit/_tests/executor/services/test_gateway.py diff --git a/openff/bespokefit/tests/executor/services/test_models.py b/openff/bespokefit/_tests/executor/services/test_models.py similarity index 100% rename from openff/bespokefit/tests/executor/services/test_models.py rename to openff/bespokefit/_tests/executor/services/test_models.py diff --git a/openff/bespokefit/tests/executor/services/test_settings.py b/openff/bespokefit/_tests/executor/services/test_settings.py similarity index 100% rename from openff/bespokefit/tests/executor/services/test_settings.py rename to openff/bespokefit/_tests/executor/services/test_settings.py diff --git a/openff/bespokefit/tests/executor/services/test_stages.py b/openff/bespokefit/_tests/executor/services/test_stages.py similarity index 100% rename from openff/bespokefit/tests/executor/services/test_stages.py rename to openff/bespokefit/_tests/executor/services/test_stages.py diff --git a/openff/bespokefit/tests/executor/test_executor.py b/openff/bespokefit/_tests/executor/test_executor.py similarity index 100% rename from openff/bespokefit/tests/executor/test_executor.py rename to openff/bespokefit/_tests/executor/test_executor.py diff --git a/openff/bespokefit/tests/executor/utilities/__init__.py b/openff/bespokefit/_tests/executor/utilities/__init__.py similarity index 100% rename from openff/bespokefit/tests/executor/utilities/__init__.py rename to openff/bespokefit/_tests/executor/utilities/__init__.py diff --git a/openff/bespokefit/tests/executor/utilities/test_celery.py b/openff/bespokefit/_tests/executor/utilities/test_celery.py similarity index 97% rename from openff/bespokefit/tests/executor/utilities/test_celery.py rename to openff/bespokefit/_tests/executor/utilities/test_celery.py index b8d1d528..cb77f703 100644 --- a/openff/bespokefit/tests/executor/utilities/test_celery.py +++ b/openff/bespokefit/_tests/executor/utilities/test_celery.py @@ -4,6 +4,7 @@ import pytest from celery import shared_task +from openff.bespokefit._tests.executor.mocking.celery import mock_celery_result from openff.bespokefit.executor.utilities.celery import ( _spawn_worker, configure_celery_app, @@ -11,7 +12,6 @@ get_task_information, spawn_worker, ) -from openff.bespokefit.tests.executor.mocking.celery import mock_celery_result @shared_task diff --git a/openff/bespokefit/tests/executor/utilities/test_depiction.py b/openff/bespokefit/_tests/executor/utilities/test_depiction.py similarity index 100% rename from openff/bespokefit/tests/executor/utilities/test_depiction.py rename to openff/bespokefit/_tests/executor/utilities/test_depiction.py diff --git a/openff/bespokefit/tests/executor/utilities/test_redis.py b/openff/bespokefit/_tests/executor/utilities/test_redis.py similarity index 100% rename from openff/bespokefit/tests/executor/utilities/test_redis.py rename to openff/bespokefit/_tests/executor/utilities/test_redis.py diff --git a/openff/bespokefit/tests/executor/utilities/test_utilities.py b/openff/bespokefit/_tests/executor/utilities/test_utilities.py similarity index 97% rename from openff/bespokefit/tests/executor/utilities/test_utilities.py rename to openff/bespokefit/_tests/executor/utilities/test_utilities.py index 4ad5883c..28e73fb3 100644 --- a/openff/bespokefit/tests/executor/utilities/test_utilities.py +++ b/openff/bespokefit/_tests/executor/utilities/test_utilities.py @@ -3,9 +3,9 @@ import rich from rich import pretty +from openff.bespokefit._tests import does_not_raise from openff.bespokefit.executor.utilities import handle_common_errors from openff.bespokefit.executor.utilities._utilities import ErrorState -from openff.bespokefit.tests import does_not_raise def _raise(exception): diff --git a/openff/bespokefit/tests/fragmentation/__init__.py b/openff/bespokefit/_tests/fragmentation/__init__.py similarity index 100% rename from openff/bespokefit/tests/fragmentation/__init__.py rename to openff/bespokefit/_tests/fragmentation/__init__.py diff --git a/openff/bespokefit/tests/fragmentation/test_base.py b/openff/bespokefit/_tests/fragmentation/test_base.py similarity index 100% rename from openff/bespokefit/tests/fragmentation/test_base.py rename to openff/bespokefit/_tests/fragmentation/test_base.py diff --git a/openff/bespokefit/tests/optimizers/__init__.py b/openff/bespokefit/_tests/optimizers/__init__.py similarity index 100% rename from openff/bespokefit/tests/optimizers/__init__.py rename to openff/bespokefit/_tests/optimizers/__init__.py diff --git a/openff/bespokefit/tests/optimizers/forcebalance/__init__.py b/openff/bespokefit/_tests/optimizers/forcebalance/__init__.py similarity index 100% rename from openff/bespokefit/tests/optimizers/forcebalance/__init__.py rename to openff/bespokefit/_tests/optimizers/forcebalance/__init__.py diff --git a/openff/bespokefit/tests/optimizers/forcebalance/test_factories.py b/openff/bespokefit/_tests/optimizers/forcebalance/test_factories.py similarity index 100% rename from openff/bespokefit/tests/optimizers/forcebalance/test_factories.py rename to openff/bespokefit/_tests/optimizers/forcebalance/test_factories.py diff --git a/openff/bespokefit/tests/optimizers/forcebalance/test_forcebalance.py b/openff/bespokefit/_tests/optimizers/forcebalance/test_forcebalance.py similarity index 100% rename from openff/bespokefit/tests/optimizers/forcebalance/test_forcebalance.py rename to openff/bespokefit/_tests/optimizers/forcebalance/test_forcebalance.py diff --git a/openff/bespokefit/tests/optimizers/forcebalance/test_templates.py b/openff/bespokefit/_tests/optimizers/forcebalance/test_templates.py similarity index 100% rename from openff/bespokefit/tests/optimizers/forcebalance/test_templates.py rename to openff/bespokefit/_tests/optimizers/forcebalance/test_templates.py diff --git a/openff/bespokefit/tests/optimizers/test_base.py b/openff/bespokefit/_tests/optimizers/test_base.py similarity index 100% rename from openff/bespokefit/tests/optimizers/test_base.py rename to openff/bespokefit/_tests/optimizers/test_base.py diff --git a/openff/bespokefit/tests/optimizers/test_model.py b/openff/bespokefit/_tests/optimizers/test_model.py similarity index 100% rename from openff/bespokefit/tests/optimizers/test_model.py rename to openff/bespokefit/_tests/optimizers/test_model.py diff --git a/openff/bespokefit/tests/schema/__init__.py b/openff/bespokefit/_tests/schema/__init__.py similarity index 100% rename from openff/bespokefit/tests/schema/__init__.py rename to openff/bespokefit/_tests/schema/__init__.py diff --git a/openff/bespokefit/tests/schema/test_fitting.py b/openff/bespokefit/_tests/schema/test_fitting.py similarity index 100% rename from openff/bespokefit/tests/schema/test_fitting.py rename to openff/bespokefit/_tests/schema/test_fitting.py diff --git a/openff/bespokefit/tests/schema/test_results.py b/openff/bespokefit/_tests/schema/test_results.py similarity index 100% rename from openff/bespokefit/tests/schema/test_results.py rename to openff/bespokefit/_tests/schema/test_results.py diff --git a/openff/bespokefit/tests/schema/test_smirnoff.py b/openff/bespokefit/_tests/schema/test_smirnoff.py similarity index 100% rename from openff/bespokefit/tests/schema/test_smirnoff.py rename to openff/bespokefit/_tests/schema/test_smirnoff.py diff --git a/openff/bespokefit/tests/schema/test_targets.py b/openff/bespokefit/_tests/schema/test_targets.py similarity index 100% rename from openff/bespokefit/tests/schema/test_targets.py rename to openff/bespokefit/_tests/schema/test_targets.py diff --git a/openff/bespokefit/tests/utilities/__init__.py b/openff/bespokefit/_tests/utilities/__init__.py similarity index 100% rename from openff/bespokefit/tests/utilities/__init__.py rename to openff/bespokefit/_tests/utilities/__init__.py diff --git a/openff/bespokefit/tests/utilities/test_molecule.py b/openff/bespokefit/_tests/utilities/test_molecule.py similarity index 100% rename from openff/bespokefit/tests/utilities/test_molecule.py rename to openff/bespokefit/_tests/utilities/test_molecule.py diff --git a/openff/bespokefit/tests/utilities/test_smirks.py b/openff/bespokefit/_tests/utilities/test_smirks.py similarity index 99% rename from openff/bespokefit/tests/utilities/test_smirks.py rename to openff/bespokefit/_tests/utilities/test_smirks.py index 309d2ca5..a551978d 100644 --- a/openff/bespokefit/tests/utilities/test_smirks.py +++ b/openff/bespokefit/_tests/utilities/test_smirks.py @@ -13,9 +13,9 @@ from openff.units import unit from openff.utilities import get_data_file_path +from openff.bespokefit._tests import does_not_raise from openff.bespokefit.exceptions import SMIRKSTypeError from openff.bespokefit.schema.smirnoff import validate_smirks -from openff.bespokefit.tests import does_not_raise from openff.bespokefit.utilities.smirks import ( SMIRKSGenerator, compare_smirks_graphs, diff --git a/openff/bespokefit/tests/utilities/test_smirnoff.py b/openff/bespokefit/_tests/utilities/test_smirnoff.py similarity index 100% rename from openff/bespokefit/tests/utilities/test_smirnoff.py rename to openff/bespokefit/_tests/utilities/test_smirnoff.py diff --git a/openff/bespokefit/tests/utilities/test_tempcd.py b/openff/bespokefit/_tests/utilities/test_tempcd.py similarity index 100% rename from openff/bespokefit/tests/utilities/test_tempcd.py rename to openff/bespokefit/_tests/utilities/test_tempcd.py diff --git a/openff/bespokefit/tests/workflows/__init__.py b/openff/bespokefit/_tests/workflows/__init__.py similarity index 100% rename from openff/bespokefit/tests/workflows/__init__.py rename to openff/bespokefit/_tests/workflows/__init__.py diff --git a/openff/bespokefit/tests/workflows/test_bespoke.py b/openff/bespokefit/_tests/workflows/test_bespoke.py similarity index 99% rename from openff/bespokefit/tests/workflows/test_bespoke.py rename to openff/bespokefit/_tests/workflows/test_bespoke.py index b13a251b..b0047f27 100644 --- a/openff/bespokefit/tests/workflows/test_bespoke.py +++ b/openff/bespokefit/_tests/workflows/test_bespoke.py @@ -12,6 +12,7 @@ from openff.utilities import get_data_file_path, temporary_cd from openff.bespokefit._pydantic import ValidationError +from openff.bespokefit._tests import does_not_raise from openff.bespokefit.exceptions import ( MissingTorsionTargetSMARTS, OptimizerError, @@ -25,7 +26,6 @@ ) from openff.bespokefit.schema.targets import AbInitioTargetSchema from openff.bespokefit.schema.tasks import Torsion1DTaskSpec -from openff.bespokefit.tests import does_not_raise from openff.bespokefit.workflows.bespoke import ( _DEFAULT_ROTATABLE_SMIRKS, BespokeWorkflowFactory, diff --git a/setup.cfg b/setup.cfg index 238c8d1e..f00aeb85 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [coverage:run] omit = - */tests/* + */_tests/* openff/bespokefit/_version.py [coverage:report]