rpy-bridge 0.3.5__py3-none-any.whl → 0.3.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rpy_bridge/rpy2_utils.py +13 -4
- {rpy_bridge-0.3.5.dist-info → rpy_bridge-0.3.7.dist-info}/METADATA +1 -1
- rpy_bridge-0.3.7.dist-info/RECORD +8 -0
- rpy_bridge-0.3.5.dist-info/RECORD +0 -8
- {rpy_bridge-0.3.5.dist-info → rpy_bridge-0.3.7.dist-info}/WHEEL +0 -0
- {rpy_bridge-0.3.5.dist-info → rpy_bridge-0.3.7.dist-info}/licenses/LICENSE +0 -0
- {rpy_bridge-0.3.5.dist-info → rpy_bridge-0.3.7.dist-info}/top_level.txt +0 -0
rpy_bridge/rpy2_utils.py
CHANGED
|
@@ -29,7 +29,7 @@ import subprocess
|
|
|
29
29
|
import sys
|
|
30
30
|
import warnings
|
|
31
31
|
from pathlib import Path
|
|
32
|
-
from typing import TYPE_CHECKING, Any, Iterable
|
|
32
|
+
from typing import TYPE_CHECKING, Any, Iterable
|
|
33
33
|
|
|
34
34
|
import numpy as np
|
|
35
35
|
import pandas as pd
|
|
@@ -42,7 +42,7 @@ if TYPE_CHECKING:
|
|
|
42
42
|
|
|
43
43
|
from loguru import Logger as LoguruLogger
|
|
44
44
|
|
|
45
|
-
LoggerType =
|
|
45
|
+
LoggerType = LoguruLogger | logging_module.Logger
|
|
46
46
|
|
|
47
47
|
else:
|
|
48
48
|
LoggerType = None # runtime doesn’t need the type object
|
|
@@ -85,7 +85,7 @@ def _log_r_call(func_name: str, source_info: str):
|
|
|
85
85
|
# Path resolution
|
|
86
86
|
# ---------------------------------------------------------------------
|
|
87
87
|
def _normalize_scripts(
|
|
88
|
-
scripts:
|
|
88
|
+
scripts: str | Path | Iterable[str | Path] | None,
|
|
89
89
|
) -> list[Path]:
|
|
90
90
|
if scripts is None:
|
|
91
91
|
return []
|
|
@@ -353,11 +353,20 @@ class RFunctionCaller:
|
|
|
353
353
|
|
|
354
354
|
def __init__(
|
|
355
355
|
self,
|
|
356
|
-
path_to_renv: Path | None = None,
|
|
356
|
+
path_to_renv: str | Path | None = None,
|
|
357
357
|
scripts: str | Path | list[str | Path] | None = None,
|
|
358
358
|
packages: str | list[str] | None = None,
|
|
359
359
|
**kwargs, # catch unexpected keywords
|
|
360
360
|
):
|
|
361
|
+
|
|
362
|
+
# Handle path_to_renv safely
|
|
363
|
+
if path_to_renv is not None:
|
|
364
|
+
if not isinstance(path_to_renv, Path):
|
|
365
|
+
path_to_renv = Path(path_to_renv)
|
|
366
|
+
self.path_to_renv = path_to_renv.resolve()
|
|
367
|
+
else:
|
|
368
|
+
self.path_to_renv = None
|
|
369
|
+
|
|
361
370
|
# --- Handle deprecated 'script_path' ---
|
|
362
371
|
if "script_path" in kwargs:
|
|
363
372
|
script_path_value = kwargs.pop("script_path")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rpy-bridge
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.7
|
|
4
4
|
Summary: Python-to-R interoperability engine with environment management, type-safe conversions, data normalization, and safe R function execution.
|
|
5
5
|
Author-email: Victoria Cheung <victoriakcheung@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
rpy_bridge/__init__.py,sha256=VDCx-CiTBJO0cMp59v-gyJGBVYHjLjATTIdtYxBsK5Q,875
|
|
2
|
+
rpy_bridge/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
rpy_bridge/rpy2_utils.py,sha256=0pUwqkBaDN5UFqB4iarq1spDL1DdCTS_yopoiylCz4c,37782
|
|
4
|
+
rpy_bridge-0.3.7.dist-info/licenses/LICENSE,sha256=JwbWVcSfeoLfZ2M_ZiyygKVDvhBDW3zbqTWwXOJwmrA,1276
|
|
5
|
+
rpy_bridge-0.3.7.dist-info/METADATA,sha256=Rmo5rwacwagmAfFqKGWYVjIYDdIc67LiYgfdR-OOzy4,9580
|
|
6
|
+
rpy_bridge-0.3.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
rpy_bridge-0.3.7.dist-info/top_level.txt,sha256=z9UZ77ZuUPoLqMDQEpP4btstsaM1IpXb9Cn9yBVaHmU,11
|
|
8
|
+
rpy_bridge-0.3.7.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
rpy_bridge/__init__.py,sha256=VDCx-CiTBJO0cMp59v-gyJGBVYHjLjATTIdtYxBsK5Q,875
|
|
2
|
-
rpy_bridge/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
rpy_bridge/rpy2_utils.py,sha256=1W1Lgt0HI3TGs20GugHceFih1uLTTilz_pmkzNkPujY,37516
|
|
4
|
-
rpy_bridge-0.3.5.dist-info/licenses/LICENSE,sha256=JwbWVcSfeoLfZ2M_ZiyygKVDvhBDW3zbqTWwXOJwmrA,1276
|
|
5
|
-
rpy_bridge-0.3.5.dist-info/METADATA,sha256=uZBsfC-lyYhYQfVvLJPGGi2XCwfq-8cSbILCFgmPAFs,9580
|
|
6
|
-
rpy_bridge-0.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
rpy_bridge-0.3.5.dist-info/top_level.txt,sha256=z9UZ77ZuUPoLqMDQEpP4btstsaM1IpXb9Cn9yBVaHmU,11
|
|
8
|
-
rpy_bridge-0.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|