_robject_iter
Attributes¶
_UNION_TYPES = (Union, UnionType)
module-attribute
¶
Classes¶
IterConf
dataclass
¶
Functions¶
log_warning(msg, method_name=None)
¶
Log a warning message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msg
|
str
|
The warning message to log |
required |
method_name
|
str
|
The name of the method/function. If None, will auto-detect from call stack. |
None
|
Source code in brmspy/helpers/log.py
_normalize_annotation(ann)
¶
Turn a typing annotation (Dict[str, int], Optional[dict], pd.DataFrame, ...) into (runtime_cls, optional_flag).
Source code in brmspy/helpers/_rpy2/_robject_iter.py
_build_iterconf_from_dataclass(dc)
¶
Source code in brmspy/helpers/_rpy2/_robject_iter.py
_matches_iterconf(value, conf)
¶
iterate_robject_to_dataclass(names, get, target_dataclass, r, iteration_params=None)
¶
Generic helper to iterate over R summary-like objects and convert them into a Python dataclass instance.
namesis e.g. summary_r.namesget(param)should return the R slot already converted via rpy2 (or raw)target_dataclassis a @dataclass whose field names mirror the params