Commit 609e1bdf authored by Jan Reimes's avatar Jan Reimes
Browse files

♻️ refactor(utils): consolidate normalization functions to tdoc_crawler.utils.normalization

parent c92cc3f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ from tdoc_crawler.logging import set_verbosity
from tdoc_crawler.tdocs.models import TDocQueryConfig
from tdoc_crawler.tdocs.operations.checkout import checkout_tdoc, prepare_tdoc_file
from tdoc_crawler.tdocs.operations.fetch import fetch_missing_tdocs
from tdoc_crawler.tdocs.utils import normalize_tdoc_id, normalize_tdoc_ids
from tdoc_crawler.utils.normalization import normalize_tdoc_id, normalize_tdoc_ids

load_dotenv()

+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ from tdoc_crawler.logging import set_verbosity
from tdoc_crawler.tdocs.models import TDocQueryConfig
from tdoc_crawler.tdocs.operations.checkout import checkout_tdoc, prepare_tdoc_file
from tdoc_crawler.tdocs.operations.fetch import fetch_missing_tdocs
from tdoc_crawler.tdocs.utils import normalize_tdoc_id, normalize_tdoc_ids
from tdoc_crawler.utils.normalization import normalize_tdoc_id, normalize_tdoc_ids

load_dotenv()

+1 −1
Original line number Diff line number Diff line
@@ -8,11 +8,11 @@ from tdoc_crawler.database.base import DocDatabase
from tdoc_crawler.database.oxyde_models import CrawlLogEntry, MeetingMetadata, TDocMetadata
from tdoc_crawler.logging import get_logger
from tdoc_crawler.meetings.models import MeetingQueryConfig
from tdoc_crawler.meetings.utils import normalize_portal_meeting_name
from tdoc_crawler.models.base import SortOrder
from tdoc_crawler.models.subworking_groups import SUBTB_INDEX
from tdoc_crawler.models.working_groups import WORKING_GROUP_RECORDS, WorkingGroup
from tdoc_crawler.utils.misc import utc_now
from tdoc_crawler.utils.normalization import normalize_portal_meeting_name

_logger = get_logger(__name__)

+1 −1
Original line number Diff line number Diff line
@@ -11,8 +11,8 @@ from tdoc_crawler.logging import get_logger
from tdoc_crawler.models import WorkingGroup
from tdoc_crawler.models.subworking_groups import SUBTB_INDEX
from tdoc_crawler.tdocs.models import TDocQueryConfig
from tdoc_crawler.tdocs.utils import normalize_tdoc_id
from tdoc_crawler.utils.misc import utc_now
from tdoc_crawler.utils.normalization import normalize_tdoc_id

_logger = get_logger(__name__)

+3 −3
Original line number Diff line number Diff line
"""Utility functions for meeting data normalization.

Note: normalize_portal_meeting_name is now centralized in tdoc_crawler.utils.normalization.
This module re-exports it for backward compatibility.
Import directly from there:

    from tdoc_crawler.utils.normalization import normalize_portal_meeting_name
"""

from __future__ import annotations
@@ -10,7 +12,6 @@ import re

from tdoc_crawler.models.subworking_groups import SubWorkingGroup
from tdoc_crawler.models.working_groups import WorkingGroup
from tdoc_crawler.utils.normalization import normalize_portal_meeting_name


def normalize_working_group_alias(alias: str) -> WorkingGroup:
@@ -82,7 +83,6 @@ def normalize_subgroup_alias(alias: str) -> SubWorkingGroup:


__all__ = [
    "normalize_portal_meeting_name",
    "normalize_subgroup_alias",
    "normalize_working_group_alias",
]
Loading