plexus.cli.shared.iterative_config_fetching module
Functions to iteratively fetch and cache score configurations based on dependencies.
- plexus.cli.shared.iterative_config_fetching.iteratively_fetch_configurations(client, scorecard_data: Dict[str, Any], target_scores: List[Dict[str, Any]], use_cache: bool = False, specific_version: str | None = None) → Dict[str, str]
Iteratively fetch score configurations including all dependencies.
This function: 1. Checks local cache for initial target scores (only if use_cache=True) 2. Fetches missing target configurations 3. Discovers dependencies in those configurations 4. Iteratively fetches dependencies until all are resolved
- Args:
client: GraphQL API client scorecard_data: The scorecard data containing name and other properties target_scores: List of score objects to process initially use_cache: Whether to use local cache files instead of always fetching from API
When False, will always fetch from API but still write cache files When True, will check local cache first and only fetch missing configs
specific_version: Optional specific version ID to use instead of champion version
- Returns:
Dictionary mapping score IDs to their configuration strings