Skip to content

Commit

Permalink
Move tests/common to tests/morpheus/common (#1942)
Browse files Browse the repository at this point in the history
Authors:
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - David Gardner (https://github.com/dagardner-nv)

URL: #1942
  • Loading branch information
AnuradhaKaruppiah authored Oct 14, 2024
1 parent 4df70a7 commit 181d0c6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions examples/ransomware_detection/stages/create_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@

from dask.distributed import Client

from common.data_models import FeatureConfig # pylint: disable=no-name-in-module
from common.feature_extractor import FeatureExtractor # pylint: disable=no-name-in-module
from morpheus.cli.register_stage import register_stage
from morpheus.config import Config
from morpheus.config import PipelineModes
from morpheus.messages import ControlMessage
from morpheus.pipeline.control_message_stage import ControlMessageStage
from morpheus.stages.input.appshield_source_stage import AppShieldMessageMeta

from common.data_models import FeatureConfig # pylint: disable=no-name-in-module # isort: skip
from common.feature_extractor import FeatureExtractor # pylint: disable=no-name-in-module # isort: skip


@register_stage("create-features", modes=[PipelineModes.FIL])
class CreateFeaturesRWStage(ControlMessageStage):
Expand Down
3 changes: 2 additions & 1 deletion examples/ransomware_detection/stages/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
import pandas as pd

import morpheus._lib.messages as _messages
from common.data_models import SnapshotData # pylint: disable=no-name-in-module
from morpheus.cli.register_stage import register_stage
from morpheus.common import TypeId
from morpheus.config import Config
from morpheus.config import PipelineModes
from morpheus.messages import ControlMessage
from morpheus.stages.preprocess.preprocess_base_stage import PreprocessBaseStage

from common.data_models import SnapshotData # pylint: disable=no-name-in-module #isort:skip


@register_stage("ransomware-preprocess", modes=[PipelineModes.FIL])
class PreprocessingRWStage(PreprocessBaseStage):
Expand Down
3 changes: 1 addition & 2 deletions tests/examples/ransomware_detection/test_create_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ def test_constructor(
rwd_conf: dict,
interested_plugins: typing.List[str]):
mock_dask_client.return_value = mock_dask_client
from stages.create_features import CreateFeaturesRWStage

from common.data_models import FeatureConfig
from common.feature_extractor import FeatureExtractor
from stages.create_features import CreateFeaturesRWStage

n_workers = 12
threads_per_worker = 8
Expand Down
3 changes: 1 addition & 2 deletions tests/examples/ransomware_detection/test_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ def test_rollover_pending_snapshots_empty_results(self,
assert len(stage._snapshot_dict) == 0

def test_merge_curr_and_prev_snapshots(self, config: Config, rwd_conf: dict, dataset_pandas: DatasetManager):
from stages.preprocessing import PreprocessingRWStage

from common.data_models import SnapshotData
from stages.preprocessing import PreprocessingRWStage

snapshot_ids = [5, 8, 10, 13]
source_pid_process = "123_test.exe"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 181d0c6

Please sign in to comment.