From 85d4cb7310f177f15a310a819fb6acd2a27da93f Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Thu, 13 Jul 2023 11:35:10 -0500 Subject: [PATCH] Test on Python 3.10 (#497) * Remove protocols based on Yank * Remove more modules with indirect Yank dependence * Partial revert, skip failing test Fix * Lazy load `smirnoff_plugins` * Remove a use of `Topology.reference_molecules` * Remove a use of `Topology.reference_molecules` * Update Python versions * Do not use `pytest-xdist` * Do not test on Python 3.11 * Skip incompatible macOS builds --- .github/workflows/ci.yaml | 4 ++++ devtools/conda-envs/test_env.yaml | 2 +- openff/evaluator/tests/test_utils/test_serialization.py | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f683372d..509029f3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,6 +30,7 @@ jobs: - macOS-latest python-version: - "3.9" + - "3.10" pymbar-version: - "3.1" openmm-version: @@ -38,6 +39,9 @@ jobs: openeye: - true - false + exclude: + - python-version: "3.10" + openmm-version: "7" steps: - uses: actions/checkout@v3 diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 9b2bef48..9681b863 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -10,7 +10,7 @@ dependencies: # Testing and development - pytest - pytest-cov - - pytest-xdist + - pytest-randomly - nbval - requests-mock # For testing http requests. # smirnoff-plugins =0.0.3 diff --git a/openff/evaluator/tests/test_utils/test_serialization.py b/openff/evaluator/tests/test_utils/test_serialization.py index 422089f0..9f7d9081 100644 --- a/openff/evaluator/tests/test_utils/test_serialization.py +++ b/openff/evaluator/tests/test_utils/test_serialization.py @@ -125,7 +125,7 @@ def __setstate__(self, state): self.field2 = state["field2"] -class TestClass(TypedBaseModel): +class SomeTestClass(TypedBaseModel): def __init__(self, inputs=None): self.inputs = inputs @@ -178,10 +178,10 @@ def test_polymorphic_dictionary(): "test_Complex": ComplexObject(), } - test_object = TestClass(inputs=test_dictionary) + test_object = SomeTestClass(inputs=test_dictionary) test_json = test_object.json() - test_recreated = TestClass.parse_json(test_json) + test_recreated = SomeTestClass.parse_json(test_json) test_recreated_json = test_recreated.json() assert test_json == test_recreated_json