Skip to content

Commit

Permalink
Refactor and remove redundant imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Nov 14, 2023
1 parent a963e1c commit ead020c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/somd2/config/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

from openmm import Platform as _Platform
from pathlib import Path as _Path
from somd2 import _logger

import sire as _sr

from somd2 import _logger

# List of supported Sire platforms.
_sire_platforms = _sr.options.Platform.options()
Expand Down
2 changes: 1 addition & 1 deletion src/somd2/runner/_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#####################################################################

__all__ = ["Dynamics"]

import platform as _platform
from pathlib import Path as _Path

Expand All @@ -28,7 +29,6 @@
from ..io import parquet_append as _parquet_append

from somd2 import _logger
import platform as _platform

from ._runner import _lam_sym

Expand Down
2 changes: 1 addition & 1 deletion src/somd2/runner/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
__all__ = ["Runner"]

import platform as _platform

from sire import stream as _stream
from sire.system import System as _System

Expand All @@ -30,7 +31,6 @@
from ..io import dict_to_yaml as _dict_to_yaml

from somd2 import _logger
import platform as _platform

if _platform.system() == "Windows":
_lam_sym = "lambda"
Expand Down
11 changes: 4 additions & 7 deletions tests/runner/test_config.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import pytest
import tempfile

import sire as sr

import somd2

from somd2.config import Config
from somd2.runner import Runner

import platform
import pytest


def test_dynamics_options():
"""Validate that dynamics options are set correctly."""
Expand Down Expand Up @@ -73,10 +74,6 @@ def test_dynamics_options():
) == d.integrator().__class__.__name__.lower().replace("integrator", "")


# Skip on windows due to file permission issues
# @pytest.mark.skipif(
# platform.system() == "Windows", reason="File permission issues on Windows"
# )
def test_logfile_creation():
# Test that the logfile is created by either the initialisation of the runner or of a config
with tempfile.TemporaryDirectory() as tmpdir:
Expand Down
9 changes: 6 additions & 3 deletions tests/runner/test_restart.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from pathlib import Path

import tempfile
import pytest

import sire as sr

from somd2.runner import Runner
from somd2.config import Config
from somd2.io import *
from pathlib import Path
import sire as sr
import pytest


def test_restart():
Expand Down

0 comments on commit ead020c

Please sign in to comment.