From 0d22bad4b696494628d6fc2bd8c6b1416cd3b89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Sat, 28 Sep 2024 17:35:09 +0200 Subject: [PATCH] Split into base and wrapper --- pysqa/__main__.py | 2 +- pysqa/{ => base}/cmd.py | 0 pysqa/{ext => base}/modular.py | 0 pysqa/{ext => base}/remote.py | 0 pysqa/ext/__init__.py | 0 pysqa/queueadapter.py | 4 ++-- tests/test_cmd.py | 3 +-- 7 files changed, 4 insertions(+), 5 deletions(-) rename pysqa/{ => base}/cmd.py (100%) rename pysqa/{ext => base}/modular.py (100%) rename pysqa/{ext => base}/remote.py (100%) delete mode 100644 pysqa/ext/__init__.py diff --git a/pysqa/__main__.py b/pysqa/__main__.py index 1f0e4eb6..09977cdd 100644 --- a/pysqa/__main__.py +++ b/pysqa/__main__.py @@ -1,6 +1,6 @@ import sys -from pysqa.cmd import command_line +from pysqa.base.cmd import command_line if __name__ == "__main__": command_line(arguments_lst=sys.argv[1:]) diff --git a/pysqa/cmd.py b/pysqa/base/cmd.py similarity index 100% rename from pysqa/cmd.py rename to pysqa/base/cmd.py diff --git a/pysqa/ext/modular.py b/pysqa/base/modular.py similarity index 100% rename from pysqa/ext/modular.py rename to pysqa/base/modular.py diff --git a/pysqa/ext/remote.py b/pysqa/base/remote.py similarity index 100% rename from pysqa/ext/remote.py rename to pysqa/base/remote.py diff --git a/pysqa/ext/__init__.py b/pysqa/ext/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/pysqa/queueadapter.py b/pysqa/queueadapter.py index 2e3ca760..97385a4b 100644 --- a/pysqa/queueadapter.py +++ b/pysqa/queueadapter.py @@ -5,7 +5,7 @@ from pysqa.base.config import QueueAdapterWithConfig, read_config from pysqa.base.core import execute_command -from pysqa.ext.modular import ModularQueueAdapter +from pysqa.base.modular import ModularQueueAdapter class QueueAdapter(object): @@ -361,7 +361,7 @@ def set_queue_adapter( # The RemoteQueueAdapter has additional dependencies, namely paramiko and tqdm. # By moving the import to this line it only fails when the user specifies the # RemoteQueueAdapter in their pysqa configuration. - from pysqa.ext.remote import RemoteQueueAdapter + from pysqa.base.remote import RemoteQueueAdapter return RemoteQueueAdapter( config=config, directory=directory, execute_command=execute_command diff --git a/tests/test_cmd.py b/tests/test_cmd.py index f084da9e..acd6444c 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,9 +1,8 @@ import os import io import json -import unittest import unittest.mock -from pysqa.cmd import command_line +from pysqa.base.cmd import command_line class TestCMD(unittest.TestCase):