From e70d9f8bac0378ee331515b38df8b8387cec2153 Mon Sep 17 00:00:00 2001 From: AurelienBesnier <46033096+AurelienBesnier@users.noreply.github.com> Date: Fri, 12 Dec 2025 16:27:24 +0100 Subject: [PATCH 1/4] Add additional channels for doc environment --- doc/environment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/environment.yml b/doc/environment.yml index 4971e98..f3ce0c9 100644 --- a/doc/environment.yml +++ b/doc/environment.yml @@ -2,6 +2,8 @@ name: adel channels: - conda-forge - openalea3 + - openalea3/label/dev + - openalea3/label/rc dependencies: - numpy - scipy @@ -20,4 +22,4 @@ dependencies: - sphinx-copybutton - pip - pip: - - -e .. \ No newline at end of file + - -e .. From ee4826d174a2186e3a797442e4284d70a0c22cec Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Mon, 15 Dec 2025 10:11:15 +0100 Subject: [PATCH 2/4] Update environment.yml --- doc/environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/environment.yml b/doc/environment.yml index f3ce0c9..b0ce1f9 100644 --- a/doc/environment.yml +++ b/doc/environment.yml @@ -1,9 +1,9 @@ name: adel channels: - - conda-forge - - openalea3 - openalea3/label/dev - openalea3/label/rc + - openalea3 + - conda-forge dependencies: - numpy - scipy From 70f539ef32e5104fabfa4d7d4a55c23e0a119835 Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Mon, 15 Dec 2025 10:51:21 +0100 Subject: [PATCH 3/4] refactor conda env files --- .readthedocs.yml | 2 +- conda/environment.yml | 8 +++++--- conda/meta.yaml | 1 - doc/environment.yml | 25 ------------------------- 4 files changed, 6 insertions(+), 30 deletions(-) delete mode 100644 doc/environment.yml diff --git a/.readthedocs.yml b/.readthedocs.yml index 134b6ac..1ef0607 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,7 +6,7 @@ build: python: "mambaforge-22.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 714bee1..4bc6ee7 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -7,12 +7,14 @@ channels: dependencies: # list here manually conda-only deps (listed in [tool.conda.environment] section of pyproject) - python - - pip + - pandoc - openalea.mtg - openalea.plantgl - openalea.caribu - openalea.astk - - rpy2 + - matplotlib-base + - openalea.widgets + - pip # let pip install the rest using pyproject.toml (if you are okay with conda/pip mix) - pip: - - -e .."[doc, test]" + - -e ..[doc, test] diff --git a/conda/meta.yaml b/conda/meta.yaml index 756c30e..9914618 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -18,7 +18,6 @@ source: build: noarch: python - preserve_egg_dir: True number: 0 script: {{PYTHON}} -m pip install --no-deps --no-build-isolation . -vv diff --git a/doc/environment.yml b/doc/environment.yml deleted file mode 100644 index b0ce1f9..0000000 --- a/doc/environment.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: adel -channels: - - openalea3/label/dev - - openalea3/label/rc - - openalea3 - - conda-forge -dependencies: - - numpy - - scipy - - matplotlib - - pandas - - rpy2 - - openalea.mtg - - openalea.widgets - - openalea.plantgl - - openalea.core >= 2.4 - - pydata-sphinx-theme - - sphinx-favicon - - nbsphinx - - nbsphinx-link - - myst-parser - - sphinx-copybutton - - pip - - pip: - - -e .. From fedba82268b3a8f19f33ba5ffcacb74d9aa996ee Mon Sep 17 00:00:00 2001 From: Christian Fournier Date: Mon, 15 Dec 2025 10:58:07 +0100 Subject: [PATCH 4/4] update readme and pyproject --- README.md | 49 ++++++++----------------------------- pyproject.toml | 45 +++++++++++++++++++++------------- src/alinea/adel/__init__.py | 1 + 3 files changed, 39 insertions(+), 56 deletions(-) create mode 100644 src/alinea/adel/__init__.py diff --git a/README.md b/README.md index 7d82515..7bc3217 100644 --- a/README.md +++ b/README.md @@ -35,48 +35,19 @@ gramineaous plants(Fournier & Pradal, unpublished), the Adel-Maize together with the wheat parameterization model of Abichou et al. (2013) and the plastic leaf model of Fournier & Pradal (2012) -## Requirements -- OpenAlea.mtg -- OpenAlea.plantgl -- OpenAlea.caribu -- Openalea.astk -- NumPy -- Scipy -- MatplotLib-base -- Pandas -- Rpy2 +## Installation -## Installation with mamba +### Users -Create an environment: +```bash +mamba env create -n adel -c openalea3 -c conda-forge openalea.adel +``` -> mamba create -n adel -c conda-forge -c openalea3 openalea.adel -y +### Developers -Activate the environment: - -> mamba activate adel - -Locate RHOME: - -> R RHOME - -Set R_HOME to the R HOME dir returned above: - -> mamba env config vars set R_HOME=r_home_dir_returned_by_rhome - -## Installation from source - -Create an environment - -> mamba env create -n adel -f conda/environment.yml - -Set R_HOME (see above) - -Install adel - -``` console -git clone https://github.com/openalea/adel.git -cd adel -pip install -e . +```bash +git clone 'https://github.com/openalea/adel.git' +cd caribu +mamba env create -n adel_dev -f ./conda/environment.yml ``` diff --git a/pyproject.toml b/pyproject.toml index 5c97c20..2fd7814 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,19 @@ requires = ["setuptools", "setuptools_scm"] build-backend = "setuptools.build_meta" +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.dynamic] +readme = {file = ["README.md"]} + +# enable dynamic version based on git tags +[tool.setuptools_scm] +# Configure to align with the one of meta.yaml +fallback_version = "0.0.0.dev0" +version_scheme = "guess-next-dev" +local_scheme = "no-local-version" + [project] name = "openalea.adel" authors = [ @@ -10,21 +23,17 @@ authors = [ { name = "Bruno Andrieu" }, ] description = "3D plant simulation of graminae crops" -license = {file = "LICENSE.txt"} -requires-python = ">=3.8" +license = "CECILL-C" +license-files = ["LICEN[CS]E*"] +requires-python = ">=3.10" +keywords = ["openalea", "FSPM", "cereals"] classifiers = [ "Intended Audience :: Science/Research", "Intended Audience :: Developers", - "License :: OSI Approved :: CeCILL-C License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering", ] dynamic = ["readme","version"] @@ -38,6 +47,16 @@ dependencies = [ [project.optional-dependencies] test = ["pytest"] +doc = [ + "pydata-sphinx-theme", + "myst-parser", + "sphinx-favicon", + "nbsphinx", + "nbsphinx-link", + "ipykernel", + "sphinx-copybutton", + "ipython_genutils", +] notebook = ["jupyter"] [project.urls] @@ -60,18 +79,10 @@ dependencies = [ "openalea.plantgl", "openalea.caribu", "openalea.astk", + "openalea.core", "matplotlib-base" ] -[tool.setuptools.dynamic] -readme = {file = ["README.md"]} -[tool.setuptools.packages.find] -where = ["src"] -include = ["openalea.*"] [tool.setuptools.package-data] "*" = ['*.RData', '*.R', '*.8', '*.h', '*.str','*.txt', '*.l', '*.map', '*.csv', '*.json', '*.png'] - -# enable dynamic versioning based on git tags -[tool.setuptools_scm] -# can be empty if no extra settings are needed, presence enables setuptools-scm diff --git a/src/alinea/adel/__init__.py b/src/alinea/adel/__init__.py new file mode 100644 index 0000000..f060391 --- /dev/null +++ b/src/alinea/adel/__init__.py @@ -0,0 +1 @@ +raise ImportError("alinea.adel has been deprecated; Use openalea.adel instead")