plexus.cli.shared.dependency_discovery module
Functions to parse score configurations and discover dependencies.
- plexus.cli.shared.dependency_discovery.build_name_id_mappings(scores: List[Dict[str, Any]]) → tuple[Dict[str, str], Dict[str, str]]
Build mappings between score names and IDs.
- Args:
scores: List of score objects containing ‘name’ and ‘id’ fields
- Returns:
Tuple of (id_to_name_map, name_to_id_map)
- plexus.cli.shared.dependency_discovery.discover_dependencies(target_score_ids: Set[str], configurations: Dict[str, str], score_id_to_name: Dict[str, str], score_name_to_id: Dict[str, str]) → Set[str]
Recursively discover all dependencies needed for the target scores.
- Args:
target_score_ids: Set of score IDs that are the initial targets configurations: Dictionary mapping score IDs to their configuration YAML score_id_to_name: Dictionary mapping score IDs to score names score_name_to_id: Dictionary mapping score names to score IDs
- Returns:
Set of all score IDs needed (targets + dependencies)
- plexus.cli.shared.dependency_discovery.extract_dependencies_from_config(config_yaml: str) → List[str]
Extract dependency score names from a score’s YAML configuration.
- Args:
config_yaml: Raw YAML configuration string for a score
- Returns:
List of score names that this score depends on