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

Function _configured_daily_sources

deployments/desktop/shared/agents.py:1192–1229  ·  view source on GitHub ↗
(
    *,
    arxiv_categories: Optional[Iterable[Any]],
    conferences: Optional[Iterable[Any]],
    journals: Optional[Iterable[Any]],
)

Source from the content-addressed store, hash-verified

1190 try:
1191 return datetime.strptime(raw, "%Y-%m-%d").date().isoformat()
1192 except ValueError:
1193 pass
1194 return datetime.now().date().isoformat()
1195
1196
1197def _configured_report_style() -> str:
1198 style = (_env_text("PAPERFLOW_REPORT_STYLE", "standard") or "standard").strip().lower()
1199 return style if style in {"standard", "deep", "brief"} else "standard"
1200
1201
1202def _configured_daily_sources(
1203 *,
1204 arxiv_categories: Optional[Iterable[Any]],
1205 conferences: Optional[Iterable[Any]],
1206 journals: Optional[Iterable[Any]],
1207) -> Dict[str, List[str]]:
1208 source_preferences = settings().get("source_preferences", {})
1209 resolved_arxiv = (
1210 _string_list(arxiv_categories)
1211 if arxiv_categories is not None
1212 else _string_list(source_preferences.get("arxiv_categories"))
1213 )
1214 resolved_conferences = (
1215 _string_list(conferences)
1216 if conferences is not None
1217 else _string_list(source_preferences.get("conferences"))
1218 )
1219 resolved_journals = (
1220 _string_list(journals)
1221 if journals is not None
1222 else _string_list(source_preferences.get("journals"))
1223 )
1224
1225 if arxiv_categories is None and source_preferences.get("enable_arxiv") is False:
1226 resolved_arxiv = []
1227 if conferences is None and source_preferences.get("enable_openreview") is False:
1228 resolved_conferences = []
1229
1230 return {
1231 "arxiv_categories": resolved_arxiv,
1232 "conferences": resolved_conferences,

Callers 2

run_daily_pushFunction · 0.85
start_daily_push_taskFunction · 0.85

Calls 3

settingsFunction · 0.85
_string_listFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected