(
*,
user_id: str,
natural_language: str = "",
scholar_url: str = "",
homepage_url: str = "",
pdf_paths: Optional[List[str]] = None,
affiliation: str = "",
core_directions_text: str = "",
topic_weights_text: str = "",
must_read_keywords: Optional[List[str]] = None,
must_read_authors: Optional[List[str]] = None,
must_read_institutions: Optional[List[str]] = None,
reset_existing: bool = False,
)
| 1936 | action=f"{normalized_action}_{normalized_type}", |
| 1937 | action_type="must_read_update", |
| 1938 | category="desktop_gui", |
| 1939 | metadata={"value": cleaned_value, "item_type": normalized_type}, |
| 1940 | ) |
| 1941 | |
| 1942 | return { |
| 1943 | "result": result, |
| 1944 | "profile": _profile_summary(profile), |
| 1945 | **list_must_read(user_id), |
| 1946 | } |
| 1947 | |
| 1948 | |
| 1949 | def _parse_weight_text(value: Any) -> Dict[str, float]: |
| 1950 | result: Dict[str, float] = {} |
| 1951 | for item in _string_list(str(value or "").replace("\n", ";").split(";")): |
| 1952 | label = item |
| 1953 | weight = 1.0 |
| 1954 | if ":" in item: |
| 1955 | label, raw_weight = item.rsplit(":", 1) |
| 1956 | elif "=" in item: |
| 1957 | label, raw_weight = item.rsplit("=", 1) |
| 1958 | else: |
| 1959 | raw_weight = "" |
| 1960 | label = str(label or "").strip() |
| 1961 | if not label: |
| 1962 | continue |
| 1963 | if raw_weight: |
| 1964 | weight = max(0.0, min(1.0, _to_float(raw_weight, 1.0))) |
| 1965 | result[label] = round(weight, 4) |
| 1966 | return result |
| 1967 | |
| 1968 | |
| 1969 | def _manual_profile_updates( |
| 1970 | *, |
| 1971 | affiliation: str = "", |
| 1972 | core_directions_text: str = "", |
| 1973 | topic_weights_text: str = "", |
| 1974 | must_read_keywords: Optional[List[str]] = None, |
| 1975 | must_read_authors: Optional[List[str]] = None, |
| 1976 | must_read_institutions: Optional[List[str]] = None, |
| 1977 | ) -> Dict[str, Any]: |
| 1978 | updates: Dict[str, Any] = {} |
nothing calls this directly
no test coverage detected