(
cached_push: Dict[str, Any],
*,
days: int,
limit_per_source: int,
target_date: str,
sources: Dict[str, Any],
)
| 1138 | for key, value in previous.items(): |
| 1139 | if value is None: |
| 1140 | os.environ.pop(key, None) |
| 1141 | else: |
| 1142 | os.environ[key] = value |
| 1143 | |
| 1144 | |
| 1145 | def health() -> Dict[str, Any]: |
| 1146 | return { |
| 1147 | "ok": True, |
| 1148 | "project_root": str(PROJECT_ROOT), |
| 1149 | "database": str(db_ops.DB_PATH), |
| 1150 | "database_exists": Path(db_ops.DB_PATH).exists(), |
| 1151 | } |
| 1152 | |
| 1153 | |
| 1154 | def settings() -> Dict[str, Any]: |
| 1155 | source_preferences = { |
| 1156 | "enable_arxiv": _env_text("PAPERFLOW_ENABLE_ARXIV", "true").lower() not in {"0", "false", "no", "off"}, |
| 1157 | "enable_semantic_scholar": _env_text("PAPERFLOW_ENABLE_SEMANTIC_SCHOLAR", "true").lower() not in {"0", "false", "no", "off"}, |
| 1158 | "enable_openreview": _env_text("PAPERFLOW_ENABLE_OPENREVIEW", "true").lower() not in {"0", "false", "no", "off"}, |
| 1159 | "enable_custom_rss": _env_text("PAPERFLOW_ENABLE_CUSTOM_RSS", "false").lower() in {"1", "true", "yes", "on"}, |
| 1160 | "arxiv_categories": _env_list("PAPERFLOW_DEFAULT_ARXIV_CATEGORIES", ["cs.CL", "cs.AI", "cs.IR", "cs.LG"]), |
| 1161 | "conferences": _env_list("PAPERFLOW_DEFAULT_CONFERENCES", ["ICLR", "NeurIPS", "ACL", "SIGIR"]), |
| 1162 | "journals": _env_list("PAPERFLOW_DEFAULT_JOURNALS", []), |
| 1163 | "custom_rss_urls": _env_list("PAPERFLOW_CUSTOM_RSS_URLS", ["https://arxiv.org/rss/cs.CL"]), |
| 1164 | "conference_access_mode": _env_text("PAPERFLOW_CONFERENCE_ACCESS_MODE", "public") or "public", |
| 1165 | "auth_status": { |
| 1166 | "semantic_scholar_api_key": bool(_env_text("SEMANTIC_SCHOLAR_API_KEY")), |
| 1167 | "openreview_username": bool(_env_text("OPENREVIEW_USERNAME")), |
| 1168 | "openreview_token": bool(_env_text("OPENREVIEW_TOKEN")), |
| 1169 | "openreview_cookie_file": bool(_env_text("OPENREVIEW_COOKIE_FILE")), |
| 1170 | "conference_cookie_file": bool(_env_text("PAPERFLOW_CONFERENCE_COOKIE_FILE")), |
| 1171 | }, |
| 1172 | } |
| 1173 | report_preferences = { |
| 1174 | "style": _env_text("PAPERFLOW_REPORT_STYLE", "standard") or "standard", |
| 1175 | "write_feishu": _env_bool("PAPERFLOW_WRITE_FEISHU", default=False), |
| 1176 | "wiki_ingest": _env_bool("PAPERFLOW_WIKI_INGEST", default=True), |
| 1177 | } |
no test coverage detected