cleanup the module structure a bit

This commit is contained in:
frederik
2025-11-11 14:55:17 +01:00
committed by Nachtzuster
parent b479855cfc
commit c1e70c3a2d
4 changed files with 6 additions and 6 deletions
View File
+1 -1
View File
@@ -11,7 +11,7 @@ from subprocess import CalledProcessError
import inotify.adapters import inotify.adapters
from inotify.constants import IN_CLOSE_WRITE from inotify.constants import IN_CLOSE_WRITE
from server import load_global_model, run_analysis from utils.analysis import load_global_model, run_analysis
from utils.helpers import get_settings, get_wav_files, ANALYZING_NOW from utils.helpers import get_settings, get_wav_files, ANALYZING_NOW
from utils.classes import ParseFileName from utils.classes import ParseFileName
from utils.reporting import extract_detection, summary, write_to_file, write_to_db, apprise, bird_weather, heartbeat, \ from utils.reporting import extract_detection, summary, write_to_file, write_to_db, apprise, bird_weather, heartbeat, \
@@ -5,9 +5,9 @@ import time
import librosa import librosa
import numpy as np import numpy as np
from scripts.utils.classes import Detection, ParseFileName from .classes import Detection, ParseFileName
from scripts.utils.helpers import get_settings, get_language from .helpers import get_settings, get_language
from scripts.utils.models import get_model from .models import get_model
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@@ -2,7 +2,7 @@ import os
import unittest import unittest
from unittest.mock import patch from unittest.mock import patch
from scripts.server import run_analysis from scripts.utils.analysis import run_analysis
from scripts.utils.classes import ParseFileName from scripts.utils.classes import ParseFileName
from tests.helpers import TESTDATA, Settings from tests.helpers import TESTDATA, Settings
@@ -10,7 +10,7 @@ from tests.helpers import TESTDATA, Settings
class TestRunAnalysis(unittest.TestCase): class TestRunAnalysis(unittest.TestCase):
@patch('scripts.utils.helpers._load_settings') @patch('scripts.utils.helpers._load_settings')
@patch('scripts.server.loadCustomSpeciesList') @patch('scripts.utils.analysis.loadCustomSpeciesList')
def test_run_analysis(self, mock_loadCustomSpeciesList, mock_load_settings): def test_run_analysis(self, mock_loadCustomSpeciesList, mock_load_settings):
# Mock the settings and species list # Mock the settings and species list
mock_load_settings.return_value = Settings.with_defaults() mock_load_settings.return_value = Settings.with_defaults()