{% set version = '0.2-1' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-cvst
  version: {{ version|replace("-", "_") }}

source:
  fn: CVST_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/CVST_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/CVST/CVST_{{ version }}.tar.gz
  sha256: a27fd2bfa778fce9b9a68d2b9206c66af27b3c36a973dd45ce673886a267aa9f

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-matrix
    - r-kernlab

  run:
    - r-base
    - r-matrix
    - r-kernlab

test:
  commands:
    - $R -e "library('CVST')"  # [not win]
    - "\"%R%\" -e \"library('CVST')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=CVST
  license: GPL (>= 2.0)
  summary: This package implements the fast cross-validation via sequential testing (CVST) procedure.
    CVST is an improved cross-validation procedure which uses non-parametric testing
    coupled with sequential analysis to determine the best parameter set on linearly
    increasing subsets of the data. By eliminating underperforming candidates quickly
    and keeping promising candidates as long as possible, the method speeds up the computation
    while preserving the capability of a full cross-validation. Additionally to the
    CVST the package contains an implementation of the ordinary k-fold cross-validation
    with a flexible and powerful set of helper objects and methods to handle the overall
    model selection process. The implementations of the Cochran's Q test with permutations
    and the sequential testing framework of Wald are generic and can therefore also
    be used in other contexts.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
