From 542a21a6fd6371d83f0ca2e4ea50e7d8d493665f Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Fri, 4 Aug 2023 09:42:13 -0500 Subject: [PATCH 01/18] Safeguard Pydantic exception --- openff/toolkit/_tests/test_forcefield.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openff/toolkit/_tests/test_forcefield.py b/openff/toolkit/_tests/test_forcefield.py index ce1a33e5e..c5e3c6d56 100644 --- a/openff/toolkit/_tests/test_forcefield.py +++ b/openff/toolkit/_tests/test_forcefield.py @@ -15,7 +15,10 @@ from openff.units.openmm import from_openmm, to_openmm from openmm import NonbondedForce, Platform, XmlSerializer, app from openmm import unit as openmm_unit -from pydantic import ValidationError +try: + from pydantic.v1 import ValidationError +except ImportError: + from pydantic import ValidationError from openff.toolkit._tests.create_molecules import ( create_acetate, From 5a96a7666c5b6ed739b9e39ecdfe5240ae34200b Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Fri, 4 Aug 2023 10:46:22 -0500 Subject: [PATCH 02/18] Drop QCPortal tests until it works with Pydantic v2 --- devtools/conda-envs/beta_rc_env.yaml | 3 -- devtools/conda-envs/openeye-examples.yaml | 3 -- devtools/conda-envs/openeye.yaml | 3 -- devtools/conda-envs/rdkit-examples.yaml | 3 -- devtools/conda-envs/rdkit.yaml | 3 -- devtools/conda-envs/test_env.yaml | 3 -- examples/environment.yaml | 1 + openff/toolkit/_tests/utils.py | 56 ++--------------------- 8 files changed, 4 insertions(+), 71 deletions(-) diff --git a/devtools/conda-envs/beta_rc_env.yaml b/devtools/conda-envs/beta_rc_env.yaml index 555e339ab..a62b837c0 100644 --- a/devtools/conda-envs/beta_rc_env.yaml +++ b/devtools/conda-envs/beta_rc_env.yaml @@ -36,9 +36,6 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal >=0.15 - - qcengine - mdtraj - nbval - mypy diff --git a/devtools/conda-envs/openeye-examples.yaml b/devtools/conda-envs/openeye-examples.yaml index 254f7d490..5e3677eb3 100644 --- a/devtools/conda-envs/openeye-examples.yaml +++ b/devtools/conda-envs/openeye-examples.yaml @@ -34,9 +34,6 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal >=0.15 - - qcengine - mdtraj - parmed =3 - nbval diff --git a/devtools/conda-envs/openeye.yaml b/devtools/conda-envs/openeye.yaml index 44789b0e6..60d025432 100644 --- a/devtools/conda-envs/openeye.yaml +++ b/devtools/conda-envs/openeye.yaml @@ -34,8 +34,5 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal >=0.15 - - qcengine - mdtraj - parmed =3 diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index 6586343af..ef771663f 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -36,9 +36,6 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal >=0.15 - - qcengine - nbval - mdtraj - pdbfixer diff --git a/devtools/conda-envs/rdkit.yaml b/devtools/conda-envs/rdkit.yaml index c887aacd7..e488fc7ff 100644 --- a/devtools/conda-envs/rdkit.yaml +++ b/devtools/conda-envs/rdkit.yaml @@ -34,6 +34,3 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal >=0.15 - - qcengine diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 7d61d6ec7..09bfc0ea9 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -35,9 +35,6 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal >=0.15 - - qcengine - mdtraj - nbval - mypy diff --git a/examples/environment.yaml b/examples/environment.yaml index 7e064f0f9..b0ef14547 100644 --- a/examples/environment.yaml +++ b/examples/environment.yaml @@ -34,6 +34,7 @@ dependencies: - msgpack-python - xmltodict - python-constraint + - pydantic =1 - qcelemental - qcportal >=0.15 - qcengine diff --git a/openff/toolkit/_tests/utils.py b/openff/toolkit/_tests/utils.py index 532e501c1..8568e6d57 100644 --- a/openff/toolkit/_tests/utils.py +++ b/openff/toolkit/_tests/utils.py @@ -20,6 +20,7 @@ from openff.units import unit from openff.units.openmm import to_openmm from openmm import unit as openmm_unit +from openff.utilities import skip_if_missing, has_package from openff.toolkit.utils import ( AmberToolsToolkitWrapper, @@ -46,60 +47,9 @@ ) -def has_pkg(pkg_name): - """ - Helper function to generically check if a package is installed. Intended - to be used to check for optional dependencies. - - Parameters - ---------- - pkg_name : str - The name of the package to check the availability of - - Returns - ------- - pkg_available : bool - Boolean indicator if the package is available or not - - Examples - -------- - >>> has_numpy = has_pkg('numpy') - >>> has_numpy - True - >>> has_foo = has_pkg('other_non_installed_pkg') - >>> has_foo - False - """ - try: - importlib.import_module(pkg_name) - except ModuleNotFoundError: - return False - return True - - -def requires_pkg(pkg_name, reason=None): - """ - Helper function to generate a pytest.mark.skipif decorator - for any package. This allows tests to be skipped if some - optional dependency is not found. - - Parameters - ---------- - pkg_name : str - The name of the package that is required for a test(s) - reason : str, optional - Explanation of why the skipped it to be tested - - Returns - ------- - requires_pkg : _pytest.mark.structures.MarkDecorator - A pytest decorator that will skip tests if the package is not available - """ - if not reason: - reason = f"Package {pkg_name} is required, but was not found." - requires_pkg = pytest.mark.skipif(not has_pkg(pkg_name), reason=reason) - return requires_pkg +has_pkg = has_package +requires_pkg = skip_if_missing @contextmanager def does_not_raise(): From c87a91e2c8fc4c43068c8bb3c2349b86758e69be Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 15:47:48 +0000 Subject: [PATCH 03/18] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- openff/toolkit/_tests/test_forcefield.py | 1 + openff/toolkit/_tests/utils.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openff/toolkit/_tests/test_forcefield.py b/openff/toolkit/_tests/test_forcefield.py index c5e3c6d56..f16608b8d 100644 --- a/openff/toolkit/_tests/test_forcefield.py +++ b/openff/toolkit/_tests/test_forcefield.py @@ -15,6 +15,7 @@ from openff.units.openmm import from_openmm, to_openmm from openmm import NonbondedForce, Platform, XmlSerializer, app from openmm import unit as openmm_unit + try: from pydantic.v1 import ValidationError except ImportError: diff --git a/openff/toolkit/_tests/utils.py b/openff/toolkit/_tests/utils.py index 8568e6d57..650eb555e 100644 --- a/openff/toolkit/_tests/utils.py +++ b/openff/toolkit/_tests/utils.py @@ -19,8 +19,8 @@ import pytest from openff.units import unit from openff.units.openmm import to_openmm +from openff.utilities import has_package, skip_if_missing from openmm import unit as openmm_unit -from openff.utilities import skip_if_missing, has_package from openff.toolkit.utils import ( AmberToolsToolkitWrapper, @@ -51,6 +51,7 @@ requires_pkg = skip_if_missing + @contextmanager def does_not_raise(): """A helpful context manager to use inplace of a pytest raise statement From 2c014e41999349734271d7a9db24fe081061eac9 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Fri, 4 Aug 2023 10:56:21 -0500 Subject: [PATCH 04/18] Update test environments, fix typing --- devtools/conda-envs/beta_rc_env.yaml | 5 +++-- devtools/conda-envs/openeye.yaml | 5 +++-- devtools/conda-envs/rdkit.yaml | 5 +++-- devtools/conda-envs/test_env.yaml | 5 +++-- openff/toolkit/_tests/test_forcefield.py | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/devtools/conda-envs/beta_rc_env.yaml b/devtools/conda-envs/beta_rc_env.yaml index a62b837c0..1e54e39c6 100644 --- a/devtools/conda-envs/beta_rc_env.yaml +++ b/devtools/conda-envs/beta_rc_env.yaml @@ -21,8 +21,8 @@ dependencies: - openff-units =0.2.0 - openff-utilities >=0.1.5 - openff-interchange-base >=0.3.10 - - openff-nagl >=0.2.2 - - openff-nagl-models >=0.0.2 + # openff-nagl >=0.2.2 + # openff-nagl-models >=0.0.2 # Toolkit-specific - ambertools >=22 - rdkit @@ -36,6 +36,7 @@ dependencies: - toml - bson - msgpack-python + - nglview - mdtraj - nbval - mypy diff --git a/devtools/conda-envs/openeye.yaml b/devtools/conda-envs/openeye.yaml index 60d025432..17a9adca1 100644 --- a/devtools/conda-envs/openeye.yaml +++ b/devtools/conda-envs/openeye.yaml @@ -20,8 +20,8 @@ dependencies: - openff-amber-ff-ports - openff-utilities >=0.1.5 - openff-interchange-base >=0.3.10 - - openff-nagl >=0.2.2 - - openff-nagl-models >=0.0.2 + # openff-nagl >=0.2.2 + # openff-nagl-models >=0.0.2 - typing_extensions # Toolkit-specific - openeye-toolkits @@ -36,3 +36,4 @@ dependencies: - msgpack-python - mdtraj - parmed =3 + - nglview \ No newline at end of file diff --git a/devtools/conda-envs/rdkit.yaml b/devtools/conda-envs/rdkit.yaml index e488fc7ff..1c3ae5365 100644 --- a/devtools/conda-envs/rdkit.yaml +++ b/devtools/conda-envs/rdkit.yaml @@ -19,8 +19,8 @@ dependencies: - openff-amber-ff-ports - openff-utilities >=0.1.5 - openff-interchange-base >=0.3.10 - - openff-nagl >=0.2.2 - - openff-nagl-models >=0.0.2 + # openff-nagl >=0.2.2 + # openff-nagl-models >=0.0.2 - typing_extensions # Toolkit-specific - ambertools >=22 @@ -34,3 +34,4 @@ dependencies: - toml - bson - msgpack-python + - nglview diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 09bfc0ea9..3df37c1b7 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -20,8 +20,8 @@ dependencies: - openff-amber-ff-ports - openff-utilities >=0.1.5 - openff-interchange-base >=0.3.10 - - openff-nagl >=0.2.2 - - openff-nagl-models >=0.0.2 + # openff-nagl >=0.2.2 + # openff-nagl-models >=0.0.2 # Toolkit-specific - ambertools >=22 - rdkit @@ -35,6 +35,7 @@ dependencies: - toml - bson - msgpack-python + - nglview - mdtraj - nbval - mypy diff --git a/openff/toolkit/_tests/test_forcefield.py b/openff/toolkit/_tests/test_forcefield.py index f16608b8d..5d1d3c3b7 100644 --- a/openff/toolkit/_tests/test_forcefield.py +++ b/openff/toolkit/_tests/test_forcefield.py @@ -19,7 +19,7 @@ try: from pydantic.v1 import ValidationError except ImportError: - from pydantic import ValidationError + from pydantic import ValidationError # type: ignore[assignment] from openff.toolkit._tests.create_molecules import ( create_acetate, From 92cc628616cff178ce506ba0fbc2db3c04b74ac2 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Fri, 4 Aug 2023 11:03:19 -0500 Subject: [PATCH 05/18] Lint --- openff/toolkit/_tests/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openff/toolkit/_tests/utils.py b/openff/toolkit/_tests/utils.py index 650eb555e..9c605f695 100644 --- a/openff/toolkit/_tests/utils.py +++ b/openff/toolkit/_tests/utils.py @@ -6,7 +6,6 @@ import collections import copy import functools -import importlib import itertools import os import pprint From 997a5ab44a960fcea68558c486c9dd40368445e6 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Fri, 4 Aug 2023 11:58:03 -0500 Subject: [PATCH 06/18] Add NGLview to examples environments --- devtools/conda-envs/openeye-examples.yaml | 1 + devtools/conda-envs/rdkit-examples.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/devtools/conda-envs/openeye-examples.yaml b/devtools/conda-envs/openeye-examples.yaml index 5e3677eb3..52afc68e6 100644 --- a/devtools/conda-envs/openeye-examples.yaml +++ b/devtools/conda-envs/openeye-examples.yaml @@ -40,3 +40,4 @@ dependencies: - pdbfixer - openmmforcefields >=0.11.2 - gromacs >=2021=nompi* + - nglview diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index ef771663f..e7f29e1ae 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -41,3 +41,4 @@ dependencies: - pdbfixer - openmmforcefields >=0.11.2 - gromacs >=2021=nompi* + - nglview From 7a44e159cbdec48945399d33606d6326fafc9899 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Wed, 30 Aug 2023 14:48:14 -0500 Subject: [PATCH 07/18] Add v2 --- .github/workflows/CI.yml | 2 ++ devtools/conda-envs/beta_rc_env.yaml | 2 +- devtools/conda-envs/openeye-examples.yaml | 2 +- devtools/conda-envs/openeye.yaml | 2 +- devtools/conda-envs/rdkit-examples.yaml | 2 +- devtools/conda-envs/rdkit.yaml | 2 +- devtools/conda-envs/test_env.yaml | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5b9b53b21..713c9059d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,6 +29,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11"] + pydantic-version: ["1", "2"] rdkit: [true, false] openeye: [true, false] exclude: @@ -79,6 +80,7 @@ jobs: environment-file: devtools/conda-envs/${{ env.ENVFILE }}.yaml create-args: >- python=${{ matrix.python-version }} + pydantic=${{ matrix.pydantic-version }} - name: Additional info about the build run: | diff --git a/devtools/conda-envs/beta_rc_env.yaml b/devtools/conda-envs/beta_rc_env.yaml index 96a022ece..cdd7c30b4 100644 --- a/devtools/conda-envs/beta_rc_env.yaml +++ b/devtools/conda-envs/beta_rc_env.yaml @@ -7,7 +7,7 @@ channels: dependencies: # Base depends - python - - pydantic =1 + - pydantic - packaging - numpy - networkx diff --git a/devtools/conda-envs/openeye-examples.yaml b/devtools/conda-envs/openeye-examples.yaml index e954a1c12..317f2659a 100644 --- a/devtools/conda-envs/openeye-examples.yaml +++ b/devtools/conda-envs/openeye-examples.yaml @@ -5,7 +5,7 @@ channels: dependencies: # Base depends - python - - pydantic =1 + - pydantic - packaging - numpy - networkx diff --git a/devtools/conda-envs/openeye.yaml b/devtools/conda-envs/openeye.yaml index 2e1843f60..6f2c9bf40 100644 --- a/devtools/conda-envs/openeye.yaml +++ b/devtools/conda-envs/openeye.yaml @@ -5,7 +5,7 @@ channels: dependencies: # Base depends - python - - pydantic =1 + - pydantic - packaging - numpy - networkx diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index 584771207..a05307648 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -4,7 +4,7 @@ channels: dependencies: # Base depends - python - - pydantic =1 + - pydantic - packaging - numpy - networkx diff --git a/devtools/conda-envs/rdkit.yaml b/devtools/conda-envs/rdkit.yaml index f3165455d..08aa0d278 100644 --- a/devtools/conda-envs/rdkit.yaml +++ b/devtools/conda-envs/rdkit.yaml @@ -4,7 +4,7 @@ channels: dependencies: # Base depends - python - - pydantic =1 + - pydantic - packaging - numpy - networkx diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 842a88423..9e6588c27 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -40,7 +40,7 @@ dependencies: - nbval - mypy - typing_extensions - - pydantic =1 + - pydantic - pip: - types-setuptools - types-toml From 242d1ffc6e7225203a114fb024f01a8505bcbf99 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Wed, 30 Aug 2023 14:48:50 -0500 Subject: [PATCH 08/18] Name --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 713c9059d..b58b55eb2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,7 +22,7 @@ defaults: jobs: test: if: (github.event_name == 'schedule' && github.repository == 'openforcefield/openff-toolkit') || (github.event_name != 'schedule') - name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit=${{ matrix.rdkit }}, OpenEye=${{ matrix.openeye }} + name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit=${{ matrix.rdkit }}, OpenEye=${{ matrix.openeye }}, Pydantic v${{ matrix.pydantic-version }} runs-on: ${{ matrix.os }} strategy: fail-fast: false From b63f52242f4383e2db92978f65f7d0c0a4a619cc Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Wed, 30 Aug 2023 15:01:58 -0500 Subject: [PATCH 09/18] Update some annotations --- openff/toolkit/_tests/test_forcefield.py | 4 ++-- openff/toolkit/typing/engines/smirnoff/forcefield.py | 4 ++-- openff/toolkit/typing/engines/smirnoff/parameters.py | 2 +- openff/toolkit/utils/utils.py | 2 +- setup.cfg | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openff/toolkit/_tests/test_forcefield.py b/openff/toolkit/_tests/test_forcefield.py index f1f27346f..acbfdf2f5 100644 --- a/openff/toolkit/_tests/test_forcefield.py +++ b/openff/toolkit/_tests/test_forcefield.py @@ -17,9 +17,9 @@ from openmm import unit as openmm_unit try: - from pydantic.v1 import ValidationError + from pydantic.v1 import ValidationError # type: ignore except ImportError: - from pydantic import ValidationError # type: ignore[assignment] + from pydantic import ValidationError from openff.toolkit._tests.create_molecules import ( create_acetate, diff --git a/openff/toolkit/typing/engines/smirnoff/forcefield.py b/openff/toolkit/typing/engines/smirnoff/forcefield.py index 0712ce23d..9fdd0ed71 100644 --- a/openff/toolkit/typing/engines/smirnoff/forcefield.py +++ b/openff/toolkit/typing/engines/smirnoff/forcefield.py @@ -1208,7 +1208,7 @@ def create_interchange( An `Interchange` object resulting from applying this `ForceField` to a `Topology`. """ - from openff.interchange import Interchange # type: ignore[import] + from openff.interchange import Interchange from openff.toolkit.utils.toolkit_registry import toolkit_registry_manager @@ -1385,7 +1385,7 @@ def get_partial_charges(self, molecule: "Molecule", **kwargs) -> "Quantity": # Bad type annotation in Interchange, expect to be fixed in 0.3.1 return unit.Quantity( [ - c.m # type: ignore[union-attr] + c.m for c in Interchange.from_smirnoff( force_field=self, topology=[molecule], **kwargs )["Electrostatics"].charges.values() diff --git a/openff/toolkit/typing/engines/smirnoff/parameters.py b/openff/toolkit/typing/engines/smirnoff/parameters.py index 290d1628b..caf80d471 100644 --- a/openff/toolkit/typing/engines/smirnoff/parameters.py +++ b/openff/toolkit/typing/engines/smirnoff/parameters.py @@ -207,7 +207,7 @@ def _validate_units(attr, value: Union[str, Quantity], units: Unit): value = object_to_quantity(value) try: - if not units.is_compatible_with(value.units): # type: ignore[union-attr] + if not units.is_compatible_with(value.units): raise IncompatibleUnitError( f"{attr.name}={value} should have units of {units}" ) diff --git a/openff/toolkit/utils/utils.py b/openff/toolkit/utils/utils.py index c3d96aa89..565f4ee83 100644 --- a/openff/toolkit/utils/utils.py +++ b/openff/toolkit/utils/utils.py @@ -102,7 +102,7 @@ def get_data_file_path(relative_path: str) -> str: _DATA_ROOT = files("openff.toolkit") / "data" # mypy unhappy because this might not return a path, might be fixed with 3.10+ - file_path = _DATA_ROOT / relative_path # type: ignore[arg-type] + file_path = _DATA_ROOT / relative_path if not file_path.exists(): # type: ignore[attr-defined] raise ValueError( diff --git a/setup.cfg b/setup.cfg index 4f7e3c0af..4896e8a28 100644 --- a/setup.cfg +++ b/setup.cfg @@ -74,6 +74,7 @@ parentdir_prefix = openff-toolkit- [mypy] plugins = numpy.typing.mypy_plugin warn_unused_configs = True +warn_unused_ignores = True show_error_codes = True disable_error_code = no-redef From 1a0ef2202ff25bf44188e09a10f636cbbd98aae4 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Wed, 30 Aug 2023 15:05:33 -0500 Subject: [PATCH 10/18] QCArchive is not yet updated --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b58b55eb2..dee72a253 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -164,7 +164,7 @@ jobs: pytest -v --no-cov --doctest-glob="docs/*.rst" --doctest-glob="docs/*.md" docs/ - name: Run notebooks in docs - if: ${{ matrix.rdkit == true && matrix.openeye == true }} + if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.pydantic-version == 1 }} run: | pytest -v --no-cov --nbval --ignore docs/_build/ docs/ From 38d76806b07beeb34749015f8dca42eebc454049 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Wed, 30 Aug 2023 15:20:56 -0500 Subject: [PATCH 11/18] Fix --- openff/toolkit/_tests/test_forcefield.py | 2 +- setup.cfg | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/openff/toolkit/_tests/test_forcefield.py b/openff/toolkit/_tests/test_forcefield.py index acbfdf2f5..de443713f 100644 --- a/openff/toolkit/_tests/test_forcefield.py +++ b/openff/toolkit/_tests/test_forcefield.py @@ -19,7 +19,7 @@ try: from pydantic.v1 import ValidationError # type: ignore except ImportError: - from pydantic import ValidationError + from pydantic import ValidationError # type: ignore from openff.toolkit._tests.create_molecules import ( create_acetate, diff --git a/setup.cfg b/setup.cfg index 4896e8a28..4f7e3c0af 100644 --- a/setup.cfg +++ b/setup.cfg @@ -74,7 +74,6 @@ parentdir_prefix = openff-toolkit- [mypy] plugins = numpy.typing.mypy_plugin warn_unused_configs = True -warn_unused_ignores = True show_error_codes = True disable_error_code = no-redef From 3bb786f4ae65080fe94ec2ada56003578825289f Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Wed, 30 Aug 2023 15:39:08 -0500 Subject: [PATCH 12/18] Update environments --- devtools/conda-envs/beta_rc_env.yaml | 4 ++-- devtools/conda-envs/openeye-examples.yaml | 4 ++-- devtools/conda-envs/openeye.yaml | 3 ++- devtools/conda-envs/rdkit-examples.yaml | 2 +- devtools/conda-envs/rdkit.yaml | 5 +++-- devtools/conda-envs/test_env.yaml | 4 ++-- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/devtools/conda-envs/beta_rc_env.yaml b/devtools/conda-envs/beta_rc_env.yaml index cdd7c30b4..325732a45 100644 --- a/devtools/conda-envs/beta_rc_env.yaml +++ b/devtools/conda-envs/beta_rc_env.yaml @@ -7,7 +7,6 @@ channels: dependencies: # Base depends - python - - pydantic - packaging - numpy - networkx @@ -36,7 +35,8 @@ dependencies: - toml - bson - msgpack-python - - nglview + - qcelemental + - qcportal ==0.15.8 - mdtraj - nbval - mypy diff --git a/devtools/conda-envs/openeye-examples.yaml b/devtools/conda-envs/openeye-examples.yaml index 317f2659a..bd44ae919 100644 --- a/devtools/conda-envs/openeye-examples.yaml +++ b/devtools/conda-envs/openeye-examples.yaml @@ -5,7 +5,6 @@ channels: dependencies: # Base depends - python - - pydantic - packaging - numpy - networkx @@ -34,10 +33,11 @@ dependencies: - toml - bson - msgpack-python + - qcelemental + - qcportal ==0.15.8 - mdtraj - parmed =3 - nbval - pdbfixer - openmmforcefields >=0.11.2 - gromacs >=2021=nompi* - - nglview diff --git a/devtools/conda-envs/openeye.yaml b/devtools/conda-envs/openeye.yaml index 6f2c9bf40..992cfc876 100644 --- a/devtools/conda-envs/openeye.yaml +++ b/devtools/conda-envs/openeye.yaml @@ -34,6 +34,7 @@ dependencies: - toml - bson - msgpack-python + - qcelemental + - qcportal ==0.15.8 - mdtraj - parmed =3 - - nglview \ No newline at end of file diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index a05307648..9fb7f94ab 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -36,9 +36,9 @@ dependencies: - toml - bson - msgpack-python + - qcportal ==0.15.8 - nbval - mdtraj - pdbfixer - openmmforcefields >=0.11.2 - gromacs >=2021=nompi* - - nglview diff --git a/devtools/conda-envs/rdkit.yaml b/devtools/conda-envs/rdkit.yaml index 08aa0d278..de00bb783 100644 --- a/devtools/conda-envs/rdkit.yaml +++ b/devtools/conda-envs/rdkit.yaml @@ -4,7 +4,7 @@ channels: dependencies: # Base depends - python - - pydantic + - pydantic =1 - packaging - numpy - networkx @@ -34,4 +34,5 @@ dependencies: - toml - bson - msgpack-python - - nglview + - qcelemental + - qcportal ==0.15.8 diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 9e6588c27..2f26508ce 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -35,12 +35,12 @@ dependencies: - toml - bson - msgpack-python - - nglview + - qcelemental + - qcportal ==0.15.8 - mdtraj - nbval - mypy - typing_extensions - - pydantic - pip: - types-setuptools - types-toml From a606ce639c411be4bc77499bfd128f9232dc707b Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Wed, 30 Aug 2023 15:49:57 -0500 Subject: [PATCH 13/18] Install QCPortal in CI, consistently lint end of files --- .github/workflows/CI.yml | 4 ++++ .pre-commit-config.yaml | 5 +++++ devtools/conda-envs/beta_rc_env.yaml | 2 -- devtools/conda-envs/openeye.yaml | 4 +--- devtools/conda-envs/rdkit-examples.yaml | 6 ++++-- devtools/conda-envs/rdkit.yaml | 4 +--- devtools/conda-envs/test_env.yaml | 4 +--- examples/conformer_energies/.gitignore | 2 +- examples/external/swap_amber_parameters/README.md | 1 - .../using_smirnoff_with_amber_protein_forcefield/.gitignore | 2 +- .../using_smirnoff_with_amber_protein_forcefield/README.md | 1 - examples/toolkit_showcase/sim.mdp | 1 - openff/toolkit/data/molecules/README.md | 1 - openff/toolkit/data/molecules/z_3_hydroxy_propenal.sdf | 2 +- openff/toolkit/data/reference_energies/README.md | 2 +- .../data/reference_energies/reference_after_1007.json.txt | 2 +- openff/toolkit/data/test_forcefields/README.md | 1 - .../data/test_forcefields/frcmod.Frosst_AlkEthOH_withIDs | 1 - .../data/test_forcefields/old/test_ff_0_0_2_spec_0_3.offxml | 2 +- .../old/test_ff_0_0_4_fixed_spec_0_3.offxml | 2 +- .../data/test_forcefields/old/test_ff_0_0_4_spec_0_3.offxml | 2 +- 21 files changed, 24 insertions(+), 27 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dee72a253..712742624 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -108,6 +108,10 @@ jobs: run: | python -m pip install utilities/test_plugins + - name: Install QCPortal + if: ${{ matrix.pydantic-version == 1 }} + run: micromamba install "qcportal ==0.15.8" -c conda-forge + - name: Remove undesired toolkits run: | if [ ! -z "${{ env.PACKAGES_TO_REMOVE }}" ]; then diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1bd35794..6f1355275 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,6 +2,11 @@ ci: autoupdate_schedule: "quarterly" files: ^openff|(^examples/((?!deprecated).)*$) repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: end-of-file-fixer + exclude: '\.(json|pdb)$' - repo: https://github.com/psf/black rev: 23.3.0 hooks: diff --git a/devtools/conda-envs/beta_rc_env.yaml b/devtools/conda-envs/beta_rc_env.yaml index 325732a45..280c1890f 100644 --- a/devtools/conda-envs/beta_rc_env.yaml +++ b/devtools/conda-envs/beta_rc_env.yaml @@ -35,8 +35,6 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal ==0.15.8 - mdtraj - nbval - mypy diff --git a/devtools/conda-envs/openeye.yaml b/devtools/conda-envs/openeye.yaml index 992cfc876..08f9aec28 100644 --- a/devtools/conda-envs/openeye.yaml +++ b/devtools/conda-envs/openeye.yaml @@ -34,7 +34,5 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal ==0.15.8 - mdtraj - - parmed =3 + - parmed =3 \ No newline at end of file diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index 9fb7f94ab..a8cbbc90a 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -4,7 +4,7 @@ channels: dependencies: # Base depends - python - - pydantic + - pydantic =1 - packaging - numpy - networkx @@ -36,7 +36,9 @@ dependencies: - toml - bson - msgpack-python - - qcportal ==0.15.8 + - qcelemental + - qcportal >=0.15 + - qcengine - nbval - mdtraj - pdbfixer diff --git a/devtools/conda-envs/rdkit.yaml b/devtools/conda-envs/rdkit.yaml index de00bb783..6ba2665a1 100644 --- a/devtools/conda-envs/rdkit.yaml +++ b/devtools/conda-envs/rdkit.yaml @@ -33,6 +33,4 @@ dependencies: - pyyaml - toml - bson - - msgpack-python - - qcelemental - - qcportal ==0.15.8 + - msgpack-python \ No newline at end of file diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 2f26508ce..c493a23c2 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -35,8 +35,6 @@ dependencies: - toml - bson - msgpack-python - - qcelemental - - qcportal ==0.15.8 - mdtraj - nbval - mypy @@ -45,4 +43,4 @@ dependencies: - types-setuptools - types-toml - types-PyYAML - - mongo-types + - mongo-types \ No newline at end of file diff --git a/examples/conformer_energies/.gitignore b/examples/conformer_energies/.gitignore index de9960de1..4d155b742 100644 --- a/examples/conformer_energies/.gitignore +++ b/examples/conformer_energies/.gitignore @@ -1,2 +1,2 @@ ruxolitinib.csv -ruxolitinib_conf*_minimized.sdf \ No newline at end of file +ruxolitinib_conf*_minimized.sdf diff --git a/examples/external/swap_amber_parameters/README.md b/examples/external/swap_amber_parameters/README.md index 6e142e031..6b846876d 100644 --- a/examples/external/swap_amber_parameters/README.md +++ b/examples/external/swap_amber_parameters/README.md @@ -5,4 +5,3 @@ This example illustrates how the [ParmEd](http://parmed.github.io/ParmEd/html/in ### BRD4:inhibitor complex * [`swap_existing_ligand_parameters.ipynb`](swap_existing_ligand_parameters.ipynb) contains an example illustrating taking a fully parameterized BRD4 protein-ligand system, with an AMBER protein force field and GAFF ligand parameters, and replacing the ligand parameters with OpenFF parameters from SMIRNOFF format. The BRD4:inhibitor complex is taken from the [free energy benchmark systems living review](https://www.annualreviews.org/doi/abs/10.1146/annurev-biophys-070816-033654) [GitHub repo](https://github.com/MobleyLab/benchmarksets/tree/master/input_files/BRD4). - diff --git a/examples/external/using_smirnoff_with_amber_protein_forcefield/.gitignore b/examples/external/using_smirnoff_with_amber_protein_forcefield/.gitignore index a60daed75..eaf8f224b 100644 --- a/examples/external/using_smirnoff_with_amber_protein_forcefield/.gitignore +++ b/examples/external/using_smirnoff_with_amber_protein_forcefield/.gitignore @@ -1,3 +1,3 @@ complex.* receptor.* -ligand.* \ No newline at end of file +ligand.* diff --git a/examples/external/using_smirnoff_with_amber_protein_forcefield/README.md b/examples/external/using_smirnoff_with_amber_protein_forcefield/README.md index 54d85e96a..cd15f739f 100644 --- a/examples/external/using_smirnoff_with_amber_protein_forcefield/README.md +++ b/examples/external/using_smirnoff_with_amber_protein_forcefield/README.md @@ -3,4 +3,3 @@ ### BRD4:inhibitor complex [`BRD4_inhibitor_benchmark.ipynb`](BRD4_inhibitor_benchmark.ipynb) contains an example illustrating applying Sage and ff14SB parameters to a BRD4:inhibitor complex taken from the [free energy benchmark systems living review](https://www.annualreviews.org/doi/abs/10.1146/annurev-biophys-070816-033654) [GitHub repo](https://github.com/MobleyLab/benchmarksets/tree/master/input_files/BRD4). - diff --git a/examples/toolkit_showcase/sim.mdp b/examples/toolkit_showcase/sim.mdp index 230f5c127..52c7b6508 100644 --- a/examples/toolkit_showcase/sim.mdp +++ b/examples/toolkit_showcase/sim.mdp @@ -60,4 +60,3 @@ constraint-algorithm = LINCS ; Use fast and stable LINCS constraint algorithm continuation = no ; Apply constraints to the initial configuration (important since energy minimisation was unconstrained) lincs-order = 4 ; Increase if you get LINCS errors lincs-iter = 1 ; Increase if you get LINCS errors - diff --git a/openff/toolkit/data/molecules/README.md b/openff/toolkit/data/molecules/README.md index b876cbf55..ae9a7efbc 100644 --- a/openff/toolkit/data/molecules/README.md +++ b/openff/toolkit/data/molecules/README.md @@ -18,4 +18,3 @@ contains all the molecules in `AlkEthOH_tripos.tar.gz/AlkEthOH_test_filt1`. **For all molecule sets** - `*` = `ff` for parm@frosst atom types - `*` = `tripos` for tripos atom types - diff --git a/openff/toolkit/data/molecules/z_3_hydroxy_propenal.sdf b/openff/toolkit/data/molecules/z_3_hydroxy_propenal.sdf index 772665041..c3280f5be 100644 --- a/openff/toolkit/data/molecules/z_3_hydroxy_propenal.sdf +++ b/openff/toolkit/data/molecules/z_3_hydroxy_propenal.sdf @@ -20,4 +20,4 @@ 3 8 1 0 0 0 0 4 9 1 0 0 0 0 M END -$$$$ \ No newline at end of file +$$$$ diff --git a/openff/toolkit/data/reference_energies/README.md b/openff/toolkit/data/reference_energies/README.md index f6ca27845..7ce406f9c 100644 --- a/openff/toolkit/data/reference_energies/README.md +++ b/openff/toolkit/data/reference_energies/README.md @@ -3,4 +3,4 @@ - `reference_after_802.json` - generated by `openff/toolkit/tests/test_energies.py` with conda environment reference_after_802.txt, corresponds to commit 02dba85c51dcff3ee3426d2a407811ac9bac1749 in PR #802, between 0.9.0 and 0.9.1 - `reference_after_1007.json` - generated by `openff/toolkit/tests/test_energies.py` with conda environment reference_after_1007.txt, corresponds to commit 6ac06efb7d0e91a960325cfc45874500af52274c in PR #948, between 0.9.2 and 0.9.3. This change tracks the effect of partial charge normalization on the reference energies of the test set. - Note that that PR #948 was superseded by #1007, since it #948 gained an irreconcilably large merge conflict with master during its development. \ No newline at end of file + Note that that PR #948 was superseded by #1007, since it #948 gained an irreconcilably large merge conflict with master during its development. diff --git a/openff/toolkit/data/reference_energies/reference_after_1007.json.txt b/openff/toolkit/data/reference_energies/reference_after_1007.json.txt index abef81c91..f963047cb 100644 --- a/openff/toolkit/data/reference_energies/reference_after_1007.json.txt +++ b/openff/toolkit/data/reference_energies/reference_after_1007.json.txt @@ -347,4 +347,4 @@ dependencies: - pytraj==2.0.5 - sander==16.0 - z3-solver==4.8.10.0 -prefix: /Users/jeffreywagner/miniconda3/envs/off-tk-dev \ No newline at end of file +prefix: /Users/jeffreywagner/miniconda3/envs/off-tk-dev diff --git a/openff/toolkit/data/test_forcefields/README.md b/openff/toolkit/data/test_forcefields/README.md index 062f1fa5c..998d72950 100644 --- a/openff/toolkit/data/test_forcefields/README.md +++ b/openff/toolkit/data/test_forcefields/README.md @@ -20,4 +20,3 @@ - `GBSA_HCT-1.0.offxml`: An experimental force field used in validation tests against OpenMM's implementation of the [Hawkins-Cramer-Truhlar](http://docs.openmm.org/latest/userguide/zbibliography.html#hawkins1995) GBSA model (corresponding to igb=1 in AMBER) - `GBSA_OBC1-1.0.offxml`: An experimental force field used in validation tests against OpenMM's implementation of the [Onufriev-Bashford-Case](http://docs.openmm.org/latest/userguide/zbibliography.html#onufriev2004) using the GB(OBC)I model (corresponding to igb=2 in AMBER) - `GBSA_OBC2-1.0.offxml`: An experimental force field used in validation tests against OpenMM's implementation of the [Onufriev-Bashford-Case](http://docs.openmm.org/latest/userguide/zbibliography.html#onufriev2004) using the GB(OBC)II model (corresponding to igb=5 in AMBER) - diff --git a/openff/toolkit/data/test_forcefields/frcmod.Frosst_AlkEthOH_withIDs b/openff/toolkit/data/test_forcefields/frcmod.Frosst_AlkEthOH_withIDs index 26814666c..19ed2b7aa 100644 --- a/openff/toolkit/data/test_forcefields/frcmod.Frosst_AlkEthOH_withIDs +++ b/openff/toolkit/data/test_forcefields/frcmod.Frosst_AlkEthOH_withIDs @@ -82,4 +82,3 @@ MOD4 RE CT 1.9080 0.1094 PrmIdVdw008 Spellmeyer END - diff --git a/openff/toolkit/data/test_forcefields/old/test_ff_0_0_2_spec_0_3.offxml b/openff/toolkit/data/test_forcefields/old/test_ff_0_0_2_spec_0_3.offxml index 1d21d8b59..9640c1158 100644 --- a/openff/toolkit/data/test_forcefields/old/test_ff_0_0_2_spec_0_3.offxml +++ b/openff/toolkit/data/test_forcefields/old/test_ff_0_0_2_spec_0_3.offxml @@ -326,4 +326,4 @@ - \ No newline at end of file + diff --git a/openff/toolkit/data/test_forcefields/old/test_ff_0_0_4_fixed_spec_0_3.offxml b/openff/toolkit/data/test_forcefields/old/test_ff_0_0_4_fixed_spec_0_3.offxml index ed924698d..b5ec0d631 100644 --- a/openff/toolkit/data/test_forcefields/old/test_ff_0_0_4_fixed_spec_0_3.offxml +++ b/openff/toolkit/data/test_forcefields/old/test_ff_0_0_4_fixed_spec_0_3.offxml @@ -334,4 +334,4 @@ - \ No newline at end of file + diff --git a/openff/toolkit/data/test_forcefields/old/test_ff_0_0_4_spec_0_3.offxml b/openff/toolkit/data/test_forcefields/old/test_ff_0_0_4_spec_0_3.offxml index 02ddbb90e..0bb6438d7 100644 --- a/openff/toolkit/data/test_forcefields/old/test_ff_0_0_4_spec_0_3.offxml +++ b/openff/toolkit/data/test_forcefields/old/test_ff_0_0_4_spec_0_3.offxml @@ -334,4 +334,4 @@ - \ No newline at end of file + From 0f04675fbe5b93155f563e003b5891e8d258df3e Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 31 Aug 2023 09:13:23 -0500 Subject: [PATCH 14/18] Update no-nglview test --- devtools/conda-envs/rdkit-examples.yaml | 2 +- openff/toolkit/_tests/test_molecule.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index a8cbbc90a..6e6fe4783 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -37,7 +37,7 @@ dependencies: - bson - msgpack-python - qcelemental - - qcportal >=0.15 + - qcportal ==0.15.8 - qcengine - nbval - mdtraj diff --git a/openff/toolkit/_tests/test_molecule.py b/openff/toolkit/_tests/test_molecule.py index 3c6d1af27..ea9dc46a8 100644 --- a/openff/toolkit/_tests/test_molecule.py +++ b/openff/toolkit/_tests/test_molecule.py @@ -3745,8 +3745,15 @@ def test_visualize_openeye(self): ) def test_ipython_repr_no_nglview(self): """Test that the default Molecule repr does not break when nglview is not installed""" + from openff.toolkit.utils.toolkits import OPENEYE_AVAILABLE, RDKIT_AVAILABLE + molecule = Molecule().from_smiles("CCO") - molecule._ipython_display_() + + if RDKIT_AVAILABLE: + # the default is `backend="rdkit"` + molecule.visualize() + elif OPENEYE_AVAILABLE: + molecule.visualize(backend="openeye") def test_get_coordinates(self): from openff.toolkit.utils.viz import _OFFTrajectoryNGLView From af5eb726a2c8cab25ac710069bd6740e856078c9 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 31 Aug 2023 09:16:29 -0500 Subject: [PATCH 15/18] Skip visualization tests with no IPython --- openff/toolkit/_tests/test_molecule.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openff/toolkit/_tests/test_molecule.py b/openff/toolkit/_tests/test_molecule.py index ea9dc46a8..cf20017a4 100644 --- a/openff/toolkit/_tests/test_molecule.py +++ b/openff/toolkit/_tests/test_molecule.py @@ -3674,8 +3674,9 @@ def test_deepcopy_not_shallow(self): assert mol_source._partial_charges is not mol_copy._partial_charges +@requires_pkg("IPython") class TestMoleculeVisualization: - @requires_pkg("IPython") + @requires_rdkit def test_visualize_rdkit(self): """ From b6db523755577437f92e295954397df9b360f471 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 31 Aug 2023 09:18:39 -0500 Subject: [PATCH 16/18] Drop pydantic from environments --- devtools/conda-envs/openeye.yaml | 1 - devtools/conda-envs/rdkit-examples.yaml | 1 - devtools/conda-envs/rdkit.yaml | 3 +-- openff/toolkit/_tests/test_molecule.py | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/devtools/conda-envs/openeye.yaml b/devtools/conda-envs/openeye.yaml index 08f9aec28..abd25875f 100644 --- a/devtools/conda-envs/openeye.yaml +++ b/devtools/conda-envs/openeye.yaml @@ -5,7 +5,6 @@ channels: dependencies: # Base depends - python - - pydantic - packaging - numpy - networkx diff --git a/devtools/conda-envs/rdkit-examples.yaml b/devtools/conda-envs/rdkit-examples.yaml index 6e6fe4783..93bc94c6c 100644 --- a/devtools/conda-envs/rdkit-examples.yaml +++ b/devtools/conda-envs/rdkit-examples.yaml @@ -4,7 +4,6 @@ channels: dependencies: # Base depends - python - - pydantic =1 - packaging - numpy - networkx diff --git a/devtools/conda-envs/rdkit.yaml b/devtools/conda-envs/rdkit.yaml index 6ba2665a1..392e373f2 100644 --- a/devtools/conda-envs/rdkit.yaml +++ b/devtools/conda-envs/rdkit.yaml @@ -4,7 +4,6 @@ channels: dependencies: # Base depends - python - - pydantic =1 - packaging - numpy - networkx @@ -33,4 +32,4 @@ dependencies: - pyyaml - toml - bson - - msgpack-python \ No newline at end of file + - msgpack-python diff --git a/openff/toolkit/_tests/test_molecule.py b/openff/toolkit/_tests/test_molecule.py index cf20017a4..5de3ccf62 100644 --- a/openff/toolkit/_tests/test_molecule.py +++ b/openff/toolkit/_tests/test_molecule.py @@ -3676,7 +3676,6 @@ def test_deepcopy_not_shallow(self): @requires_pkg("IPython") class TestMoleculeVisualization: - @requires_rdkit def test_visualize_rdkit(self): """ From b7bdf782c244cd041a680ee39ce3ee8e6c94bfd4 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 31 Aug 2023 10:28:11 -0500 Subject: [PATCH 17/18] Also QCElemental --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 712742624..4e49e2f87 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -110,7 +110,7 @@ jobs: - name: Install QCPortal if: ${{ matrix.pydantic-version == 1 }} - run: micromamba install "qcportal ==0.15.8" -c conda-forge + run: micromamba install qcelemental "qcportal ==0.15.8" -c conda-forge - name: Remove undesired toolkits run: | From 2d654ef3903d430becc26d32269abf7d361ea78d Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 31 Aug 2023 10:43:32 -0500 Subject: [PATCH 18/18] Don't be silly --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4e49e2f87..1ae16e632 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -173,7 +173,7 @@ jobs: pytest -v --no-cov --nbval --ignore docs/_build/ docs/ - name: Run examples in docstrings - if: ${{ matrix.rdkit == true && matrix.openeye == true }} + if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.pydantic-version == 1 }} run: | pytest -v --no-cov --doctest-modules --ignore=openff/toolkit/_tests/ --ignore=openff/toolkit/data/ --ignore=openff/toolkit/utils/utils.py openff/