From f7ceed3ff87480aa26c2538a7732e579edc424f4 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 30 Nov 2023 10:46:29 -0600 Subject: [PATCH 1/4] Pseudo-privatize tests --- openff/qcsubmit/{tests => _tests}/__init__.py | 0 openff/qcsubmit/{tests => _tests}/conftest.py | 0 openff/qcsubmit/{tests => _tests}/results/__init__.py | 0 openff/qcsubmit/{tests => _tests}/results/conftest.py | 0 openff/qcsubmit/{tests => _tests}/results/test_filters.py | 0 openff/qcsubmit/{tests => _tests}/results/test_results.py | 0 openff/qcsubmit/{tests => _tests}/specifications/__init__.py | 0 openff/qcsubmit/{tests => _tests}/specifications/test_pcm.py | 0 openff/qcsubmit/{tests => _tests}/test_common_structures.py | 0 openff/qcsubmit/{tests => _tests}/test_datasets.py | 0 openff/qcsubmit/{tests => _tests}/test_factories.py | 0 openff/qcsubmit/{tests => _tests}/test_qcsubmit.py | 0 openff/qcsubmit/{tests => _tests}/test_serializers.py | 0 openff/qcsubmit/{tests => _tests}/test_submissions.py | 0 openff/qcsubmit/{tests => _tests}/test_workflow_components.py | 0 openff/qcsubmit/{tests => _tests}/utils/__init__.py | 0 openff/qcsubmit/{tests => _tests}/utils/test_smirnoff.py | 0 openff/qcsubmit/{tests => _tests}/utils/test_visualize.py | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename openff/qcsubmit/{tests => _tests}/__init__.py (100%) rename openff/qcsubmit/{tests => _tests}/conftest.py (100%) rename openff/qcsubmit/{tests => _tests}/results/__init__.py (100%) rename openff/qcsubmit/{tests => _tests}/results/conftest.py (100%) rename openff/qcsubmit/{tests => _tests}/results/test_filters.py (100%) rename openff/qcsubmit/{tests => _tests}/results/test_results.py (100%) rename openff/qcsubmit/{tests => _tests}/specifications/__init__.py (100%) rename openff/qcsubmit/{tests => _tests}/specifications/test_pcm.py (100%) rename openff/qcsubmit/{tests => _tests}/test_common_structures.py (100%) rename openff/qcsubmit/{tests => _tests}/test_datasets.py (100%) rename openff/qcsubmit/{tests => _tests}/test_factories.py (100%) rename openff/qcsubmit/{tests => _tests}/test_qcsubmit.py (100%) rename openff/qcsubmit/{tests => _tests}/test_serializers.py (100%) rename openff/qcsubmit/{tests => _tests}/test_submissions.py (100%) rename openff/qcsubmit/{tests => _tests}/test_workflow_components.py (100%) rename openff/qcsubmit/{tests => _tests}/utils/__init__.py (100%) rename openff/qcsubmit/{tests => _tests}/utils/test_smirnoff.py (100%) rename openff/qcsubmit/{tests => _tests}/utils/test_visualize.py (100%) diff --git a/openff/qcsubmit/tests/__init__.py b/openff/qcsubmit/_tests/__init__.py similarity index 100% rename from openff/qcsubmit/tests/__init__.py rename to openff/qcsubmit/_tests/__init__.py diff --git a/openff/qcsubmit/tests/conftest.py b/openff/qcsubmit/_tests/conftest.py similarity index 100% rename from openff/qcsubmit/tests/conftest.py rename to openff/qcsubmit/_tests/conftest.py diff --git a/openff/qcsubmit/tests/results/__init__.py b/openff/qcsubmit/_tests/results/__init__.py similarity index 100% rename from openff/qcsubmit/tests/results/__init__.py rename to openff/qcsubmit/_tests/results/__init__.py diff --git a/openff/qcsubmit/tests/results/conftest.py b/openff/qcsubmit/_tests/results/conftest.py similarity index 100% rename from openff/qcsubmit/tests/results/conftest.py rename to openff/qcsubmit/_tests/results/conftest.py diff --git a/openff/qcsubmit/tests/results/test_filters.py b/openff/qcsubmit/_tests/results/test_filters.py similarity index 100% rename from openff/qcsubmit/tests/results/test_filters.py rename to openff/qcsubmit/_tests/results/test_filters.py diff --git a/openff/qcsubmit/tests/results/test_results.py b/openff/qcsubmit/_tests/results/test_results.py similarity index 100% rename from openff/qcsubmit/tests/results/test_results.py rename to openff/qcsubmit/_tests/results/test_results.py diff --git a/openff/qcsubmit/tests/specifications/__init__.py b/openff/qcsubmit/_tests/specifications/__init__.py similarity index 100% rename from openff/qcsubmit/tests/specifications/__init__.py rename to openff/qcsubmit/_tests/specifications/__init__.py diff --git a/openff/qcsubmit/tests/specifications/test_pcm.py b/openff/qcsubmit/_tests/specifications/test_pcm.py similarity index 100% rename from openff/qcsubmit/tests/specifications/test_pcm.py rename to openff/qcsubmit/_tests/specifications/test_pcm.py diff --git a/openff/qcsubmit/tests/test_common_structures.py b/openff/qcsubmit/_tests/test_common_structures.py similarity index 100% rename from openff/qcsubmit/tests/test_common_structures.py rename to openff/qcsubmit/_tests/test_common_structures.py diff --git a/openff/qcsubmit/tests/test_datasets.py b/openff/qcsubmit/_tests/test_datasets.py similarity index 100% rename from openff/qcsubmit/tests/test_datasets.py rename to openff/qcsubmit/_tests/test_datasets.py diff --git a/openff/qcsubmit/tests/test_factories.py b/openff/qcsubmit/_tests/test_factories.py similarity index 100% rename from openff/qcsubmit/tests/test_factories.py rename to openff/qcsubmit/_tests/test_factories.py diff --git a/openff/qcsubmit/tests/test_qcsubmit.py b/openff/qcsubmit/_tests/test_qcsubmit.py similarity index 100% rename from openff/qcsubmit/tests/test_qcsubmit.py rename to openff/qcsubmit/_tests/test_qcsubmit.py diff --git a/openff/qcsubmit/tests/test_serializers.py b/openff/qcsubmit/_tests/test_serializers.py similarity index 100% rename from openff/qcsubmit/tests/test_serializers.py rename to openff/qcsubmit/_tests/test_serializers.py diff --git a/openff/qcsubmit/tests/test_submissions.py b/openff/qcsubmit/_tests/test_submissions.py similarity index 100% rename from openff/qcsubmit/tests/test_submissions.py rename to openff/qcsubmit/_tests/test_submissions.py diff --git a/openff/qcsubmit/tests/test_workflow_components.py b/openff/qcsubmit/_tests/test_workflow_components.py similarity index 100% rename from openff/qcsubmit/tests/test_workflow_components.py rename to openff/qcsubmit/_tests/test_workflow_components.py diff --git a/openff/qcsubmit/tests/utils/__init__.py b/openff/qcsubmit/_tests/utils/__init__.py similarity index 100% rename from openff/qcsubmit/tests/utils/__init__.py rename to openff/qcsubmit/_tests/utils/__init__.py diff --git a/openff/qcsubmit/tests/utils/test_smirnoff.py b/openff/qcsubmit/_tests/utils/test_smirnoff.py similarity index 100% rename from openff/qcsubmit/tests/utils/test_smirnoff.py rename to openff/qcsubmit/_tests/utils/test_smirnoff.py diff --git a/openff/qcsubmit/tests/utils/test_visualize.py b/openff/qcsubmit/_tests/utils/test_visualize.py similarity index 100% rename from openff/qcsubmit/tests/utils/test_visualize.py rename to openff/qcsubmit/_tests/utils/test_visualize.py From 58e6505666a6d7c6300093a3e52c024e4422583a Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 30 Nov 2023 10:47:28 -0600 Subject: [PATCH 2/4] Update import paths --- openff/qcsubmit/_tests/results/conftest.py | 10 +++++----- openff/qcsubmit/_tests/results/test_filters.py | 2 +- openff/qcsubmit/_tests/results/test_results.py | 2 +- openff/qcsubmit/_tests/test_common_structures.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openff/qcsubmit/_tests/results/conftest.py b/openff/qcsubmit/_tests/results/conftest.py index b69684d2..5b83fdd3 100644 --- a/openff/qcsubmit/_tests/results/conftest.py +++ b/openff/qcsubmit/_tests/results/conftest.py @@ -8,16 +8,16 @@ from qcportal.optimization import OptimizationDatasetEntry as OptEntry from qcportal.optimization import OptimizationRecord +from openff.qcsubmit._tests.results import ( + mock_basic_result_collection, + mock_optimization_result_collection, + mock_torsion_drive_result_collection, +) from openff.qcsubmit.results import ( BasicResultCollection, OptimizationResultCollection, TorsionDriveResultCollection, ) -from openff.qcsubmit.tests.results import ( - mock_basic_result_collection, - mock_optimization_result_collection, - mock_torsion_drive_result_collection, -) def _smiles_to_molecule(smiles: str) -> Molecule: diff --git a/openff/qcsubmit/_tests/results/test_filters.py b/openff/qcsubmit/_tests/results/test_filters.py index 91f36f31..a3ea2a83 100644 --- a/openff/qcsubmit/_tests/results/test_filters.py +++ b/openff/qcsubmit/_tests/results/test_filters.py @@ -9,6 +9,7 @@ from qcelemental.models import DriverEnum from qcportal.singlepoint import QCSpecification +from openff.qcsubmit._tests.results import mock_optimization_result_collection from openff.qcsubmit.results import ( BasicResult, OptimizationResult, @@ -30,7 +31,6 @@ SMILESFilter, UnperceivableStereoFilter, ) -from openff.qcsubmit.tests.results import mock_optimization_result_collection from . import RecordStatusEnum, SinglepointRecord diff --git a/openff/qcsubmit/_tests/results/test_results.py b/openff/qcsubmit/_tests/results/test_results.py index 9af59ad1..d0f5402a 100644 --- a/openff/qcsubmit/_tests/results/test_results.py +++ b/openff/qcsubmit/_tests/results/test_results.py @@ -15,6 +15,7 @@ TorsiondriveSpecification, ) +from openff.qcsubmit._tests import does_not_raise from openff.qcsubmit.common_structures import QCSpec from openff.qcsubmit.exceptions import RecordTypeError from openff.qcsubmit.results import ( @@ -25,7 +26,6 @@ ) from openff.qcsubmit.results.filters import ResultFilter from openff.qcsubmit.results.results import TorsionDriveResult, _BaseResultCollection -from openff.qcsubmit.tests import does_not_raise from . import ( OptimizationRecord, diff --git a/openff/qcsubmit/_tests/test_common_structures.py b/openff/qcsubmit/_tests/test_common_structures.py index 7b4a5845..7ffb2116 100644 --- a/openff/qcsubmit/_tests/test_common_structures.py +++ b/openff/qcsubmit/_tests/test_common_structures.py @@ -1,9 +1,9 @@ import pytest from openff.toolkit.topology import Molecule +from openff.qcsubmit._tests import does_not_raise from openff.qcsubmit.common_structures import Metadata, MoleculeAttributes, QCSpec from openff.qcsubmit.exceptions import DatasetInputError, QCSpecificationError -from openff.qcsubmit.tests import does_not_raise def test_attributes_from_openff_molecule(): From f5009371fb93645e1213b5bd2877b10b39e01d8e Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 30 Nov 2023 16:06:12 -0600 Subject: [PATCH 3/4] Fix paths --- .github/workflows/CI.yml | 2 +- pyproject.toml | 6 +++--- setup.cfg | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4dbf9a11..c62db5cb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -69,7 +69,7 @@ jobs: - name: Run Tests run: | - python -m pytest -v --cov=openff --cov-config=setup.cfg openff/qcsubmit/tests/ --cov-report=xml + python -m pytest -v --cov=openff --cov-config=setup.cfg openff/qcsubmit/_tests/ --cov-report=xml - name: Codecov uses: codecov/codecov-action@v1 diff --git a/pyproject.toml b/pyproject.toml index 8e0af1f2..9295f2c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 88 -target-version = ['py37'] +target-version = ['py39'] exclude = ''' ( @@ -16,7 +16,7 @@ exclude = ''' | build | dist )/ - | tests # also separately exclude a file named foo.py in + | _tests # also separately exclude a file named foo.py in # the root of the project ) -''' \ No newline at end of file +''' diff --git a/setup.cfg b/setup.cfg index f95c80cb..cdf5a5f8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,7 @@ # .coveragerc to control coverage.py and pytest-cov omit = # Omit the tests - */*/tests/* + */*/_tests/* # Omit generated versioneer openff/qcsubmit/_version.py From 363d879fcd2d8f61d59ee06dbc6a1a71f7c7705a Mon Sep 17 00:00:00 2001 From: Jeff Wagner Date: Fri, 22 Dec 2023 18:56:18 +0000 Subject: [PATCH 4/4] Update releasehistory --- docs/releasehistory.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/releasehistory.md b/docs/releasehistory.md index fe40d419..d90b7a53 100644 --- a/docs/releasehistory.md +++ b/docs/releasehistory.md @@ -10,13 +10,17 @@ Releases follow the ``major.minor.micro`` scheme recommended by ## Current development +### API-breaking changes + +* [PR #242:] Make tests private (`openff/qcsubmit/tests` --> `openff/qcsubmit/_tests`) (#242) + ### Bugfixes * [PR #237:] Correctly use `openff.units` in `TorsionDriveResultCollection.to_records()` and the same method of other classes. (#237) [@chapincavender] ### Tests updated -* [PR #252:] Update constrained torsiondrive test to use a smaller molecule to avoid CI runs timing out. +* [PR #252:] Update constrained torsiondrive test to use a smaller molecule to avoid CI runs timing out. (#252) ## 0.4.0 / 11-15-2022