From 109af9748a27057285b3cdb5cb13e58f3ad9cd55 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 13:32:54 +0100 Subject: [PATCH 01/14] prevent pip/conda install interactions --- conda/meta.yaml | 3 +-- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 09e0574f..11c3d769 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -20,8 +20,7 @@ build: noarch: python preserve_egg_dir: True number: 0 - string: py{{ PY_VER }} - script: {{PYTHON}} -m pip install . -vv + script: {{PYTHON}} -m pip install --no-deps --no-build-isolation . -vv requirements: build: diff --git a/pyproject.toml b/pyproject.toml index 06c2176b..ea7ff1b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,6 @@ dynamic = ["readme","version"] dependencies = [ "numpy", "scipy", - "matplotlib-base", "pandas", ] @@ -60,6 +59,7 @@ dependencies = [ "openalea.plantgl", "openalea.caribu", "openalea.astk", + "matplotlib-base", "rpy2" ] [tool.setuptools.dynamic] From 881350ba50f3da7dea98a59cf3b80818b38fd90f Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 13:57:48 +0100 Subject: [PATCH 02/14] add r-base to run deps --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ea7ff1b6..78527106 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,7 @@ dependencies = [ "numpy", "scipy", "pandas", + "rpy2" ] [project.optional-dependencies] @@ -60,7 +61,7 @@ dependencies = [ "openalea.caribu", "openalea.astk", "matplotlib-base", - "rpy2" + "r-base" ] [tool.setuptools.dynamic] readme = {file = ["README.md"]} From 17aab4d4b0c6053895c4b0bab5ca2f25a5dcf1b0 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 14:23:19 +0100 Subject: [PATCH 03/14] add R_HOME to test env --- conda/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 11c3d769..37249eb9 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -36,7 +36,7 @@ requirements: test: requires: - {% for dep in deps + conda_deps + test_deps %} + {% for dep in test_deps %} - {{ dep }} {% endfor %} imports: @@ -45,6 +45,7 @@ test: - test/** - test/data/** commands: + - set R_HOME=%CONDA_PREFIX%\Library\lib\R # [win] - cd test - pytest -v --ignore=test_povray.py --ignore=test_dataflow.py --ignore=test_plantgen.py From d9ea0b5f73a1dfb873c7ff89b6d94227c2c85ae2 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 15:00:08 +0100 Subject: [PATCH 04/14] try another plausible R_HOME --- conda/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 37249eb9..65d15efa 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -45,7 +45,7 @@ test: - test/** - test/data/** commands: - - set R_HOME=%CONDA_PREFIX%\Library\lib\R # [win] + - set R_HOME=%CONDA_PREFIX%\Lib\R # [win] - cd test - pytest -v --ignore=test_povray.py --ignore=test_dataflow.py --ignore=test_plantgen.py From 67eed0ed655ee10f1d3040fb0b9802ba97f4e7e6 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 15:49:17 +0100 Subject: [PATCH 05/14] another loc --- conda/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 65d15efa..be84038f 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -45,7 +45,7 @@ test: - test/** - test/data/** commands: - - set R_HOME=%CONDA_PREFIX%\Lib\R # [win] + - set R_HOME=%CONDA_PREFIX%\Library\R # [win] - cd test - pytest -v --ignore=test_povray.py --ignore=test_dataflow.py --ignore=test_plantgen.py From a3a1a71e436056e12dd755818f151d57dece5af4 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 20:34:03 +0100 Subject: [PATCH 06/14] try seting rpy2 to last working ci --- conda/meta.yaml | 1 - pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index be84038f..756c30e1 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -45,7 +45,6 @@ test: - test/** - test/data/** commands: - - set R_HOME=%CONDA_PREFIX%\Library\R # [win] - cd test - pytest -v --ignore=test_povray.py --ignore=test_dataflow.py --ignore=test_plantgen.py diff --git a/pyproject.toml b/pyproject.toml index 78527106..e26b4552 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "numpy", "scipy", "pandas", - "rpy2" + "rpy2 <3.6.4" ] [project.optional-dependencies] From e3c2f930c90d6acd05ca5b7075cdeb758de5bf7c Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 20:50:54 +0100 Subject: [PATCH 07/14] try removing pgl --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e26b4552..aea1968c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "numpy", "scipy", "pandas", - "rpy2 <3.6.4" + "rpy2" ] [project.optional-dependencies] @@ -57,7 +57,6 @@ channels = [ dependencies = [ "openalea.mtg", - "openalea.plantgl", "openalea.caribu", "openalea.astk", "matplotlib-base", From 3247d8b7c9ce31083148cd849a8b15d3be634f48 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 22:17:16 +0100 Subject: [PATCH 08/14] skip rpy2 related test on windows --- pyproject.toml | 4 ++-- test/test_AdelWheat.py | 17 +++++++++++++++++ test/test_Adel_Maxwell_plante11.py | 19 +++++++++++++++++++ test/test_adelwheat_dynamic.py | 16 ++++++++++++++++ test/test_astk_interface.py | 17 +++++++++++++++++ test/test_data_samples.py | 17 +++++++++++++++++ 6 files changed, 88 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aea1968c..5c97c20f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,10 +57,10 @@ channels = [ dependencies = [ "openalea.mtg", + "openalea.plantgl", "openalea.caribu", "openalea.astk", - "matplotlib-base", - "r-base" + "matplotlib-base" ] [tool.setuptools.dynamic] readme = {file = ["README.md"]} diff --git a/test/test_AdelWheat.py b/test/test_AdelWheat.py index 9b412588..9df02839 100644 --- a/test/test_AdelWheat.py +++ b/test/test_AdelWheat.py @@ -1,3 +1,20 @@ +import sys +import pytest +import rpy2 + +try: + # test if R's stats package loads correctly + import rpy2.robjects as ro + ro.r("na.omit") # will error on broken R + r_ok = True +except Exception: + r_ok = False + +pytestmark = pytest.mark.skipif( + sys.platform == "win32" or not r_ok, + reason="Skipping R tests on Windows CI due to broken R installation" +) + from openalea.adel.astk_interface import AdelWheat from openalea.astk.Weather import sample_weather diff --git a/test/test_Adel_Maxwell_plante11.py b/test/test_Adel_Maxwell_plante11.py index 75efa605..c18003bd 100644 --- a/test/test_Adel_Maxwell_plante11.py +++ b/test/test_Adel_Maxwell_plante11.py @@ -1,4 +1,23 @@ """Test stability of Adel for simulating a reference plant (Maxwell, plant 11, pareameterised by M. Abichou/B.Andrieu, EGC Grignon""" +import sys +import pytest +import rpy2 + +try: + # test if R's stats package loads correctly + import rpy2.robjects as ro + ro.r("na.omit") # will error on broken R + r_ok = True +except Exception: + r_ok = False + +pytestmark = pytest.mark.skipif( + sys.platform == "win32" or not r_ok, + reason="Skipping R tests on Windows CI due to broken R installation" +) + + + import pathlib from functools import reduce diff --git a/test/test_adelwheat_dynamic.py b/test/test_adelwheat_dynamic.py index 919d34d8..01e17aa1 100644 --- a/test/test_adelwheat_dynamic.py +++ b/test/test_adelwheat_dynamic.py @@ -1,4 +1,20 @@ """Test use cases of adel/fspm wheat coupling""" +import sys +import pytest +import rpy2 + +try: + # test if R's stats package loads correctly + import rpy2.robjects as ro + ro.r("na.omit") # will error on broken R + r_ok = True +except Exception: + r_ok = False + +pytestmark = pytest.mark.skipif( + sys.platform == "win32" or not r_ok, + reason="Skipping R tests on Windows CI due to broken R installation" +) from openalea.adel.adelwheat_dynamic import AdelWheatDyn diff --git a/test/test_astk_interface.py b/test/test_astk_interface.py index cb5806a5..a4767099 100644 --- a/test/test_astk_interface.py +++ b/test/test_astk_interface.py @@ -1,3 +1,20 @@ +import sys +import pytest +import rpy2 + +try: + # test if R's stats package loads correctly + import rpy2.robjects as ro + ro.r("na.omit") # will error on broken R + r_ok = True +except Exception: + r_ok = False + +pytestmark = pytest.mark.skipif( + sys.platform == "win32" or not r_ok, + reason="Skipping R tests on Windows CI due to broken R installation" +) + from openalea.adel.astk_interface import AdelWheat diff --git a/test/test_data_samples.py b/test/test_data_samples.py index 1815ac0c..bdc8887b 100644 --- a/test/test_data_samples.py +++ b/test/test_data_samples.py @@ -1,3 +1,20 @@ +import sys +import pytest +import rpy2 + +try: + # test if R's stats package loads correctly + import rpy2.robjects as ro + ro.r("na.omit") # will error on broken R + r_ok = True +except Exception: + r_ok = False + +pytestmark = pytest.mark.skipif( + sys.platform == "win32" or not r_ok, + reason="Skipping R tests on Windows CI due to broken R installation" +) + from openalea.adel.data_samples import * From f04791b4f5008e58f6f3b25a9daffbd560df2357 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 4 Dec 2025 22:58:43 +0100 Subject: [PATCH 09/14] skip only if rpy2 is not functional --- test/test_AdelWheat.py | 4 +--- test/test_Adel_Maxwell_plante11.py | 4 +--- test/test_adelwheat_dynamic.py | 5 +---- test/test_astk_interface.py | 4 +--- test/test_data_samples.py | 3 +-- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/test/test_AdelWheat.py b/test/test_AdelWheat.py index 9df02839..a2831f47 100644 --- a/test/test_AdelWheat.py +++ b/test/test_AdelWheat.py @@ -1,6 +1,4 @@ -import sys import pytest -import rpy2 try: # test if R's stats package loads correctly @@ -11,7 +9,7 @@ r_ok = False pytestmark = pytest.mark.skipif( - sys.platform == "win32" or not r_ok, + not r_ok, reason="Skipping R tests on Windows CI due to broken R installation" ) diff --git a/test/test_Adel_Maxwell_plante11.py b/test/test_Adel_Maxwell_plante11.py index c18003bd..f15740fc 100644 --- a/test/test_Adel_Maxwell_plante11.py +++ b/test/test_Adel_Maxwell_plante11.py @@ -1,7 +1,5 @@ """Test stability of Adel for simulating a reference plant (Maxwell, plant 11, pareameterised by M. Abichou/B.Andrieu, EGC Grignon""" -import sys import pytest -import rpy2 try: # test if R's stats package loads correctly @@ -12,7 +10,7 @@ r_ok = False pytestmark = pytest.mark.skipif( - sys.platform == "win32" or not r_ok, + not r_ok, reason="Skipping R tests on Windows CI due to broken R installation" ) diff --git a/test/test_adelwheat_dynamic.py b/test/test_adelwheat_dynamic.py index 01e17aa1..a24c1385 100644 --- a/test/test_adelwheat_dynamic.py +++ b/test/test_adelwheat_dynamic.py @@ -1,7 +1,5 @@ """Test use cases of adel/fspm wheat coupling""" -import sys import pytest -import rpy2 try: # test if R's stats package loads correctly @@ -12,10 +10,9 @@ r_ok = False pytestmark = pytest.mark.skipif( - sys.platform == "win32" or not r_ok, + not r_ok, reason="Skipping R tests on Windows CI due to broken R installation" ) - from openalea.adel.adelwheat_dynamic import AdelWheatDyn diff --git a/test/test_astk_interface.py b/test/test_astk_interface.py index a4767099..9d84d0ad 100644 --- a/test/test_astk_interface.py +++ b/test/test_astk_interface.py @@ -1,6 +1,4 @@ -import sys import pytest -import rpy2 try: # test if R's stats package loads correctly @@ -11,7 +9,7 @@ r_ok = False pytestmark = pytest.mark.skipif( - sys.platform == "win32" or not r_ok, + not r_ok, reason="Skipping R tests on Windows CI due to broken R installation" ) diff --git a/test/test_data_samples.py b/test/test_data_samples.py index bdc8887b..78488653 100644 --- a/test/test_data_samples.py +++ b/test/test_data_samples.py @@ -1,6 +1,5 @@ import sys import pytest -import rpy2 try: # test if R's stats package loads correctly @@ -11,7 +10,7 @@ r_ok = False pytestmark = pytest.mark.skipif( - sys.platform == "win32" or not r_ok, + not r_ok, reason="Skipping R tests on Windows CI due to broken R installation" ) From d29978fc8f96e50867d76c5e3bb4067d2e17955d Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 11 Dec 2025 10:45:09 +0100 Subject: [PATCH 10/14] factorise test configuration for R availability --- test/conftest.py | 14 ++++++++++++++ test/test_AdelWheat.py | 19 ++----------------- test/test_Adel_Maxwell_plante11.py | 20 +++----------------- test/test_adelwheat_dynamic.py | 17 +++-------------- test/test_astk_interface.py | 17 +++-------------- test/test_data_samples.py | 18 ++---------------- 6 files changed, 27 insertions(+), 78 deletions(-) create mode 100644 test/conftest.py diff --git a/test/conftest.py b/test/conftest.py new file mode 100644 index 00000000..325c8c78 --- /dev/null +++ b/test/conftest.py @@ -0,0 +1,14 @@ +import pytest + +try: + # test if R's stats package loads correctly + import rpy2.robjects as ro + ro.r("na.omit") # will error on broken R + R_OK = True +except Exception: + R_OK = False + +pytest_r_skip = pytest.mark.skipif( + not R_OK, + reason="Skipping R/rpy2 tests on this platform due to broken R/rpy2 installation" +) \ No newline at end of file diff --git a/test/test_AdelWheat.py b/test/test_AdelWheat.py index a2831f47..3dd9a810 100644 --- a/test/test_AdelWheat.py +++ b/test/test_AdelWheat.py @@ -1,24 +1,9 @@ -import pytest - -try: - # test if R's stats package loads correctly - import rpy2.robjects as ro - ro.r("na.omit") # will error on broken R - r_ok = True -except Exception: - r_ok = False - -pytestmark = pytest.mark.skipif( - not r_ok, - reason="Skipping R tests on Windows CI due to broken R installation" -) - from openalea.adel.astk_interface import AdelWheat from openalea.astk.Weather import sample_weather +from .conftest import pytest_r_skip - - +@pytest_r_skip def test_adelwheat(): seq, weather = sample_weather() seq = seq.tz_localize(tz='Europe/Paris') diff --git a/test/test_Adel_Maxwell_plante11.py b/test/test_Adel_Maxwell_plante11.py index f15740fc..ce661bee 100644 --- a/test/test_Adel_Maxwell_plante11.py +++ b/test/test_Adel_Maxwell_plante11.py @@ -1,28 +1,14 @@ """Test stability of Adel for simulating a reference plant (Maxwell, plant 11, pareameterised by M. Abichou/B.Andrieu, EGC Grignon""" -import pytest - -try: - # test if R's stats package loads correctly - import rpy2.robjects as ro - ro.r("na.omit") # will error on broken R - r_ok = True -except Exception: - r_ok = False - -pytestmark = pytest.mark.skipif( - not r_ok, - reason="Skipping R tests on Windows CI due to broken R installation" -) - - - import pathlib from functools import reduce from openalea.adel.AdelR import devCsv, setAdel, RunAdel, genGeoLeaf, genGeoAxe, \ csvAsDict +from .conftest import pytest_r_skip + +@pytest_r_skip def test_organ_length(): dir = str(pathlib.Path(__file__).parent.resolve() / "data" / "test_Adel_Maxwell_plante11/Maxwell_") sufix = "_plante11.csv" diff --git a/test/test_adelwheat_dynamic.py b/test/test_adelwheat_dynamic.py index a24c1385..d012797a 100644 --- a/test/test_adelwheat_dynamic.py +++ b/test/test_adelwheat_dynamic.py @@ -1,21 +1,10 @@ """Test use cases of adel/fspm wheat coupling""" -import pytest - -try: - # test if R's stats package loads correctly - import rpy2.robjects as ro - ro.r("na.omit") # will error on broken R - r_ok = True -except Exception: - r_ok = False - -pytestmark = pytest.mark.skipif( - not r_ok, - reason="Skipping R tests on Windows CI due to broken R installation" -) from openalea.adel.adelwheat_dynamic import AdelWheatDyn +from .conftest import pytest_r_skip + +@pytest_r_skip def test_add_metamer(): # create a plant with 3 metamers adel = AdelWheatDyn(seed=1234) diff --git a/test/test_astk_interface.py b/test/test_astk_interface.py index 9d84d0ad..50502c98 100644 --- a/test/test_astk_interface.py +++ b/test/test_astk_interface.py @@ -1,17 +1,6 @@ -import pytest - -try: - # test if R's stats package loads correctly - import rpy2.robjects as ro - ro.r("na.omit") # will error on broken R - r_ok = True -except Exception: - r_ok = False - -pytestmark = pytest.mark.skipif( - not r_ok, - reason="Skipping R tests on Windows CI due to broken R installation" -) +from .conftest import pytest_r_skip + +pytestmark = pytest_r_skip from openalea.adel.astk_interface import AdelWheat diff --git a/test/test_data_samples.py b/test/test_data_samples.py index 78488653..744b2ac4 100644 --- a/test/test_data_samples.py +++ b/test/test_data_samples.py @@ -1,22 +1,8 @@ -import sys -import pytest - -try: - # test if R's stats package loads correctly - import rpy2.robjects as ro - ro.r("na.omit") # will error on broken R - r_ok = True -except Exception: - r_ok = False - -pytestmark = pytest.mark.skipif( - not r_ok, - reason="Skipping R tests on Windows CI due to broken R installation" -) - from openalea.adel.data_samples import * +from .conftest import pytest_r_skip +@pytest_r_skip def test_leaf_db(): db = leaves_db() sr = srdb() From 5c322225d750b71f1674569b6cc2cf14ea69617f Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 11 Dec 2025 11:03:01 +0100 Subject: [PATCH 11/14] let pytest discover conftest.py without import --- test/test_AdelWheat.py | 1 - test/test_Adel_Maxwell_plante11.py | 2 -- test/test_adelwheat_dynamic.py | 2 -- test/test_astk_interface.py | 4 +--- test/test_data_samples.py | 1 - 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/test/test_AdelWheat.py b/test/test_AdelWheat.py index 3dd9a810..fb04e7bf 100644 --- a/test/test_AdelWheat.py +++ b/test/test_AdelWheat.py @@ -1,6 +1,5 @@ from openalea.adel.astk_interface import AdelWheat from openalea.astk.Weather import sample_weather -from .conftest import pytest_r_skip @pytest_r_skip diff --git a/test/test_Adel_Maxwell_plante11.py b/test/test_Adel_Maxwell_plante11.py index ce661bee..bcf7a712 100644 --- a/test/test_Adel_Maxwell_plante11.py +++ b/test/test_Adel_Maxwell_plante11.py @@ -5,8 +5,6 @@ from openalea.adel.AdelR import devCsv, setAdel, RunAdel, genGeoLeaf, genGeoAxe, \ csvAsDict -from .conftest import pytest_r_skip - @pytest_r_skip def test_organ_length(): diff --git a/test/test_adelwheat_dynamic.py b/test/test_adelwheat_dynamic.py index d012797a..1a7affdd 100644 --- a/test/test_adelwheat_dynamic.py +++ b/test/test_adelwheat_dynamic.py @@ -1,8 +1,6 @@ """Test use cases of adel/fspm wheat coupling""" from openalea.adel.adelwheat_dynamic import AdelWheatDyn -from .conftest import pytest_r_skip - @pytest_r_skip def test_add_metamer(): diff --git a/test/test_astk_interface.py b/test/test_astk_interface.py index 50502c98..739c2163 100644 --- a/test/test_astk_interface.py +++ b/test/test_astk_interface.py @@ -1,9 +1,7 @@ -from .conftest import pytest_r_skip +from openalea.adel.astk_interface import AdelWheat pytestmark = pytest_r_skip -from openalea.adel.astk_interface import AdelWheat - def test_static(): nplants = 1 diff --git a/test/test_data_samples.py b/test/test_data_samples.py index 744b2ac4..7b1c71f3 100644 --- a/test/test_data_samples.py +++ b/test/test_data_samples.py @@ -1,5 +1,4 @@ from openalea.adel.data_samples import * -from .conftest import pytest_r_skip @pytest_r_skip From c17f5c306c627034fb325fca9333a7487f403dfd Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 11 Dec 2025 11:18:21 +0100 Subject: [PATCH 12/14] add __init__ + local imports --- test/__init__.py | 1 + test/test_AdelWheat.py | 1 + test/test_Adel_Maxwell_plante11.py | 2 ++ test/test_adelwheat_dynamic.py | 1 + test/test_astk_interface.py | 2 +- test/test_data_samples.py | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/__init__.py diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 00000000..9ef2f961 --- /dev/null +++ b/test/__init__.py @@ -0,0 +1 @@ +# Needed to make conftest.py visible \ No newline at end of file diff --git a/test/test_AdelWheat.py b/test/test_AdelWheat.py index fb04e7bf..3dd9a810 100644 --- a/test/test_AdelWheat.py +++ b/test/test_AdelWheat.py @@ -1,5 +1,6 @@ from openalea.adel.astk_interface import AdelWheat from openalea.astk.Weather import sample_weather +from .conftest import pytest_r_skip @pytest_r_skip diff --git a/test/test_Adel_Maxwell_plante11.py b/test/test_Adel_Maxwell_plante11.py index bcf7a712..ce661bee 100644 --- a/test/test_Adel_Maxwell_plante11.py +++ b/test/test_Adel_Maxwell_plante11.py @@ -5,6 +5,8 @@ from openalea.adel.AdelR import devCsv, setAdel, RunAdel, genGeoLeaf, genGeoAxe, \ csvAsDict +from .conftest import pytest_r_skip + @pytest_r_skip def test_organ_length(): diff --git a/test/test_adelwheat_dynamic.py b/test/test_adelwheat_dynamic.py index 1a7affdd..d7490d0a 100644 --- a/test/test_adelwheat_dynamic.py +++ b/test/test_adelwheat_dynamic.py @@ -1,5 +1,6 @@ """Test use cases of adel/fspm wheat coupling""" from openalea.adel.adelwheat_dynamic import AdelWheatDyn +from .conftest import pytest_r_skip @pytest_r_skip diff --git a/test/test_astk_interface.py b/test/test_astk_interface.py index 739c2163..a1105141 100644 --- a/test/test_astk_interface.py +++ b/test/test_astk_interface.py @@ -1,8 +1,8 @@ from openalea.adel.astk_interface import AdelWheat +from .conftest import pytest_r_skip pytestmark = pytest_r_skip - def test_static(): nplants = 1 adel = AdelWheat(nplants=nplants) diff --git a/test/test_data_samples.py b/test/test_data_samples.py index 7b1c71f3..744b2ac4 100644 --- a/test/test_data_samples.py +++ b/test/test_data_samples.py @@ -1,4 +1,5 @@ from openalea.adel.data_samples import * +from .conftest import pytest_r_skip @pytest_r_skip From 9122478a99f22e360367e47602d06362d52eb1d5 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Thu, 11 Dec 2025 11:33:31 +0100 Subject: [PATCH 13/14] mark test_devT as r-dependant test --- test/test_data_samples.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_data_samples.py b/test/test_data_samples.py index 744b2ac4..5e837f14 100644 --- a/test/test_data_samples.py +++ b/test/test_data_samples.py @@ -14,6 +14,7 @@ def test_leaf_db(): assert leaves is not None +@pytest_r_skip def test_devT(): dev = devT() assert dev is not None From 4db02fb7760b68fd3a8a709860dec2dece4d6349 Mon Sep 17 00:00:00 2001 From: Christophe Pradal Date: Thu, 11 Dec 2025 23:15:43 +0100 Subject: [PATCH 14/14] Add newline at end of conftest.py --- test/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/conftest.py b/test/conftest.py index 325c8c78..608a077b 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -11,4 +11,4 @@ pytest_r_skip = pytest.mark.skipif( not R_OK, reason="Skipping R/rpy2 tests on this platform due to broken R/rpy2 installation" -) \ No newline at end of file +)