AMR 2.1.1.9106__py3-none-any.whl → 2.1.1.9109__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.
- AMR/datasets.py +3 -5
- {AMR-2.1.1.9106.dist-info → AMR-2.1.1.9109.dist-info}/METADATA +1 -1
- AMR-2.1.1.9109.dist-info/RECORD +7 -0
- AMR-2.1.1.9106.dist-info/RECORD +0 -7
- {AMR-2.1.1.9106.dist-info → AMR-2.1.1.9109.dist-info}/WHEEL +0 -0
- {AMR-2.1.1.9106.dist-info → AMR-2.1.1.9109.dist-info}/top_level.txt +0 -0
AMR/datasets.py
CHANGED
@@ -2,9 +2,6 @@ BLUE = '\033[94m'
|
|
2
2
|
GREEN = '\033[32m'
|
3
3
|
RESET = '\033[0m'
|
4
4
|
|
5
|
-
print(f"{BLUE}AMR:{RESET} Setting up R environment and AMR datasets...", flush=True)
|
6
|
-
|
7
|
-
|
8
5
|
import os
|
9
6
|
from rpy2 import robjects
|
10
7
|
from rpy2.robjects import pandas2ri
|
@@ -14,8 +11,6 @@ import importlib.metadata as metadata
|
|
14
11
|
|
15
12
|
# Get the path to the virtual environment
|
16
13
|
venv_path = os.getenv('VIRTUAL_ENV') # Path to the active virtual environment
|
17
|
-
if not venv_path:
|
18
|
-
raise EnvironmentError("No virtual environment detected. Please activate your Python virtual environment.")
|
19
14
|
|
20
15
|
# Define R library path within the venv
|
21
16
|
r_lib_path = os.path.join(venv_path, "R_libs")
|
@@ -42,11 +37,14 @@ r_amr_version = robjects.r(f'as.character(packageVersion("AMR", lib.loc = "{r_li
|
|
42
37
|
# Compare R and Python package versions
|
43
38
|
if python_amr_version and r_amr_version != python_amr_version:
|
44
39
|
try:
|
40
|
+
print(f"{BLUE}AMR:{RESET} Updating package version{RESET}", flush=True)
|
45
41
|
utils = importr('utils')
|
46
42
|
utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
|
47
43
|
except Exception as e:
|
48
44
|
print(f"{BLUE}AMR:{RESET} Could not update: {e}{RESET}", flush=True)
|
49
45
|
|
46
|
+
print(f"{BLUE}AMR:{RESET} Setting up R environment and AMR datasets...", flush=True)
|
47
|
+
|
50
48
|
# Activate the automatic conversion between R and pandas DataFrames
|
51
49
|
pandas2ri.activate()
|
52
50
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
AMR/__init__.py,sha256=Jzrh0SVD8tXP1_sJAnElOPAJcvMgtleTzdSnY3RI3HY,7315
|
2
|
+
AMR/datasets.py,sha256=QbYkTe8Rl96tgADIZJfSwa9Y-eEFfb4faI6qw7y0szs,2451
|
3
|
+
AMR/functions.py,sha256=XDN7fo0N3gGnZHYL0pdkG_9jwlsrvj0fo5IqLS7gWBM,43615
|
4
|
+
AMR-2.1.1.9109.dist-info/METADATA,sha256=V-rxOr1ZpV19QgdvxFWatZPZ8CxytABo5akm2JhqqWs,9394
|
5
|
+
AMR-2.1.1.9109.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
6
|
+
AMR-2.1.1.9109.dist-info/top_level.txt,sha256=7K6Mq_X_OHdXOzQM5y06VUadXjYkze6yzufL1d7_6xc,4
|
7
|
+
AMR-2.1.1.9109.dist-info/RECORD,,
|
AMR-2.1.1.9106.dist-info/RECORD
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
AMR/__init__.py,sha256=Jzrh0SVD8tXP1_sJAnElOPAJcvMgtleTzdSnY3RI3HY,7315
|
2
|
-
AMR/datasets.py,sha256=mmbhbTk9MF3F4d50CzIiK01disCRcFOpjdAUo8UHNZg,2502
|
3
|
-
AMR/functions.py,sha256=XDN7fo0N3gGnZHYL0pdkG_9jwlsrvj0fo5IqLS7gWBM,43615
|
4
|
-
AMR-2.1.1.9106.dist-info/METADATA,sha256=zBIitXz4LjqqV9IozMG0ktLuegaqqglS6YS-XlugWa4,9394
|
5
|
-
AMR-2.1.1.9106.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
6
|
-
AMR-2.1.1.9106.dist-info/top_level.txt,sha256=7K6Mq_X_OHdXOzQM5y06VUadXjYkze6yzufL1d7_6xc,4
|
7
|
-
AMR-2.1.1.9106.dist-info/RECORD,,
|
File without changes
|
File without changes
|