Load enabled journal sources from config, plus built-in supported journals not listed there.
()
| 391 | unsupported = [] |
| 392 | raw_config = load_yaml_config("journals.yaml").get("journals", {}) |
| 393 | |
| 394 | for group_items in raw_config.values(): |
| 395 | for item in group_items or []: |
| 396 | if not item.get("enabled", True): |
| 397 | continue |
| 398 | normalized = journal_fetcher.normalize_journal_name(item.get("name", "")) |
| 399 | if normalized: |
| 400 | configured.append(normalized) |
| 401 | else: |
| 402 | unsupported.append(item.get("name", "")) |
| 403 | |
| 404 | if unsupported: |
| 405 | print(f"Skipping unsupported journal sources for now: {', '.join(unsupported)}") |
| 406 | |
| 407 | configured = dedupe_preserve_order(configured) |
| 408 | supported = journal_fetcher.get_supported_journals() |
| 409 | extras = [name for name in supported if name not in configured] |
| 410 | return configured + extras |
| 411 | |
| 412 | |
| 413 | def load_scoring_weights() -> Dict: |
| 414 | """加载排序权重配置""" |
| 415 | import yaml |
| 416 | config_file = os.path.join(CONFIG_PATH, "scoring_weights.yaml") |
| 417 | if os.path.exists(config_file): |
| 418 | with open(config_file, 'r', encoding='utf-8') as f: |
no test coverage detected