From 6b080efb2a7a330050ab507c1301894b7fa024f4 Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Sat, 19 Oct 2024 11:11:47 +0200 Subject: [PATCH 1/2] Add r-twdtw --- recipes/r-twdtw/bld.bat | 2 ++ recipes/r-twdtw/build.sh | 3 ++ recipes/r-twdtw/meta.yaml | 74 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 recipes/r-twdtw/bld.bat create mode 100644 recipes/r-twdtw/build.sh create mode 100644 recipes/r-twdtw/meta.yaml diff --git a/recipes/r-twdtw/bld.bat b/recipes/r-twdtw/bld.bat new file mode 100644 index 0000000000000..01bc5eadf1152 --- /dev/null +++ b/recipes/r-twdtw/bld.bat @@ -0,0 +1,2 @@ +"%R%" CMD INSTALL --build . %R_ARGS% +IF %ERRORLEVEL% NEQ 0 exit /B 1 diff --git a/recipes/r-twdtw/build.sh b/recipes/r-twdtw/build.sh new file mode 100644 index 0000000000000..b8d2635525637 --- /dev/null +++ b/recipes/r-twdtw/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +export DISABLE_AUTOBREW=1 +${R} CMD INSTALL --build . ${R_ARGS} diff --git a/recipes/r-twdtw/meta.yaml b/recipes/r-twdtw/meta.yaml new file mode 100644 index 0000000000000..d51444c9beb78 --- /dev/null +++ b/recipes/r-twdtw/meta.yaml @@ -0,0 +1,74 @@ +{% set version = '1.0-1' %} +{% set posix = 'm2-' if win else '' %} +{% set native = 'm2w64-' if win else '' %} + +package: + name: r-twdtw + version: {{ version|replace("-", "_") }} + +source: + url: + - {{ cran_mirror }}/src/contrib/twdtw_{{ version }}.tar.gz + - {{ cran_mirror }}/src/contrib/Archive/twdtw/twdtw_{{ version }}.tar.gz + sha256: ced3131a1d66db08e242286eeac0b0a36e9e70fda92377010cbe17e7054920f1 + +build: + merge_build_host: True # [win] + number: 0 + rpaths: + - lib/R/lib/ + - lib/ + missing_dso_whitelist: + - '*/R.dll' # [win] + - '*/Rblas.dll' # [win] + - '*/Rlapack.dll' # [win] + +requirements: + build: + - {{ compiler('c') }} # [not win] + - {{ compiler('m2w64_c') }} # [win] + - {{ stdlib('c') }} # [not win] + - {{ stdlib('m2w64_c') }} # [win] + - {{ compiler('cxx') }} # [not win] + - {{ compiler('m2w64_cxx') }} # [win] + - {{ compiler('fortran') }} # [not win] + - {{ compiler('m2w64_fortran') }} # [win] + - {{ posix }}filesystem # [win] + - {{ posix }}make + - {{ posix }}sed # [win] + - {{ posix }}coreutils # [win] + - {{ posix }}zip # [win] + - cross-r-base {{ r_base }} # [build_platform != target_platform] + host: + - r-base + - r-rcpp + - r-proxy + run: + - r-base + - r-rcpp + - r-proxy + +test: + commands: + - $R -e "library('twdtw')" # [not win] + - "\"%R%\" -e \"library('twdtw')\"" # [win] + +about: + home: https://github.com/vwmaus/twdtw/ + license: GPL-3.0-or-later + summary: Implements Time-Weighted Dynamic Time Warping (TWDTW), a measure for quantifying time + series similarity. The TWDTW algorithm, described in Maus et al. (2016) + and Maus et al. (2019) , is applicable to multi-dimensional + time series of various resolutions. It is particularly suitable for comparing time + series with seasonality for environmental and ecological data analysis, covering + domains such as remote sensing imagery, climate data, hydrology, and animal movement. + The 'twdtw' package offers a user-friendly 'R' interface, efficient 'Fortran' routines + for TWDTW calculations, flexible time weighting definitions, as well as utilities + for time series preprocessing and visualization. + license_family: GPL3 + license_file: + - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3' + +extra: + recipe-maintainers: + - conda-forge/r From f98575b65e886a30d8819c0f1ba70b530fb8df0a Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Wed, 23 Oct 2024 21:16:14 +0200 Subject: [PATCH 2/2] Update recipes/r-twdtw/meta.yaml Co-authored-by: Mervin Fansler --- recipes/r-twdtw/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/r-twdtw/meta.yaml b/recipes/r-twdtw/meta.yaml index d51444c9beb78..cc2bfc6bfd089 100644 --- a/recipes/r-twdtw/meta.yaml +++ b/recipes/r-twdtw/meta.yaml @@ -47,6 +47,8 @@ requirements: - r-base - r-rcpp - r-proxy + ## NB: win gcc-libgfortran dep likely needs manual removal in UCRT migration + - {{ native }}gcc-libgfortran # [win] test: commands: