MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / load_default_journals

Function load_default_journals

deployments/feishu/daily-push-agent/main.py:393–415  ·  view source on GitHub ↗

Load enabled journal sources from config, plus built-in supported journals not listed there.

()

Source from the content-addressed store, hash-verified

391
392
393def load_default_journals() -> List[str]:
394 """Load enabled journal sources from config, plus built-in supported journals not listed there."""
395 configured = []
396 unsupported = []
397 raw_config = load_yaml_config("journals.yaml").get("journals", {})
398
399 for group_items in raw_config.values():
400 for item in group_items or []:
401 if not item.get("enabled", True):
402 continue
403 normalized = journal_fetcher.normalize_journal_name(item.get("name", ""))
404 if normalized:
405 configured.append(normalized)
406 else:
407 unsupported.append(item.get("name", ""))
408
409 if unsupported:
410 print(f"Skipping unsupported journal sources for now: {', '.join(unsupported)}")
411
412 configured = dedupe_preserve_order(configured)
413 supported = journal_fetcher.get_supported_journals()
414 extras = [name for name in supported if name not in configured]
415 return configured + extras
416
417
418def load_scoring_weights() -> Dict:

Callers 1

fetch_and_process_papersFunction · 0.85

Calls 3

load_yaml_configFunction · 0.85
dedupe_preserve_orderFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected