diff --git a/Dockerfile b/Dockerfile index 1c2c33f..86a646b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,8 @@ RUN apt-get update && apt-get install -y xorg git USER $NB_USER RUN conda install mamba -y -n base -c conda-forge && \ - mamba install -y -c santandermetgroup -c conda-forge -c r -c defaults \ - climate4r=1.5.0 \ + mamba install -y -c conda-forge -c r -c defaults -c santandermetgroup \ + r-climate4r=2.5.3 \ xarray pandas matplotlib cartopy netcdf4 cftime dask iris \ jupyter_contrib_nbextensions jupyter_nbextensions_configurator r-irkernel && \ chown -R jovyan:users /home/jovyan && \ diff --git a/conda/README.md b/conda/README.md index c7b0ddd..4efa491 100644 --- a/conda/README.md +++ b/conda/README.md @@ -1,28 +1,27 @@ -# conda recipe for climate4R +# Conda recipe for climate4R metapackage + +## Installing climate4R conda metapackage ```bash -conda install -c santandermetgroup -c conda-forge -c r -c defaults r-climate4r +conda install -c conda-forge -c r -c defaults -c santandermetgroup r-climate4r ``` *** _Note for jupyter notebook users_: From a dedicated environment, to run notebooks using climate4R include it as: -``` -conda install -c santandermetgroup -c conda-forge -c r -c defaults r-climate4r jupyter r-irkernel +```bash +conda install -c conda-forge -c r -c defaults -c santandermetgroup r-climate4r jupyter r-irkernel ``` in order to include jupyter notebooks in your newly created environment - *** -## Build (only for the admin) - -Use mambabuild, see below. +## Building climate4R conda metapackage ```bash -conda build -c conda-forge -c r -c defaults . +conda build -c conda-forge -c r -c defaults -c santandermetgroup . anaconda login -anaconda upload -u SantanderMetGroup TAR_BZ2 +anaconda upload -u SantanderMetGroup PATH_TO_TAR_BZ2 ``` ## ToDo, explore mamba and boa @@ -39,5 +38,5 @@ Build: ```bash rm -rf ${HOME}/miniconda3/conda-bld/src_cache -conda mambabuild -c santandermetgroup -c conda-forge -c r -c defaults . &>log & +conda mambabuild -c conda-forge -c r -c defaults -c santandermetgroup . &>log & ``` diff --git a/conda/build.sh b/conda/build.sh deleted file mode 100644 index ac0fd82..0000000 --- a/conda/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -e - -#Rscript install.R diff --git a/conda/install.R b/conda/install.R deleted file mode 100644 index 9dc229b..0000000 --- a/conda/install.R +++ /dev/null @@ -1,28 +0,0 @@ -package.version <- list( - climate4R.UDG = "0.2.3", - loadeR.java = "1.1.1", - loadeR = "1.7.1", - loadeR.ECOMS = "1.4.6", - transformeR = "2.1.2", - downscaleR = "3.3.3", - downscaleR.keras = "1.0.0", - visualizeR = "1.6.1", - convertR = "0.2.0", - geoprocessoR = "0.2.0", - climate4R.climdex = "0.2.2", - climate4R.indices = "0.2.0", - loadeR.2nc = "0.1.2", - fireDanger = "1.1.0", - VALUE = "2.2.1", - climate4R.value = "0.0.2", - mopa = "1.0.2", - drought4R = "0.2.0", - climate4R.datasets = "0.0.1" -) -for (pkg in names(package.version)) { - tarball = sprintf("https://github.com/SantanderMetGroup/%s/archive/refs/tags/v%s.tar.gz", pkg, package.version[[pkg]]) - if(!require(pkg, character.only = TRUE)){ # to avoid download and install already installed packages - install.packages(tarball, repos = NULL) - require(pkg, character.only = TRUE) - } -} diff --git a/conda/meta.yaml b/conda/meta.yaml index 447283a..a41bee8 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,58 +1,44 @@ package: - name: climate4r - version: 1.5.2 - -source: - url: file://{{ RECIPE_DIR }}/install.R - + name: r-climate4r + version: 2.5.3 +build: + string: r36_1 + noarch: generic requirements: - build: - - iris - - - r-base>=3.6 - - r-climate4r.udg - - r-loader.java - - r-loader - - r-loader.ecoms - - r-transformer - - r-downscaler - - r-downscaler.keras - - r-visualizer - - r-convertr - - r-geoprocessor - - r-climate4r.climdex - - r-climate4r.indices - - r-loader.2nc - - r-firedanger - - r-value - - r-climate4r.value - - r-mopa - - r-drought4r - - r-climate4r.datasets - + build: [] run: - - iris - - - r-base>=3.6 - - r-climate4r.udg - - r-loader.java - - r-loader - - r-loader.ecoms - - r-transformer - - r-downscaler - - r-downscaler.keras - - r-visualizer - - r-convertr - - r-geoprocessor - - r-climate4r.climdex - - r-climate4r.indices - - r-loader.2nc - - r-firedanger - - r-value - - r-climate4r.value - - r-mopa - - r-drought4r - - r-climate4r.datasets + #r dependencies + - r-base >=3.6.3,<3.7 + - r-climate4r.udg ==0.2.3 + - r-loader.java ==1.1.1 + - r-loader ==1.7.1 + - r-loader.ecoms ==1.4.6 + - r-transformer ==2.1.3 + - r-downscaler ==3.3.3 + - r-downscaler.keras ==1.0.0 + - r-visualizer ==1.6.1 + - r-convertr ==0.2.0 + - r-geoprocessor ==0.2.0 + - r-climate4r.climdex ==0.2.2 + - r-climate4r.indices ==0.2.0 + - r-loader.2nc ==0.1.2 + - r-firedanger ==1.1.0 + - r-value ==2.2.1 + - r-climate4r.value ==0.0.2 + - r-mopa ==1.0.0 + - r-drought4r ==0.2.0 + - r-climate4r.datasets ==0.0.1 + #python dependencies + - python >=3.7,<3.8 + - iris ==3.0.4 about: - home: https://github.com/SantanderMetGroup/climate4R + home: http://www.meteo.unican.es/climate4r + license: GPL-3.0-or-later + summary: Climate4R Framework + license_family: GPL3 + +extra: + recipe-maintainers: + - conda-forge/r + - cofinoa diff --git a/docker/Dockerfile b/docker/Dockerfile index 5ef806e..21c9f29 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,8 +9,8 @@ RUN apt-get update && apt-get install -y xorg git && \ USER $NB_USER RUN conda install mamba -y -n base -c conda-forge && \ - mamba install -y -c santandermetgroup -c conda-forge -c r -c defaults \ - climate4r=1.5.0 \ + mamba install -y -c conda-forge -c r -c defaults -c santandermetgroup \ + r-climate4r=2.5.3 \ xarray pandas matplotlib cartopy netcdf4 cftime dask iris \ jupyter_contrib_nbextensions jupyter_nbextensions_configurator r-irkernel && \ chown -R jovyan:users /home/jovyan && \