Skip to content

Commit

Permalink
AL: more import fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adalundhe committed Jun 19, 2024
1 parent d72fafb commit 7bb058f
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.3
0.1.4
1 change: 0 additions & 1 deletion hyperscale/core/engines/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from .types.registry import registered_engines
4 changes: 2 additions & 2 deletions hyperscale/core/engines/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import threading
import uuid
from asyncio import Future
from typing import Dict, Generic, Iterable, Optional, Union
from typing import (Dict, Generic, Iterable, Optional, Union, Unpack,)

from typing_extensions import TypeVarTuple, Unpack

Expand Down Expand Up @@ -96,7 +96,7 @@ def metadata_string(self):
return f'Graph - {self.graph_name}:{self.graph_id} - thread:{self.thread_id} - process:{self.process_id} - Stage: {self.stage_name}:{self.stage_id} - '

@property
def plugin(self) -> Dict[str, Union[Unpack[T]]]:
def plugin(self) -> Dict[str, Union[tuple[*T]]]:
self._plugin._config = self._config
self._plugin.actions = self.actions
self._plugin.metadata_string = self.metadata_string
Expand Down
5 changes: 0 additions & 5 deletions hyperscale/core/engines/client/client_types/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
MercuryHTTP2Client,
MercuryHTTPClient,
MercuryPlaywrightClient,
MercuryTaskRunner,
MercuryUDPClient,
MercuryWebsocketClient,
)
Expand All @@ -24,7 +23,6 @@
from hyperscale.core.engines.types.http import HTTPAction, HTTPResult
from hyperscale.core.engines.types.http2 import HTTP2Action, HTTP2Result
from hyperscale.core.engines.types.playwright import PlaywrightCommand, PlaywrightResult
from hyperscale.core.engines.types.task import Task, TaskResult
from hyperscale.core.engines.types.udp import UDPAction, UDPResult
from hyperscale.core.engines.types.websocket import WebsocketAction, WebsocketResult
from hyperscale.core.experiments.mutations.types.base.mutation import Mutation
Expand All @@ -40,7 +38,6 @@
MercuryHTTPClient,
MercuryHTTP2Client,
MercuryPlaywrightClient,
MercuryTaskRunner,
MercuryUDPClient,
MercuryWebsocketClient
)
Expand All @@ -52,7 +49,6 @@
HTTPAction,
HTTP2Action,
PlaywrightCommand,
Task,
UDPAction,
WebsocketAction
)
Expand All @@ -64,7 +60,6 @@
HTTPResult,
HTTP2Result,
PlaywrightResult,
TaskResult,
UDPResult,
WebsocketResult
)
Expand Down
6 changes: 2 additions & 4 deletions hyperscale/core/engines/client/config.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from typing import Dict, List, Union
from typing import Dict, List, Union, Any

import psutil

from hyperscale.core.experiments.mutations.types.base.mutation import Mutation

from .time_parser import TimeParser
from .tracing_config import TracingConfig

Expand Down Expand Up @@ -49,7 +47,7 @@ def __init__(self, **kwargs) -> None:
self.playwright_options = kwargs.get('playwright_options', {})
self.experiment: Dict[str, Union[str, int, List[float]]] = kwargs.get('experiment', {})
self.tracing: Union[TracingConfig, None] = kwargs.get('tracing')
self.mutations: Union[List[Mutation], None] = kwargs.get('mutations', [])
self.mutations: Union[List[Any], None] = kwargs.get('mutations', [])
self.actions_filepaths: Union[Dict[str, str], None] = kwargs.get('actions_filepaths')

def copy(self):
Expand Down
3 changes: 1 addition & 2 deletions hyperscale/core/engines/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
from .http3 import MercuryHTTP3Client
from .playwright import MercuryPlaywrightClient
from .websocket import MercuryWebsocketClient
from .udp import MercuryUDPClient
from .task import MercuryTaskRunner
from .udp import MercuryUDPClient
4 changes: 2 additions & 2 deletions hyperscale/core/engines/types/common/results_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
from hyperscale.core.engines.types.http import HTTPResult
from hyperscale.core.engines.types.http2 import HTTP2Result
from hyperscale.core.engines.types.playwright import PlaywrightResult
from hyperscale.core.engines.types.task import TaskResult
from hyperscale.core.engines.types.udp import UDPResult
from hyperscale.core.engines.types.websocket import WebsocketResult
from hyperscale.core.personas.streaming.stream_analytics import StreamAnalytics
from hyperscale.data.serializers import Serializer
from hyperscale.data.serializers.serializer import Serializer
from hyperscale.core.engines.types.task.result import TaskResult
from hyperscale.monitoring import CPUMonitor, MemoryMonitor

ResultsBatch = Dict[str, Union[List[BaseResult], float]]
Expand Down
2 changes: 1 addition & 1 deletion hyperscale/core/engines/types/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .http2 import MercuryHTTP2Client
from .http3 import MercuryHTTP3Client
from .playwright import MercuryPlaywrightClient
from .task import MercuryTaskRunner
from .task.runner import MercuryTaskRunner
from .udp import MercuryUDPClient
from .websocket import MercuryWebsocketClient
from .common.types import RequestTypes
Expand Down
3 changes: 0 additions & 3 deletions hyperscale/core/engines/types/task/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from .runner import MercuryTaskRunner
from .task import Task
from .result import TaskResult
2 changes: 1 addition & 1 deletion hyperscale/core/graphs/stages/execute/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
registered_personas,
)
from hyperscale.core.personas.streaming.stream_analytics import StreamAnalytics
from hyperscale.data.serializers import Serializer
from hyperscale.data.serializers.serializer import Serializer
from hyperscale.logging import logging_manager
from hyperscale.monitoring import CPUMonitor, MemoryMonitor
from hyperscale.plugins.types.extension.extension_plugin import ExtensionPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from hyperscale.core.hooks.types.task.hook import TaskHook
from hyperscale.core.personas import get_persona
from hyperscale.core.personas.persona_registry import registered_personas
from hyperscale.data.serializers import Serializer
from hyperscale.data.serializers.serializer import Serializer
from hyperscale.logging.hyperscale_logger import HyperscaleLogger, LoggerTypes, logging_manager
from hyperscale.plugins.types.engine.engine_plugin import EnginePlugin
from hyperscale.plugins.types.extension.extension_plugin import ExtensionPlugin
Expand Down
2 changes: 1 addition & 1 deletion hyperscale/core/graphs/stages/optimize/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from hyperscale.core.hooks.types.internal.decorator import Internal
from hyperscale.core.hooks.types.task.hook import TaskHook
from hyperscale.core.personas.streaming.stream_analytics import StreamAnalytics
from hyperscale.data.serializers import Serializer
from hyperscale.data.serializers.serializer import Serializer
from hyperscale.logging import logging_manager
from hyperscale.monitoring import CPUMonitor, MemoryMonitor
from hyperscale.monitoring.base.exceptions import MonitorKilledError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from hyperscale.core.hooks.types.task.hook import TaskHook
from hyperscale.core.personas.persona_registry import registered_personas
from hyperscale.core.personas.streaming.stream_analytics import StreamAnalytics
from hyperscale.data.serializers import Serializer
from hyperscale.data.serializers.serializer import Serializer
from hyperscale.logging.hyperscale_logger import HyperscaleLogger, LoggerTypes
from hyperscale.monitoring import CPUMonitor, MemoryMonitor
from hyperscale.plugins.types.engine.engine_plugin import EnginePlugin
Expand Down
1 change: 0 additions & 1 deletion hyperscale/data/serializers/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from .serializer import Serializer
3 changes: 2 additions & 1 deletion hyperscale/data/serializers/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from hyperscale.core.engines.types.websocket.result import WebsocketResult
from hyperscale.core.hooks.types.action.hook import ActionHook
from hyperscale.core.hooks.types.task.hook import TaskHook
from .serializer_types.task.task_serializer import TaskSerializer

from .serializer_types import (
GraphQLHTTP2Serializer,
Expand All @@ -34,7 +35,6 @@
HTTP3Serializer,
HTTPSerializer,
PlaywrightSerializer,
TaskSerializer,
UDPSerializer,
WebsocketSerializer,
)
Expand Down Expand Up @@ -67,6 +67,7 @@
]



class Serializer:

def __init__(self) -> None:
Expand Down
1 change: 0 additions & 1 deletion hyperscale/data/serializers/serializer_types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
from .http2.http2_serializer import HTTP2Serializer
from .http3.http3_serializer import HTTP3Serializer
from .playwright.playwright_serializer import PlaywrightSerializer
from .task.task_serializer import TaskSerializer
from .udp.udp_serializer import UDPSerializer
from .websocket.websocket_serializer import WebsocketSerializer
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

from hyperscale.core.engines.types.common.timeouts import Timeouts
from hyperscale.core.engines.types.common.types import RequestTypes
from hyperscale.core.engines.types.task.result import TaskResult
from hyperscale.core.engines.types.task.runner import MercuryTaskRunner
from hyperscale.core.engines.types.task.task import Task
from hyperscale.core.engines.types.task.runner import (
MercuryTaskRunner,
TaskResult,
Task
)
from hyperscale.data.serializers.serializer_types.common.base_serializer import (
BaseSerializer,
)
Expand Down

0 comments on commit 7bb058f

Please sign in to comment.