From f380aec9d7e16cd9add7937e4aa54d1f512bacce Mon Sep 17 00:00:00 2001 From: h1alexbel Date: Mon, 30 Dec 2024 13:26:20 +0300 Subject: [PATCH] feat(#283): no lpm tests --- sr-data/src/tests/resources/training.csv | 10 ----- sr-data/src/tests/test_label_propagation.py | 47 --------------------- 2 files changed, 57 deletions(-) delete mode 100644 sr-data/src/tests/resources/training.csv delete mode 100644 sr-data/src/tests/test_label_propagation.py diff --git a/sr-data/src/tests/resources/training.csv b/sr-data/src/tests/resources/training.csv deleted file mode 100644 index 3133e57e..00000000 --- a/sr-data/src/tests/resources/training.csv +++ /dev/null @@ -1,10 +0,0 @@ -repo,releases,pulls,issues,branches,label -arconia-io/arconia,5,0,9,1,NON -amaseng/myinvois-open-sdk,0,5,0,6,NON -ErayMert/microservice-log-tracing,0,0,0,1,SR -aleixmorgadas/thin-ports-and-adapters,0,0,0,1, -Tushar-Kapil/DSA-Notes,0,0,0,1,SR -MEEPofFaith/hallucinogen,8,0,0,1, -dee-coder01/BusBuddy,0,17,0,11, -jon-mil-92/DisplayHotKeys,7,0,0,1, -nilsreichardt/gad24-tests,0,13,0,10, \ No newline at end of file diff --git a/sr-data/src/tests/test_label_propagation.py b/sr-data/src/tests/test_label_propagation.py deleted file mode 100644 index 6f30c31c..00000000 --- a/sr-data/src/tests/test_label_propagation.py +++ /dev/null @@ -1,47 +0,0 @@ -""" -Test case for label propagation model training. -""" -# The MIT License (MIT) -# -# Copyright (c) 2024 Aliaksei Bialiauski -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -import os.path -import unittest -from tempfile import TemporaryDirectory - -import joblib -import pytest -from sr_data.steps.label_propagation import main - -class TestLabelPropagation(unittest.TestCase): - - @pytest.mark.fast - def test_trains_and_saves_model(self): - with (TemporaryDirectory() as temp): - path = os.path.join(temp, "trained.pkl") - main( - os.path.join( - os.path.dirname(os.path.realpath(__file__)), - "resources/training.csv" - ), - path - ) - model = joblib.load(path) - self.assertTrue(model is not None)