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

Function get_source_bucket

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

Map a paper into a source bucket for diversity balancing.

(paper: Dict)

Source from the content-addressed store, hash-verified

712
713 if source == "journal":
714 journal = str(paper.get("journal") or "").lower().strip()
715 return journal or "journal"
716
717 if source == "openreview":
718 return infer_conference_key(paper) or "openreview"
719
720 return source or "unknown"
721
722
723def apply_source_diversity_quota(
724 scored_papers: List[PaperWithScore],
725 weights: Dict
726) -> List[PaperWithScore]:
727 """Soft-cap dominant sources while preserving must-read inclusions."""
728 if not scored_papers:

Callers 1

Calls 2

infer_conference_keyFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected