From dff84dc4d4db05df1d407b919ed125c55bb3ab01 Mon Sep 17 00:00:00 2001 From: baugetfa Date: Mon, 8 Dec 2025 14:23:11 +0100 Subject: [PATCH 1/2] updated conda channel and only one environment.yml --- .readthedocs.yml | 4 ++-- conda/environment.yml | 8 +++++++- doc/usage.rst | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index cce3e91..0842047 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,12 +1,12 @@ version: 2 build: - os: "ubuntu-lts-latest" + os: "ubuntu-24.04" tools: python: "miniconda3-3.12-24.9" conda: - environment: doc/environment.yml + environment: conda/environment.yml sphinx: # Path to your Sphinx configuration file. diff --git a/conda/environment.yml b/conda/environment.yml index d951756..44fb66e 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -1,4 +1,4 @@ -name: hydroroot_dev +name: hydroshoot channels: - openalea3/label/dev - openalea3/label/rc @@ -9,6 +9,12 @@ dependencies: - openalea.plantgl - openalea.caribu - openalea.astk + - numpy + - scipy + - sympy + - pandas + - jsonschema + - pvlib-python - pip - pip: - -e .."[test,doc]" diff --git a/doc/usage.rst b/doc/usage.rst index eb19b2f..955df9b 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -106,7 +106,7 @@ Let's build the mock-up using the digitalization data provided in "grapevine_pot from openalea.hydroshoot import architecture, display, model # Path for plant digitalization data. - g = architecture.vine_mtg('grapevine_pot.csv') + grapevine_mtg = architecture.vine_mtg('grapevine_pot.csv') for v in traversal.iter_mtg2(grapevine_mtg, grapevine_mtg.root): architecture.vine_phyto_modular(grapevine_mtg, v) @@ -118,7 +118,7 @@ Display now the scene using **display** module, you should be having something l .. code-block:: python - scene = display.visu(g, def_elmnt_color_dict=True, scene=Scene(), + scene = display.visu(grapevine_mtg, def_elmnt_color_dict=True, scene=Scene(), view_result=True) From f019da7055b6db7e479f4fc5160c31f9df7cddeb Mon Sep 17 00:00:00 2001 From: baugetfa Date: Mon, 8 Dec 2025 15:20:28 +0100 Subject: [PATCH 2/2] corrected code lines to get example working --- doc/usage.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/usage.rst b/doc/usage.rst index 955df9b..15bc80c 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -104,6 +104,7 @@ Let's build the mock-up using the digitalization data provided in "grapevine_pot from openalea.mtg import traversal from openalea.plantgl.all import Scene from openalea.hydroshoot import architecture, display, model + from pathlib import Path # Path for plant digitalization data. grapevine_mtg = architecture.vine_mtg('grapevine_pot.csv') @@ -134,9 +135,12 @@ potential to a fixed value of -0.5 :math:`MPa`. Ensure first that the model will start and end dates of the simulation in the "params.json" file ("sdate": "2012-08-01 11:00:00", "edate": "2012-08-01 11:00:00"). +Create a folder named 'output' and run the model. + .. code-block:: python - model.run(g, str(getcwd()) + '/', scene, psi_soil=-0.2, gdd_since_budbreak=100.) + model.run(grapevine_mtg, Path(str(getcwd()) + '/'), Path(str(getcwd()) + '/meteo.input'), + Scene = scene, psi_soil=-0.2, gdd_since_budbreak=100.) You should now have created the '/output/' folder where output files ("time_series.ouput", "mtg20120801110000.pckl") are stored. "time_series.ouput" file should contain close values to those below: