From 92473629067da26f4ded190bf3250b5ee18e1a7f Mon Sep 17 00:00:00 2001 From: pradal Date: Thu, 6 Nov 2025 15:11:27 +0100 Subject: [PATCH 1/3] Try to fix error on windows --- src/openalea/adel/AdelR.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openalea/adel/AdelR.py b/src/openalea/adel/AdelR.py index 97430d36..bfb9f9f0 100644 --- a/src/openalea/adel/AdelR.py +++ b/src/openalea/adel/AdelR.py @@ -25,6 +25,8 @@ # Set Numeric Locale value r('Sys.setlocale(category="LC_NUMERIC",locale="C")') +# Load stats on Windows +robj.r('library(stats)') def get_rcode(file_name): with open(os.path.join(dir, file_name), "r") as content_file: From f774ee676263f31488239e4754bf85a11d46fffc Mon Sep 17 00:00:00 2001 From: pradal Date: Thu, 6 Nov 2025 17:09:59 +0100 Subject: [PATCH 2/3] Fix errors in tabs --- ...ct_Maxwell_2011_d220_N1_laminaCurv_date.py | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/src/openalea/adel/data/select_Maxwell_2011_d220_N1_laminaCurv_date.py b/src/openalea/adel/data/select_Maxwell_2011_d220_N1_laminaCurv_date.py index 28243753..73a8b26f 100644 --- a/src/openalea/adel/data/select_Maxwell_2011_d220_N1_laminaCurv_date.py +++ b/src/openalea/adel/data/select_Maxwell_2011_d220_N1_laminaCurv_date.py @@ -1,25 +1,36 @@ +from pathlib import Path + def select_Maxwell_2011_d220_N1_laminaCurv_date(in1): ''' ''' - if in1 == 'Date_1': - out1 = 271 - out2 ='c:\\openaleapkg\\adel\\adel\\data\Maxwell_2011_d220_N1_laminaCurv_date1.RData' - elif in1 == 'Date_2': - out1 = 466 - out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date2.RData' - elif in1 == 'Date_3': - out1 = 637 - out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date3.RData' - elif in1 == 'Date_4': - out1 = 922 - out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date4.RData' - elif in1 == 'Date_5': - out1 = 1125 - out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date5.RData' - elif in1 == 'Date_6': - out1 = 1428 - out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date6.RData' - else: - out1 = 0 - out2 ='ERREUR' + mydir = Path(__file__).parent.absolute() + + if in1 == 'Date_1': + out1 = 271 + out2 = str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date1.RData') + elif in1 == 'Date_2': + out1 = 466 + out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date2.RData') + + elif in1 == 'Date_3': + out1 = 637 + out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date3.RData') + + elif in1 == 'Date_4': + out1 = 922 + out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date4.RData') + + elif in1 == 'Date_5': + out1 = 1125 + out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date5.RData') + + elif in1 == 'Date_6': + out1 = 1428 + out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date6.RData') + + else: + + out1 = 0 + out2 ='ERROR' + return out1, out2, From 691765a246b83441d686c6e5d45fab7eca17b344 Mon Sep 17 00:00:00 2001 From: pradal Date: Thu, 6 Nov 2025 17:44:47 +0100 Subject: [PATCH 3/3] Try to solve stats.dll on windows --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 06c2176b..41d26573 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,8 @@ dependencies = [ "openalea.plantgl", "openalea.caribu", "openalea.astk", - "rpy2" + "rpy2", + "r-recommended" ] [tool.setuptools.dynamic] readme = {file = ["README.md"]}