Référence : Application - Moteur de Dépendances
src.application.dependencies.dependency_resolver
Dependency Resolver: Facade routing requests to DependencyOrchestrator. Maintains backward compatibility with all callers and tests.
DependencyActions
Atomic actions for dependency matching, classification, and lookups.
build_installed_index(installed_by_remote, installed_by_title)
staticmethod
Pre-computes deduplicated installed mods list and canonical fingerprint set in O(N).
catalog_contains_remote_id(source, remote_id, session, catalog_remote_ids)
Verifies if remote_id exists in catalog or in special cases.
check_dlc_installed(dlc_code)
Checks if an official Game DLC pack is installed in the game.
check_installed(source, remote_id, title, installed_by_remote, installed_by_title, precomputed_index=None)
Checks whether a mod is currently installed in the user's Sims 4 directory.
clean_title(title)
Cleans and standardizes raw dependency title string.
clear_cache()
classmethod
Vide le cache LRU de résolution de dépendances sur le catalogue.
detect_dlc_or_base(clean_t)
Detects whether a cleaned title corresponds to the base game or an official EA DLC. Returns (is_base, is_dlc, dlc_name, dlc_code).
find_special_case(title, url='', remote_id='')
Looks up configured special dependency cases (Deaderpool, Scumbumbo, Lumpinou, Wicked.cc, Basemental).
is_comment_override(title, clean_t, requirements_overrides)
Checks if a dependency title has been explicitly overridden as a comment/noise.
is_mod_override(title, clean_t, requirements_overrides)
Checks if a dependency title has been explicitly overridden as a real MOD.
match_catalog_mod(title, session, source='loverslab')
Finds matching catalog mod by similarity or exact match with LRU caching. Returns (remote_id, page_url, title, source).
DependencyCoordinator
Coordinates looping and classification across dependency lists.
find_dependent_installed_mods(installed_mod_id, session)
Identifies installed mods that declare a dependency on installed_mod_id.
resolve_all_dependencies(raw_deps, session, installed_by_remote, installed_by_title, is_syncing, catalog_remote_ids=None, requirements_overrides=None, deduplicate=True)
Coordinates looping over raw requirements, calls resolve_single_dependency, and applies deduplication while preserving ordering.
resolve_single_dependency(dep, session, installed_by_remote, installed_by_title, is_syncing, catalog_remote_ids=None, requirements_overrides=None, precomputed_index=None)
Resolves a single raw dependency item into a typed DependencyItem DTO.
DependencyOrchestrator
High-level orchestrator for dependency evaluation and categorization.
find_dependent_installed_mods(installed_mod_id, session)
Orchestrates lookup of installed mods that depend on target mod.
resolve(raw_deps, session, installed_by_remote, installed_by_title, is_syncing=None, catalog_remote_ids=None, requirements_overrides=None, deduplicate=True)
Orchestrates full dependency resolution: 1. Determines background sync liveness if not specified. 2. Delegates to DependencyCoordinator for iteration, action execution, and deduplication.
clean_dependency_title(title)
Strips bullets, numbering, punctuation, and requirement prefixes from dependency text.
detect_game_dlc_or_base_game(clean_title)
Analyzes a cleaned dependency title to determine if it is the base game or an official DLC. Returns: (is_base_game, is_dlc, dlc_name, dlc_code)
find_dependent_installed_mods(installed_mod_id, session)
Identifies all installed mods that depend on target mod.
find_special_dependency_case(name, url='', remote_id='')
cached
Recherche en O(1) (index pré-calculé + cache LRU) si un nom de mod, une URL ou un identifiant correspond à l'un des frameworks officiels définis dans SPECIAL_DEPENDENCY_CASES afin de router systématiquement la dépendance vers le site officiel de son créateur.
resolve_mod_dependencies(raw_deps, session, installed_by_remote, installed_by_title, is_syncing=None, catalog_remote_ids=None, requirements_overrides=None, deduplicate=True)
Resolves dependency items against database catalog, installed mods, and official game DLCs.
src.application.dependencies.dependency_normalizer
Dependency string normalization and official Sims 4 DLC/base-game matching helpers. Re-exports from src.utils.dependency_normalizer for backward compatibility.
clean_dependency_title(title)
Strips bullets, numbering, punctuation, and requirement prefixes from dependency text.
detect_game_dlc_or_base_game(clean_title)
Analyzes a cleaned dependency title to determine if it is the base game or an official DLC. Returns: (is_base_game, is_dlc, dlc_name, dlc_code)
src.utils.dependency_noise_rules
Centralized registry and classification heuristics for non-mod dependency text, author commentary, configuration instructions, and false positives in Sims 4 mod requirements.
is_likely_comment_or_noise(text)
Evaluates whether a candidate requirement token or phrase is an author comment, game instruction, narrative prose, or false positive rather than a real Sims 4 mod or DLC name.
Returns:
| Type | Description |
|---|---|
bool
|
True if the text is classified as commentary / noise, False otherwise. |
src.application.dependencies.dependency_special_cases
Special dependency cases registry with official creator site routing (Deaderpool, Scumbumbo, Lumpinou, WickedWhims / Wicked.cc, Basemental, Sims 4 Studio).
find_special_dependency_case(name, url='', remote_id='')
cached
Recherche en O(1) (index pré-calculé + cache LRU) si un nom de mod, une URL ou un identifiant correspond à l'un des frameworks officiels définis dans SPECIAL_DEPENDENCY_CASES afin de router systématiquement la dépendance vers le site officiel de son créateur.
src.application.dependencies.requirement_reporter_service
RequirementReporterService
Centralized service for generating standardized English messages and managing interpellation (via PM or forum) for unidentified mod requirements across all providers. Directly queries the provider for live duplicate prevention (zero local DB storage).
build_english_message(mod_title, author, missing_modules=None, unnecessary_modules=None, sender_username=None)
classmethod
Builds a polite, professional, and well-structured English message introducing Sims 4 Mods Manager and detailing missing dependencies and unnecessary comments.
build_english_subject(mod_title)
staticmethod
Builds a standardized subject for creator messaging.
check_report_status(source, page_url, mod_title, author, missing_modules=None, unnecessary_modules=None)
classmethod
Checks live on the provider's site whether the user has already contacted the creator or posted about this mod and these requirements. Also resolves creator profile info and compose PM URL.
delete_report(source, page_url, mod_title='', missing_modules=None, unnecessary_modules=None)
classmethod
Deletes a previously posted requirements report comment from the provider's forum.
format_author_mention(author)
staticmethod
Sanitizes and formats the author handle with '@'.
submit_report(source, page_url, mod_title, author, missing_modules=None, unnecessary_modules=None, custom_message=None, custom_subject=None, creator_id=None, creator_name=None, send_as_pm=False)
classmethod
Validates anti-duplicate check live on the provider, then sends the message via PM or forum.