Skip to content

Commit 5dc649f

Browse files
authored
Merge pull request #5 from adamspd/fixing-dependancies
Optimized functions and models
2 parents f1dc677 + ba30912 commit 5dc649f

18 files changed

+34
-28
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Spam Detection Testing
55

66
on:
77
push:
8-
branches: [ "main" ]
9-
pull_request:
10-
branches: [ "main" ]
8+
branches-ignore:
9+
- 'main'
10+
workflow_dispatch:
1111

1212
permissions:
1313
contents: read

check_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ def check_package_version(package_name, current_version):
2121
print(f"::set-output name=version_exists::{version_exists}")
2222

2323

24-
check_package_version(__package_name__, __version__)
24+
if __name__ == "__main__":
25+
check_package_version(__package_name__, __version__)

requirements.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
scikit-learn~=1.2.2
2-
imblearn~=0.0
3-
pandas~=2.0.2
1+
scikit-learn==1.3.2
2+
imbalanced-learn==0.11.0
3+
pandas==2.1.4
44
nltk~=3.8.1
5-
setuptools~=67.8.0
6-
pytest~=7.3.2
5+
setuptools==69.0.3
6+
pytest==7.4.4
7+
requests~=2.31.0
8+
imblearn~=0.0

spam_detector_ai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
__package_name__ = "spam-detector-ai"
1414
__url__ = "https://github.com/adamspd/spam-detection-project"
1515
__version__ = "1.0.3"
16-
__test_version__ = True
16+
__test_version__ = True

spam_detector_ai/classifiers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from .naive_bayes_classifier import NaiveBayesClassifier
55
from .random_forest_classifier import RandomForestSpamClassifier
66
from .svm_classifier import SVMClassifier
7-
from .classifier_types import ClassifierType
7+
from .classifier_types import ClassifierType

spam_detector_ai/classifiers/classifier_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from enum import Enum, auto
44

5+
56
class ClassifierType(Enum):
67
NAIVE_BAYES = auto()
78
RANDOM_FOREST = auto()

spam_detector_ai/logger_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22

3+
34
def init_logging():
45
# Create a logger
56
logger = logging.getLogger()
@@ -21,4 +22,4 @@ def init_logging():
2122
# Add the handlers to the logger
2223
logger.addHandler(file_handler)
2324
logger.addHandler(console_handler)
24-
return logger
25+
return logger
0 Bytes
Binary file not shown.
6 Bytes
Binary file not shown.
1.47 MB
Binary file not shown.

0 commit comments

Comments
 (0)