From 6ae3ea7f07b8b5549ad76a40877ea72b39493408 Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:08:30 -0700 Subject: [PATCH 1/3] ignore F401 on __init__.py files --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f5bf958..b6815e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,6 +97,9 @@ omit = [ [tool.flake8] max-line-length = 88 extend-ignore = ['E203',] +per-file-ignores = [ + '__init__.py:F401', +] [tool.isort] profile = "black" From cc04be9e11fabd85ef7178a124f2236e1fb713d5 Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:29:54 -0700 Subject: [PATCH 2/3] fix flake8 errors --- openfe_gromacs/protocols/gromacs_md/md_methods.py | 2 -- openfe_gromacs/tests/protocols/conftest.py | 2 -- openfe_gromacs/tests/protocols/test_gromacs_md.py | 3 ++- openfe_gromacs/tests/protocols/test_md_settings.py | 8 -------- pyproject.toml | 6 ++++++ 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/openfe_gromacs/protocols/gromacs_md/md_methods.py b/openfe_gromacs/protocols/gromacs_md/md_methods.py index 9ba71bf..9d4efa2 100644 --- a/openfe_gromacs/protocols/gromacs_md/md_methods.py +++ b/openfe_gromacs/protocols/gromacs_md/md_methods.py @@ -25,11 +25,9 @@ from gufe import ChemicalSystem, SmallMoleculeComponent, settings from openfe.protocols.openmm_utils import ( charge_generation, - settings_validation, system_creation, system_validation, ) -from openfe.protocols.openmm_utils.omm_settings import BasePartialChargeSettings from openfe.utils import log_system_probe, without_oechem_backend from openff.interchange import Interchange from openff.toolkit.topology import Molecule as OFFMolecule diff --git a/openfe_gromacs/tests/protocols/conftest.py b/openfe_gromacs/tests/protocols/conftest.py index ac783c2..b2caaa8 100644 --- a/openfe_gromacs/tests/protocols/conftest.py +++ b/openfe_gromacs/tests/protocols/conftest.py @@ -9,8 +9,6 @@ from rdkit import Chem from rdkit.Geometry import Point3D -import openfe_gromacs - @pytest.fixture def benzene_vacuum_system(benzene_modifications): diff --git a/openfe_gromacs/tests/protocols/test_gromacs_md.py b/openfe_gromacs/tests/protocols/test_gromacs_md.py index c5f65cd..3cd7b07 100644 --- a/openfe_gromacs/tests/protocols/test_gromacs_md.py +++ b/openfe_gromacs/tests/protocols/test_gromacs_md.py @@ -45,7 +45,8 @@ def test_serialize_protocol(): def test_create_independent_repeat_ids(benzene_system): # if we create two dags each with 3 repeats, they should give 6 repeat_ids - # this allows multiple DAGs in flight for one Transformation that don't clash on gather + # this allows multiple DAGs in flight for one Transformation that don't + # clash on gather settings = GromacsMDProtocol.default_settings() # Default protocol is 1 repeat, change to 3 repeats settings.protocol_repeats = 3 diff --git a/openfe_gromacs/tests/protocols/test_md_settings.py b/openfe_gromacs/tests/protocols/test_md_settings.py index b436423..3473336 100644 --- a/openfe_gromacs/tests/protocols/test_md_settings.py +++ b/openfe_gromacs/tests/protocols/test_md_settings.py @@ -1,18 +1,10 @@ # This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe-gromacs -import json -import pathlib -from unittest import mock - -import gufe import pytest from openff.units import unit -import openfe_gromacs from openfe_gromacs.protocols.gromacs_md.md_methods import ( GromacsMDProtocol, - GromacsMDProtocolResult, - GromacsMDSetupUnit, ) diff --git a/pyproject.toml b/pyproject.toml index b6815e3..9e446bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,6 +100,12 @@ extend-ignore = ['E203',] per-file-ignores = [ '__init__.py:F401', ] +builtins = [ + "nanometer", + "picosecond", + "kelvin", + "bar", +] [tool.isort] profile = "black" From 5aa6878b062afeca98f611c7bf418de603beb9ab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 20:30:07 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- openfe_gromacs/tests/protocols/test_md_settings.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openfe_gromacs/tests/protocols/test_md_settings.py b/openfe_gromacs/tests/protocols/test_md_settings.py index 3473336..90f540a 100644 --- a/openfe_gromacs/tests/protocols/test_md_settings.py +++ b/openfe_gromacs/tests/protocols/test_md_settings.py @@ -3,9 +3,7 @@ import pytest from openff.units import unit -from openfe_gromacs.protocols.gromacs_md.md_methods import ( - GromacsMDProtocol, -) +from openfe_gromacs.protocols.gromacs_md.md_methods import GromacsMDProtocol def test_settings_pos_or_zero_error():