From 42a38771c3d538ca5c7bd5817c349ab9ad98180a Mon Sep 17 00:00:00 2001 From: thomasarsouze Date: Mon, 22 Jan 2024 15:27:48 +0100 Subject: [PATCH 1/5] Add openalea namespace --- setup.py | 16 +++++++++------- src/{ => openalea}/hydroshoot/README.md | 0 src/{ => openalea}/hydroshoot/__init__.py | 0 src/{ => openalea}/hydroshoot/architecture.py | 0 src/{ => openalea}/hydroshoot/constants.py | 0 src/{ => openalea}/hydroshoot/display.py | 0 src/{ => openalea}/hydroshoot/energy.py | 0 src/{ => openalea}/hydroshoot/exchange.py | 0 src/{ => openalea}/hydroshoot/extern/__init__.py | 0 src/{ => openalea}/hydroshoot/extern/roman.py | 0 src/{ => openalea}/hydroshoot/hydraulic.py | 0 src/{ => openalea}/hydroshoot/initialisation.py | 0 src/{ => openalea}/hydroshoot/io.py | 0 src/{ => openalea}/hydroshoot/irradiance.py | 0 src/{ => openalea}/hydroshoot/model.py | 0 src/{ => openalea}/hydroshoot/params.py | 0 src/{ => openalea}/hydroshoot/params_schema.json | 0 src/{ => openalea}/hydroshoot/preprocess.py | 0 src/{ => openalea}/hydroshoot/primitive.py | 0 src/{ => openalea}/hydroshoot/soil.py | 0 src/{ => openalea}/hydroshoot/solver.py | 0 src/{ => openalea}/hydroshoot/utilities.py | 0 src/{ => openalea}/hydroshoot/version.py | 0 23 files changed, 9 insertions(+), 7 deletions(-) rename src/{ => openalea}/hydroshoot/README.md (100%) rename src/{ => openalea}/hydroshoot/__init__.py (100%) rename src/{ => openalea}/hydroshoot/architecture.py (100%) rename src/{ => openalea}/hydroshoot/constants.py (100%) rename src/{ => openalea}/hydroshoot/display.py (100%) rename src/{ => openalea}/hydroshoot/energy.py (100%) rename src/{ => openalea}/hydroshoot/exchange.py (100%) rename src/{ => openalea}/hydroshoot/extern/__init__.py (100%) rename src/{ => openalea}/hydroshoot/extern/roman.py (100%) rename src/{ => openalea}/hydroshoot/hydraulic.py (100%) rename src/{ => openalea}/hydroshoot/initialisation.py (100%) rename src/{ => openalea}/hydroshoot/io.py (100%) rename src/{ => openalea}/hydroshoot/irradiance.py (100%) rename src/{ => openalea}/hydroshoot/model.py (100%) rename src/{ => openalea}/hydroshoot/params.py (100%) rename src/{ => openalea}/hydroshoot/params_schema.json (100%) rename src/{ => openalea}/hydroshoot/preprocess.py (100%) rename src/{ => openalea}/hydroshoot/primitive.py (100%) rename src/{ => openalea}/hydroshoot/soil.py (100%) rename src/{ => openalea}/hydroshoot/solver.py (100%) rename src/{ => openalea}/hydroshoot/utilities.py (100%) rename src/{ => openalea}/hydroshoot/version.py (100%) diff --git a/setup.py b/setup.py index 6af345d..baca55f 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from os.path import abspath, normpath from os.path import join as pj -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages short_descr = "HydroShoot is an FSPM model to simulate gas-exchange on vine" @@ -17,10 +17,11 @@ # find version number in src/hydroshoot/version.py -version = {} +_version = {} with open("src/hydroshoot/version.py") as fp: - exec(fp.read(), version) + exec(fp.read(), _version) +version = _version["__version__"] data_files = [] @@ -47,12 +48,13 @@ def data_rel_pth(pth): author="Rami Albasha, Christian Fournier, Christophe Pradal, Eric Lebon, ", author_email="rami albasha at inra dot fr, @fournier-ch, @pradal, eric dot lebon at inra dot fr, ", url='https://github.com/openalea/hydroshoot', - license='cecill-c', + license='CeCILL-C', zip_safe=False, - packages=find_packages('src'), + packages=find_namespace_packages(where='src', include=['openalea', 'openalea.*']), package_dir={'': 'src'}, - + namespace_packages=['openalea'], + include_package_data=True, package_data={'hydroshoot_data': data_files}, install_requires=[ @@ -61,7 +63,7 @@ def data_rel_pth(pth): "pytest", ], entry_points={}, - keywords='', + keywords=['FSPM', 'openalea', 'plant', 'MTG', 'Hydraulic Structure', 'gas-exchange', 'energy balance'], test_suite='nose.collector', ) # #} diff --git a/src/hydroshoot/README.md b/src/openalea/hydroshoot/README.md similarity index 100% rename from src/hydroshoot/README.md rename to src/openalea/hydroshoot/README.md diff --git a/src/hydroshoot/__init__.py b/src/openalea/hydroshoot/__init__.py similarity index 100% rename from src/hydroshoot/__init__.py rename to src/openalea/hydroshoot/__init__.py diff --git a/src/hydroshoot/architecture.py b/src/openalea/hydroshoot/architecture.py similarity index 100% rename from src/hydroshoot/architecture.py rename to src/openalea/hydroshoot/architecture.py diff --git a/src/hydroshoot/constants.py b/src/openalea/hydroshoot/constants.py similarity index 100% rename from src/hydroshoot/constants.py rename to src/openalea/hydroshoot/constants.py diff --git a/src/hydroshoot/display.py b/src/openalea/hydroshoot/display.py similarity index 100% rename from src/hydroshoot/display.py rename to src/openalea/hydroshoot/display.py diff --git a/src/hydroshoot/energy.py b/src/openalea/hydroshoot/energy.py similarity index 100% rename from src/hydroshoot/energy.py rename to src/openalea/hydroshoot/energy.py diff --git a/src/hydroshoot/exchange.py b/src/openalea/hydroshoot/exchange.py similarity index 100% rename from src/hydroshoot/exchange.py rename to src/openalea/hydroshoot/exchange.py diff --git a/src/hydroshoot/extern/__init__.py b/src/openalea/hydroshoot/extern/__init__.py similarity index 100% rename from src/hydroshoot/extern/__init__.py rename to src/openalea/hydroshoot/extern/__init__.py diff --git a/src/hydroshoot/extern/roman.py b/src/openalea/hydroshoot/extern/roman.py similarity index 100% rename from src/hydroshoot/extern/roman.py rename to src/openalea/hydroshoot/extern/roman.py diff --git a/src/hydroshoot/hydraulic.py b/src/openalea/hydroshoot/hydraulic.py similarity index 100% rename from src/hydroshoot/hydraulic.py rename to src/openalea/hydroshoot/hydraulic.py diff --git a/src/hydroshoot/initialisation.py b/src/openalea/hydroshoot/initialisation.py similarity index 100% rename from src/hydroshoot/initialisation.py rename to src/openalea/hydroshoot/initialisation.py diff --git a/src/hydroshoot/io.py b/src/openalea/hydroshoot/io.py similarity index 100% rename from src/hydroshoot/io.py rename to src/openalea/hydroshoot/io.py diff --git a/src/hydroshoot/irradiance.py b/src/openalea/hydroshoot/irradiance.py similarity index 100% rename from src/hydroshoot/irradiance.py rename to src/openalea/hydroshoot/irradiance.py diff --git a/src/hydroshoot/model.py b/src/openalea/hydroshoot/model.py similarity index 100% rename from src/hydroshoot/model.py rename to src/openalea/hydroshoot/model.py diff --git a/src/hydroshoot/params.py b/src/openalea/hydroshoot/params.py similarity index 100% rename from src/hydroshoot/params.py rename to src/openalea/hydroshoot/params.py diff --git a/src/hydroshoot/params_schema.json b/src/openalea/hydroshoot/params_schema.json similarity index 100% rename from src/hydroshoot/params_schema.json rename to src/openalea/hydroshoot/params_schema.json diff --git a/src/hydroshoot/preprocess.py b/src/openalea/hydroshoot/preprocess.py similarity index 100% rename from src/hydroshoot/preprocess.py rename to src/openalea/hydroshoot/preprocess.py diff --git a/src/hydroshoot/primitive.py b/src/openalea/hydroshoot/primitive.py similarity index 100% rename from src/hydroshoot/primitive.py rename to src/openalea/hydroshoot/primitive.py diff --git a/src/hydroshoot/soil.py b/src/openalea/hydroshoot/soil.py similarity index 100% rename from src/hydroshoot/soil.py rename to src/openalea/hydroshoot/soil.py diff --git a/src/hydroshoot/solver.py b/src/openalea/hydroshoot/solver.py similarity index 100% rename from src/hydroshoot/solver.py rename to src/openalea/hydroshoot/solver.py diff --git a/src/hydroshoot/utilities.py b/src/openalea/hydroshoot/utilities.py similarity index 100% rename from src/hydroshoot/utilities.py rename to src/openalea/hydroshoot/utilities.py diff --git a/src/hydroshoot/version.py b/src/openalea/hydroshoot/version.py similarity index 100% rename from src/hydroshoot/version.py rename to src/openalea/hydroshoot/version.py From 497bac3818c9c2889984db48cdf9586cd917b7f4 Mon Sep 17 00:00:00 2001 From: thomasarsouze Date: Mon, 22 Jan 2024 15:38:59 +0100 Subject: [PATCH 2/5] Update file paths in setup.py --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index baca55f..0048517 100644 --- a/setup.py +++ b/setup.py @@ -18,14 +18,14 @@ # find version number in src/hydroshoot/version.py _version = {} -with open("src/hydroshoot/version.py") as fp: +with open("src/openalea/hydroshoot/version.py") as fp: exec(fp.read(), _version) version = _version["__version__"] data_files = [] -nb = len(normpath(abspath("src/hydroshoot_data"))) + 1 +nb = len(normpath(abspath("src/openalea/hydroshoot_data"))) + 1 def data_rel_pth(pth): @@ -35,14 +35,14 @@ def data_rel_pth(pth): return abs_pth[nb:] -for root, dnames, fnames in walk("src/hydroshoot_data"): +for root, dnames, fnames in walk("src/openalea/hydroshoot_data"): for name in fnames: data_files.append(data_rel_pth(pj(root, name))) setup_kwds = dict( name='hydroshoot', - version=version["__version__"], + version=version, description=short_descr, long_description=readme + '\n\n' + history, author="Rami Albasha, Christian Fournier, Christophe Pradal, Eric Lebon, ", From ca2773a2f8f60e09fb7dbb9bead6ae5c635ce277 Mon Sep 17 00:00:00 2001 From: thomasarsouze Date: Wed, 31 Jan 2024 13:43:01 +0100 Subject: [PATCH 3/5] Update import to openalea.hydroshoot --- doc/usage.rst | 4 ++-- example/figs/paper_figs.py | 6 +++--- example/gdc_can1_grapevine/sim.py | 2 +- example/gdc_can2_grapevine/sim.py | 2 +- example/gdc_can3_grapevine/sim.py | 2 +- example/misc/sim.py | 2 +- example/modularity/ws/sim_1/sim.py | 2 +- example/modularity/ws/sim_2/sim.py | 2 +- example/modularity/ws/sim_3/sim.py | 2 +- example/modularity/ws/sim_4/sim.py | 2 +- example/modularity/ww/sim_1/sim.py | 2 +- example/modularity/ww/sim_2/sim.py | 2 +- example/modularity/ww/sim_3/sim.py | 2 +- example/modularity/ww/sim_4/sim.py | 2 +- example/potted_grapevine/sim.py | 2 +- .../sim_with_preprocessed_inputs.py | 2 +- example/virtual_canopies/gdc/sim.py | 2 +- example/virtual_canopies/lyre/sim.py | 2 +- example/virtual_canopies/vsp/sim.py | 2 +- example/vsp_ws_grapevine/sim.py | 2 +- example/vsp_ww_grapevine/sim.py | 2 +- src/openalea/hydroshoot/architecture.py | 2 +- src/openalea/hydroshoot/display.py | 2 +- src/openalea/hydroshoot/energy.py | 6 +++--- src/openalea/hydroshoot/exchange.py | 4 ++-- src/openalea/hydroshoot/hydraulic.py | 2 +- src/openalea/hydroshoot/initialisation.py | 16 ++++++++-------- src/openalea/hydroshoot/io.py | 10 +++++----- src/openalea/hydroshoot/irradiance.py | 2 +- src/openalea/hydroshoot/model.py | 6 +++--- src/openalea/hydroshoot/preprocess.py | 2 +- src/openalea/hydroshoot/soil.py | 2 +- src/openalea/hydroshoot/solver.py | 6 +++--- test/non_regression_data.py | 2 +- test/test_architecture.py | 2 +- test/test_energy.py | 6 +++--- test/test_exchange.py | 2 +- test/test_hydraulic.py | 2 +- test/test_irradiance.py | 2 +- test/test_model.py | 2 +- test/test_soil.py | 2 +- test/test_utilities.py | 2 +- 42 files changed, 65 insertions(+), 65 deletions(-) diff --git a/doc/usage.rst b/doc/usage.rst index 4bb85c1..eb19b2f 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -62,7 +62,7 @@ Set the required files up .. code-block:: python - from hydroshoot import model + from openalea.hydroshoot import model model.run(g, working_directory, psi_soil=-0.5) @@ -103,7 +103,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 hydroshoot import architecture, display, model + from openalea.hydroshoot import architecture, display, model # Path for plant digitalization data. g = architecture.vine_mtg('grapevine_pot.csv') diff --git a/example/figs/paper_figs.py b/example/figs/paper_figs.py index 32c81f3..2d383ba 100644 --- a/example/figs/paper_figs.py +++ b/example/figs/paper_figs.py @@ -972,9 +972,9 @@ def estimate_energy_balance_contribution(): from datetime import datetime, timedelta from matplotlib import dates, pyplot, patches, colors, colorbar, rcParams, ticker, gridspec - from hydroshoot.architecture import mtg_load - from hydroshoot.utilities import vapor_pressure_deficit as VPDa - from hydroshoot import display + from openalea.hydroshoot.architecture import mtg_load + from openalea.hydroshoot.utilities import vapor_pressure_deficit as VPDa + from openalea.hydroshoot import display rcParams.update({'font.size': 11}) pyplot.style.use('seaborn-ticks') diff --git a/example/gdc_can1_grapevine/sim.py b/example/gdc_can1_grapevine/sim.py index e857a9c..5ef617a 100644 --- a/example/gdc_can1_grapevine/sim.py +++ b/example/gdc_can1_grapevine/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/gdc_can2_grapevine/sim.py b/example/gdc_can2_grapevine/sim.py index 666b147..3dd2e46 100644 --- a/example/gdc_can2_grapevine/sim.py +++ b/example/gdc_can2_grapevine/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/gdc_can3_grapevine/sim.py b/example/gdc_can3_grapevine/sim.py index b109dd3..4f1adfd 100644 --- a/example/gdc_can3_grapevine/sim.py +++ b/example/gdc_can3_grapevine/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/misc/sim.py b/example/misc/sim.py index 63b0587..cbe3cf1 100644 --- a/example/misc/sim.py +++ b/example/misc/sim.py @@ -4,7 +4,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model # ============================================================================= # Construct the plant mock-up diff --git a/example/modularity/ws/sim_1/sim.py b/example/modularity/ws/sim_1/sim.py index 79b8249..84aadd4 100644 --- a/example/modularity/ws/sim_1/sim.py +++ b/example/modularity/ws/sim_1/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/modularity/ws/sim_2/sim.py b/example/modularity/ws/sim_2/sim.py index 79b8249..84aadd4 100644 --- a/example/modularity/ws/sim_2/sim.py +++ b/example/modularity/ws/sim_2/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/modularity/ws/sim_3/sim.py b/example/modularity/ws/sim_3/sim.py index 79b8249..84aadd4 100644 --- a/example/modularity/ws/sim_3/sim.py +++ b/example/modularity/ws/sim_3/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/modularity/ws/sim_4/sim.py b/example/modularity/ws/sim_4/sim.py index 79b8249..84aadd4 100644 --- a/example/modularity/ws/sim_4/sim.py +++ b/example/modularity/ws/sim_4/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/modularity/ww/sim_1/sim.py b/example/modularity/ww/sim_1/sim.py index 3219736..72038e1 100644 --- a/example/modularity/ww/sim_1/sim.py +++ b/example/modularity/ww/sim_1/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/modularity/ww/sim_2/sim.py b/example/modularity/ww/sim_2/sim.py index 3219736..72038e1 100644 --- a/example/modularity/ww/sim_2/sim.py +++ b/example/modularity/ww/sim_2/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/modularity/ww/sim_3/sim.py b/example/modularity/ww/sim_3/sim.py index 3219736..72038e1 100644 --- a/example/modularity/ww/sim_3/sim.py +++ b/example/modularity/ww/sim_3/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/modularity/ww/sim_4/sim.py b/example/modularity/ww/sim_4/sim.py index 3219736..72038e1 100644 --- a/example/modularity/ww/sim_4/sim.py +++ b/example/modularity/ww/sim_4/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/potted_grapevine/sim.py b/example/potted_grapevine/sim.py index a8c45ed..cdcbc3d 100644 --- a/example/potted_grapevine/sim.py +++ b/example/potted_grapevine/sim.py @@ -8,7 +8,7 @@ from openalea.mtg import traversal, mtg from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model def build_mtg(path_file: Path, is_show_scene: bool = True) -> (mtg.MTG, Scene): diff --git a/example/potted_grapevine/sim_with_preprocessed_inputs.py b/example/potted_grapevine/sim_with_preprocessed_inputs.py index 32fb477..6c065d1 100644 --- a/example/potted_grapevine/sim_with_preprocessed_inputs.py +++ b/example/potted_grapevine/sim_with_preprocessed_inputs.py @@ -9,7 +9,7 @@ from openalea.plantgl.all import Scene from example.potted_grapevine.sim import build_mtg -from hydroshoot import io, model, initialisation +from openalea.hydroshoot import io, model, initialisation def preprocess_inputs(grapevine_mtg: MTG, path_project_dir: Path, psi_soil: float, gdd_since_budbreak: float, diff --git a/example/virtual_canopies/gdc/sim.py b/example/virtual_canopies/gdc/sim.py index 410ba53..34b6250 100644 --- a/example/virtual_canopies/gdc/sim.py +++ b/example/virtual_canopies/gdc/sim.py @@ -4,7 +4,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/virtual_canopies/lyre/sim.py b/example/virtual_canopies/lyre/sim.py index 1eb827a..31b6e2a 100644 --- a/example/virtual_canopies/lyre/sim.py +++ b/example/virtual_canopies/lyre/sim.py @@ -4,7 +4,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/virtual_canopies/vsp/sim.py b/example/virtual_canopies/vsp/sim.py index 0eaeaa7..f7bb82c 100644 --- a/example/virtual_canopies/vsp/sim.py +++ b/example/virtual_canopies/vsp/sim.py @@ -4,7 +4,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/vsp_ws_grapevine/sim.py b/example/vsp_ws_grapevine/sim.py index b6ab03b..78bfd74 100644 --- a/example/vsp_ws_grapevine/sim.py +++ b/example/vsp_ws_grapevine/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/example/vsp_ww_grapevine/sim.py b/example/vsp_ww_grapevine/sim.py index 3219736..72038e1 100644 --- a/example/vsp_ww_grapevine/sim.py +++ b/example/vsp_ww_grapevine/sim.py @@ -3,7 +3,7 @@ from openalea.mtg import traversal from openalea.plantgl.all import Scene -from hydroshoot import architecture, display, model +from openalea.hydroshoot import architecture, display, model if __name__ == '__main__': path_project = Path(__file__).parent diff --git a/src/openalea/hydroshoot/architecture.py b/src/openalea/hydroshoot/architecture.py index c4e368b..45296d6 100644 --- a/src/openalea/hydroshoot/architecture.py +++ b/src/openalea/hydroshoot/architecture.py @@ -27,7 +27,7 @@ from scipy.linalg import norm, svd from scipy.spatial import distance -from hydroshoot.extern.roman import toRoman +from openalea.hydroshoot.extern.roman import toRoman # ============================================================================== diff --git a/src/openalea/hydroshoot/display.py b/src/openalea/hydroshoot/display.py index 2c68f9f..22e16ae 100644 --- a/src/openalea/hydroshoot/display.py +++ b/src/openalea/hydroshoot/display.py @@ -14,7 +14,7 @@ plt.style.use('ggplot') -from hydroshoot.soil import SOIL_PROPS +from openalea.hydroshoot.soil import SOIL_PROPS DEFAULT_LABELS = { 'Eabs': r'$\mathregular{E_{abs}\/[\mu mol\/m^{-2}\/s^{-1}]}$', diff --git a/src/openalea/hydroshoot/energy.py b/src/openalea/hydroshoot/energy.py index 8cec682..9702741 100644 --- a/src/openalea/hydroshoot/energy.py +++ b/src/openalea/hydroshoot/energy.py @@ -19,9 +19,9 @@ from sympy import Symbol from sympy.solvers import nsolve -import hydroshoot.constants as cst -from hydroshoot import utilities as utils -from hydroshoot.architecture import get_leaves +import openalea.hydroshoot.constants as cst +from openalea.hydroshoot import utilities as utils +from openalea.hydroshoot.architecture import get_leaves def pgl_scene(g, flip=False): diff --git a/src/openalea/hydroshoot/exchange.py b/src/openalea/hydroshoot/exchange.py index 60b63ab..113ebd6 100644 --- a/src/openalea/hydroshoot/exchange.py +++ b/src/openalea/hydroshoot/exchange.py @@ -10,8 +10,8 @@ from copy import deepcopy from math import exp, acos, sqrt, cos, log -from hydroshoot import utilities as utils -from hydroshoot.constants import oxygen_partial_pressure as o, ideal_gaz_cst as r +from openalea.hydroshoot import utilities as utils +from openalea.hydroshoot.constants import oxygen_partial_pressure as o, ideal_gaz_cst as r # ============================================================================== diff --git a/src/openalea/hydroshoot/hydraulic.py b/src/openalea/hydroshoot/hydraulic.py index 90c86a4..444630f 100644 --- a/src/openalea/hydroshoot/hydraulic.py +++ b/src/openalea/hydroshoot/hydraulic.py @@ -13,7 +13,7 @@ import openalea.mtg.traversal as traversal from openalea.plantgl.all import surface as surf -import hydroshoot.constants as cst +import openalea.hydroshoot.constants as cst def conductivity_max(diameter, a=2.8, b=0.1, min_kmax=0.): diff --git a/src/openalea/hydroshoot/initialisation.py b/src/openalea/hydroshoot/initialisation.py index 4e3b608..380779b 100644 --- a/src/openalea/hydroshoot/initialisation.py +++ b/src/openalea/hydroshoot/initialisation.py @@ -6,15 +6,15 @@ from pandas import DataFrame from pandas import date_range -from hydroshoot import soil -from hydroshoot.architecture import get_mtg_base, add_soil_surface_mesh, get_leaves -from hydroshoot.energy import (set_form_factors_simplified, set_local_wind_speed, set_local_air_temperature, +from openalea.hydroshoot import soil +from openalea.hydroshoot.architecture import get_mtg_base, add_soil_surface_mesh, get_leaves +from openalea.hydroshoot.energy import (set_form_factors_simplified, set_local_wind_speed, set_local_air_temperature, set_local_vpd, set_leaf_temperature_to_air_temperature) -from hydroshoot.exchange import leaf_Na -from hydroshoot.io import HydroShootInputs, HydroShootHourlyInputs -from hydroshoot.irradiance import irradiance_distribution, hsCaribu, set_optical_properties -from hydroshoot.params import Params -from hydroshoot.preprocess import calc_gdd_since_budbreak +from openalea.hydroshoot.exchange import leaf_Na +from openalea.hydroshoot.io import HydroShootInputs, HydroShootHourlyInputs +from openalea.hydroshoot.irradiance import irradiance_distribution, hsCaribu, set_optical_properties +from openalea.hydroshoot.params import Params +from openalea.hydroshoot.preprocess import calc_gdd_since_budbreak def calc_nitrogen_distribution(g: MTG, gdd_since_budbreak: float, weather: DataFrame, params: Params) -> float: diff --git a/src/openalea/hydroshoot/io.py b/src/openalea/hydroshoot/io.py index a2fd7ea..f886fd3 100644 --- a/src/openalea/hydroshoot/io.py +++ b/src/openalea/hydroshoot/io.py @@ -6,11 +6,11 @@ from openalea.plantgl.all import Scene from pandas import DataFrame, read_csv, DatetimeIndex -from hydroshoot.architecture import get_leaves -from hydroshoot.display import visu -from hydroshoot.energy import force_soil_temperature -from hydroshoot.params import Params -from hydroshoot.soil import update_soil_water_potential +from openalea.hydroshoot.architecture import get_leaves +from openalea.hydroshoot.display import visu +from openalea.hydroshoot.energy import force_soil_temperature +from openalea.hydroshoot.params import Params +from openalea.hydroshoot.soil import update_soil_water_potential class HydroShootInputs(object): diff --git a/src/openalea/hydroshoot/irradiance.py b/src/openalea/hydroshoot/irradiance.py index 1f9dac3..6635277 100644 --- a/src/openalea/hydroshoot/irradiance.py +++ b/src/openalea/hydroshoot/irradiance.py @@ -16,7 +16,7 @@ from pvlib.solarposition import ephemeris from pytz import timezone -from hydroshoot.architecture import vector_rotation +from openalea.hydroshoot.architecture import vector_rotation def local2solar(local_time, latitude, longitude, time_zone, temperature=25.): diff --git a/src/openalea/hydroshoot/model.py b/src/openalea/hydroshoot/model.py index 3c60e74..51754c3 100644 --- a/src/openalea/hydroshoot/model.py +++ b/src/openalea/hydroshoot/model.py @@ -11,9 +11,9 @@ from openalea.plantgl.all import Scene, surface from pandas import DataFrame -from hydroshoot import (architecture, solver, io, soil, constants) -from hydroshoot.energy import calc_effective_sky_temperature -from hydroshoot.initialisation import init_model, init_hourly, set_collar_water_potential_function +from openalea.hydroshoot import (architecture, solver, io, soil, constants) +from openalea.hydroshoot.energy import calc_effective_sky_temperature +from openalea.hydroshoot.initialisation import init_model, init_hourly, set_collar_water_potential_function def run(g: MTG, wd: Path, path_weather: Path, params: dict = None, scene: Scene = None, diff --git a/src/openalea/hydroshoot/preprocess.py b/src/openalea/hydroshoot/preprocess.py index b00160c..26604a0 100644 --- a/src/openalea/hydroshoot/preprocess.py +++ b/src/openalea/hydroshoot/preprocess.py @@ -2,7 +2,7 @@ from pandas import date_range, DataFrame -from hydroshoot.utilities import calc_effective_daily_temperature +from openalea.hydroshoot.utilities import calc_effective_daily_temperature def calc_gdd_since_budbreak(weather: DataFrame, date_budbreak: datetime, date_beg_sim: datetime, diff --git a/src/openalea/hydroshoot/soil.py b/src/openalea/hydroshoot/soil.py index 068d250..7b1886d 100644 --- a/src/openalea/hydroshoot/soil.py +++ b/src/openalea/hydroshoot/soil.py @@ -1,6 +1,6 @@ from math import pi, log -from hydroshoot import constants as cst +from openalea.hydroshoot import constants as cst SOIL_PROPS = dict( Sand=(0.045, 0.430, 0.145, 2.68, 712.8), diff --git a/src/openalea/hydroshoot/solver.py b/src/openalea/hydroshoot/solver.py index 2a1ab09..83c4f73 100644 --- a/src/openalea/hydroshoot/solver.py +++ b/src/openalea/hydroshoot/solver.py @@ -2,9 +2,9 @@ import openalea.mtg.traversal as traversal -from hydroshoot import hydraulic, exchange, energy -from hydroshoot.architecture import get_leaves -from hydroshoot.soil import update_soil_water_potential +from openalea.hydroshoot import hydraulic, exchange, energy +from openalea.hydroshoot.architecture import get_leaves +from openalea.hydroshoot.soil import update_soil_water_potential def solve_interactions(g, meteo, psi_soil, t_soil, t_sky_eff, params, calc_collar_water_potential): diff --git a/test/non_regression_data.py b/test/non_regression_data.py index a708902..ac01193 100644 --- a/test/non_regression_data.py +++ b/test/non_regression_data.py @@ -5,7 +5,7 @@ from pandas import read_csv, DatetimeIndex from openalea.mtg import traversal -from hydroshoot import architecture +from openalea.hydroshoot import architecture sources_dir = join(dirname(__file__), 'data') diff --git a/test/test_architecture.py b/test/test_architecture.py index 9209928..b424454 100644 --- a/test/test_architecture.py +++ b/test/test_architecture.py @@ -1,6 +1,6 @@ from os.path import dirname, join -from hydroshoot import architecture +from openalea.hydroshoot import architecture Source_Dir = join(dirname(__file__), 'data') diff --git a/test/test_energy.py b/test/test_energy.py index 62366f8..0ff5c38 100644 --- a/test/test_energy.py +++ b/test/test_energy.py @@ -1,9 +1,9 @@ import openalea.plantgl.all as pgl from numpy.testing import assert_almost_equal -import hydroshoot.energy as energy -from hydroshoot.architecture import get_leaves -from hydroshoot.energy import set_form_factors_simplified, calc_leaf_temperature, force_soil_temperature +import openalea.hydroshoot.energy as energy +from openalea.hydroshoot.architecture import get_leaves +from openalea.hydroshoot.energy import set_form_factors_simplified, calc_leaf_temperature, force_soil_temperature from test.non_regression_data import potted_syrah, meteo diff --git a/test/test_exchange.py b/test/test_exchange.py index c28b12b..b6bb1f6 100644 --- a/test/test_exchange.py +++ b/test/test_exchange.py @@ -3,7 +3,7 @@ from numpy import arange, linspace, testing from pandas import Series -from hydroshoot import exchange, utilities, constants +from openalea.hydroshoot import exchange, utilities, constants def setup_default_photosynthesis_params(): diff --git a/test/test_hydraulic.py b/test/test_hydraulic.py index 22b9cff..ad42294 100644 --- a/test/test_hydraulic.py +++ b/test/test_hydraulic.py @@ -1,7 +1,7 @@ from numpy import arange from openalea.mtg import traversal -from hydroshoot import hydraulic, architecture +from openalea.hydroshoot import hydraulic, architecture from test.non_regression_data import potted_syrah diff --git a/test/test_irradiance.py b/test/test_irradiance.py index 4f31c20..57b0213 100644 --- a/test/test_irradiance.py +++ b/test/test_irradiance.py @@ -1,6 +1,6 @@ from numpy.testing import assert_almost_equal -from hydroshoot.irradiance import irradiance_distribution, hsCaribu, set_optical_properties, e_conv_PPFD +from openalea.hydroshoot.irradiance import irradiance_distribution, hsCaribu, set_optical_properties, e_conv_PPFD from test.non_regression_data import potted_syrah, meteo diff --git a/test/test_model.py b/test/test_model.py index a2d529a..a862a27 100644 --- a/test/test_model.py +++ b/test/test_model.py @@ -3,7 +3,7 @@ from numpy.testing import assert_array_almost_equal -from hydroshoot import model +from openalea.hydroshoot import model from test import non_regression_data diff --git a/test/test_soil.py b/test/test_soil.py index 221ccb2..e96d767 100644 --- a/test/test_soil.py +++ b/test/test_soil.py @@ -1,6 +1,6 @@ from numpy import linspace, arange -from hydroshoot import soil +from openalea.hydroshoot import soil SOIL_CLASSES = list(soil.SOIL_PROPS.keys()) diff --git a/test/test_utilities.py b/test/test_utilities.py index 7b87963..c419b4c 100644 --- a/test/test_utilities.py +++ b/test/test_utilities.py @@ -1,4 +1,4 @@ -from hydroshoot import utilities +from openalea.hydroshoot import utilities def test_calc_effective_daily_temperature(): From 211425a4cd41cd44fda9ea09b1457f95bbc26585 Mon Sep 17 00:00:00 2001 From: pradal Date: Tue, 2 Dec 2025 16:00:18 +0100 Subject: [PATCH 4/5] Update maintainers --- conda/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 05d8031..84db0b8 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -55,6 +55,6 @@ about: extra: recipe-maintainers: - - artzet-s + - RamiALBASHA - pradal - - fournier \ No newline at end of file + - christian34 \ No newline at end of file From c057d81cdb84c8e22638b78c9c263baceae9300e Mon Sep 17 00:00:00 2001 From: pradal Date: Wed, 3 Dec 2025 11:10:21 +0100 Subject: [PATCH 5/5] Update the name of the package --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 175b9c5..564fc46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "setuptools-scm"] build-backend = "setuptools.build_meta" [project] -name = "hydroshoot" +name = "openalea.hydroshoot" authors = [ { name = "Rami Albasha"}, { name = "Christian Fournier"},