diff --git a/.readthedocs.yml b/.readthedocs.yml index 134b6ace..1ef06073 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/README.md b/README.md index 7d825153..7bc32173 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/conda/environment.yml b/conda/environment.yml index 714bee12..4bc6ee77 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 756c30e1..9914618d 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 4971e98b..00000000 --- a/doc/environment.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: adel -channels: - - conda-forge - - openalea3 -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 .. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5c97c20f..2fd78146 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 00000000..f060391e --- /dev/null +++ b/src/alinea/adel/__init__.py @@ -0,0 +1 @@ +raise ImportError("alinea.adel has been deprecated; Use openalea.adel instead")