mirror of
https://github.com/msberends/AMR.git
synced 2025-07-11 22:21:53 +02:00
(v2.1.1.9108) version update
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: AMR
|
||||
Version: 2.1.1.9103
|
||||
Version: 2.1.1.9107
|
||||
Summary: A Python wrapper for the AMR R package
|
||||
Home-page: https://github.com/msberends/AMR
|
||||
Author: Dr. Matthijs Berends
|
||||
|
@ -2,9 +2,6 @@ BLUE = '\033[94m'
|
||||
GREEN = '\033[32m'
|
||||
RESET = '\033[0m'
|
||||
|
||||
print(f"{BLUE}AMR:{RESET} Setting up R environment and AMR datasets...", flush=True)
|
||||
|
||||
|
||||
import os
|
||||
from rpy2 import robjects
|
||||
from rpy2.robjects import pandas2ri
|
||||
@ -14,8 +11,6 @@ import importlib.metadata as metadata
|
||||
|
||||
# Get the path to the virtual environment
|
||||
venv_path = os.getenv('VIRTUAL_ENV') # Path to the active virtual environment
|
||||
if not venv_path:
|
||||
raise EnvironmentError("No virtual environment detected. Please activate your Python virtual environment.")
|
||||
|
||||
# Define R library path within the venv
|
||||
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
|
||||
# Compare R and Python package versions
|
||||
if python_amr_version and r_amr_version != python_amr_version:
|
||||
try:
|
||||
print(f"{BLUE}AMR:{RESET} Updating package version{RESET}", flush=True)
|
||||
utils = importr('utils')
|
||||
utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
|
||||
except Exception as e:
|
||||
print(f"{BLUE}AMR:{RESET} Could not update: {e}{RESET}", flush=True)
|
||||
|
||||
print(f"{BLUE}AMR:{RESET} Setting up R environment and AMR datasets...", flush=True)
|
||||
|
||||
# Activate the automatic conversion between R and pandas DataFrames
|
||||
pandas2ri.activate()
|
||||
|
||||
|
Binary file not shown.
BIN
PythonPackage/AMR/dist/amr-2.1.1.9103.tar.gz
vendored
BIN
PythonPackage/AMR/dist/amr-2.1.1.9103.tar.gz
vendored
Binary file not shown.
BIN
PythonPackage/AMR/dist/amr-2.1.1.9107.tar.gz
vendored
Normal file
BIN
PythonPackage/AMR/dist/amr-2.1.1.9107.tar.gz
vendored
Normal file
Binary file not shown.
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='AMR',
|
||||
version='2.1.1.9103',
|
||||
version='2.1.1.9107',
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
'rpy2',
|
||||
|
Reference in New Issue
Block a user