{% set version = '0.2-2' %}
{% 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:
    - {{ cran_mirror }}/src/contrib/CVST_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/CVST/CVST_{{ version }}.tar.gz
  sha256: 854b8c983427ecf9f2f7798c4fd1c1d06762b5b0bcb1045502baadece6f78316

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - 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: The fast cross-validation via sequential testing (CVST) procedure 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 under-performing 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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
