Skip to content

Commit 5572024

Browse files
committed
Isort/Black
1 parent d1a86d2 commit 5572024

File tree

11 files changed

+29
-22
lines changed

11 files changed

+29
-22
lines changed

smartsim/settings/builders/launch/alps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import typing as t
3030

3131
from smartsim.log import get_logger
32-
from smartsim.settings.dispatch import default_dispatcher, ShellLauncher
32+
from smartsim.settings.dispatch import ShellLauncher, default_dispatcher
3333

3434
from ...common import StringArgument, set_check_input
3535
from ...launchCommand import LauncherType

smartsim/settings/builders/launch/dragon.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,16 @@ def finalize(
7575
return DragonRunRequest(
7676
exe=exe_,
7777
exe_args=args,
78-
path=os.getcwd(), # FIXME: Currently this is hard coded because
79-
# the schema requires it, but in future,
80-
# it is almost certainly necessary that
81-
# this will need to be injected by the
82-
# user or by us to have the command
83-
# execute next to any generated files. A
84-
# similar problem exists for the other
85-
# settings.
86-
# TODO: Find a way to inject this path
78+
# FIXME: Currently this is hard coded because
79+
# the schema requires it, but in future,
80+
# it is almost certainly necessary that
81+
# this will need to be injected by the
82+
# user or by us to have the command
83+
# execute next to any generated files. A
84+
# similar problem exists for the other
85+
# settings.
86+
# TODO: Find a way to inject this path
87+
path=os.getcwd(),
8788
env=env,
8889
current_env=dict(os.environ),
8990
**self._launch_args,

smartsim/settings/builders/launch/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import typing as t
3030

3131
from smartsim.log import get_logger
32-
from smartsim.settings.dispatch import default_dispatcher, ShellLauncher
32+
from smartsim.settings.dispatch import ShellLauncher, default_dispatcher
3333

3434
from ...common import StringArgument, set_check_input
3535
from ...launchCommand import LauncherType

smartsim/settings/builders/launch/lsf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import typing as t
3030

3131
from smartsim.log import get_logger
32-
from smartsim.settings.dispatch import default_dispatcher, ShellLauncher
32+
from smartsim.settings.dispatch import ShellLauncher, default_dispatcher
3333

3434
from ...common import StringArgument, set_check_input
3535
from ...launchCommand import LauncherType

smartsim/settings/builders/launch/mpi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import typing as t
3030

3131
from smartsim.log import get_logger
32-
from smartsim.settings.dispatch import default_dispatcher, ShellLauncher
32+
from smartsim.settings.dispatch import ShellLauncher, default_dispatcher
3333

3434
from ...common import set_check_input
3535
from ...launchCommand import LauncherType

smartsim/settings/builders/launch/pals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import typing as t
3030

3131
from smartsim.log import get_logger
32-
from smartsim.settings.dispatch import default_dispatcher, ShellLauncher
32+
from smartsim.settings.dispatch import ShellLauncher, default_dispatcher
3333

3434
from ...common import StringArgument, set_check_input
3535
from ...launchCommand import LauncherType

smartsim/settings/builders/launch/slurm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import typing as t
3232

3333
from smartsim.log import get_logger
34-
from smartsim.settings.dispatch import default_dispatcher, ShellLauncher
34+
from smartsim.settings.dispatch import ShellLauncher, default_dispatcher
3535

3636
from ...common import set_check_input
3737
from ...launchCommand import LauncherType
@@ -42,6 +42,7 @@
4242

4343
logger = get_logger(__name__)
4444

45+
4546
@default_dispatcher.dispatch(to_launcher=ShellLauncher)
4647
class SlurmArgBuilder(LaunchArgBuilder[t.Sequence[str]]):
4748
def launcher_str(self) -> str:

smartsim/settings/dispatch.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,12 @@
2727
from __future__ import annotations
2828

2929
import subprocess as sp
30-
import uuid
3130
import typing as t
32-
33-
from smartsim.error import errors
31+
import uuid
3432

3533
if t.TYPE_CHECKING:
3634
from typing_extensions import Self
35+
3736
from smartsim.experiment import Experiment
3837
from smartsim.settings.builders import LaunchArgBuilder
3938

smartsim/settings/launchSettings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ def env_vars(self, value: t.Dict[str, str]) -> None:
9595
"""Set the environment variables."""
9696
self._env_vars = copy.deepcopy(value)
9797

98-
def _get_arg_builder(self, launch_args: StringArgument | None) -> LaunchArgBuilder[t.Any]:
98+
def _get_arg_builder(
99+
self, launch_args: StringArgument | None
100+
) -> LaunchArgBuilder[t.Any]:
99101
"""Map the Launcher to the LaunchArgBuilder"""
100102
if self._launcher == LauncherType.Slurm:
101103
return SlurmArgBuilder(launch_args)

tests/temp_tests/test_settings/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2525
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

27-
import pytest
2827
from unittest.mock import Mock
2928

30-
from smartsim.settings.builders import launchArgBuilder as launch
29+
import pytest
30+
3131
from smartsim.settings import dispatch
32+
from smartsim.settings.builders import launchArgBuilder as launch
3233

3334

3435
@pytest.fixture

0 commit comments

Comments
 (0)