{% set version = "1.0.2" %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/leidenAlg_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/leidenAlg/leidenAlg_{{ version }}.tar.gz
  sha256: 4e5bac1b5a5172dc02d4935f2ba4814a78d56c51b3741393a65b1a2dbed3c212

build:
  merge_build_host: true  # [win]
  number: 0
  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: pbapply, testthat (>= 3.1.0)
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-matrix
    - r-matrix.utils
    - r-rcpp >=1.0.5
    - r-rcpparmadillo
    - r-rcppeigen
    - r-igraph
    - r-sccore

  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-matrix.utils
    - r-rcpp >=1.0.5
    - r-rcpparmadillo
    - r-rcppeigen
    - r-igraph
    - r-sccore

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

about:
  home: https://github.com/kharchenkolab/leidenAlg
  license: GPL-3.0-or-later
  summary: 'An R interface to the Leiden algorithm, an iterative community detection algorithm on networks. The algorithm is designed to converge to a partition in which all subsets of all communities are locally optimally assigned, yielding communities guaranteed to be connected. The implementation proves to be fast, scales
    well, and can be run on graphs of millions of nodes (as long as they can fit in memory). The original implementation was constructed as a python interface "leidenalg" found here: <https://github.com/vtraag/leidenalg>. The algorithm was originally described in Traag, V.A., Waltman, L. & van Eck, N.J. "From Louvain to
    Leiden: guaranteeing well-connected communities". Sci Rep 9, 5233 (2019) <doi:10.1038/s41598-019-41695-z>.'
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - conda-forge/r
    - raivivek

# The original CRAN metadata for this package was:

# Package: leidenAlg
# Type: Package
# Title: Implements the Leiden Algorithm via an R Interface
# Version: 1.0.1
# Authors@R: c(person("Peter", "Kharchenko", email = "Peter_Kharchenko@hms.harvard.edu", role = c("aut")), person("Viktor", "Petukhov", email = "viktor.s.petukhov@ya.ru", role = c("aut")), person("V.A.", "Traag", email = "v.a.traag@cwts.leidenuniv.nl", role = c("ctb")), person("Gabor", "Csardi", email = "sardi.gabor@gmail.com", role = c("ctb")), person("Tamas", "Nepusz", email = "ntamas@gmail.com", role = c("ctb")), person("Minh Van", "Nguyen", email = "nguyenminh2@gmail.com", role = c("ctb")), person("Evan", "Biederstedt", email = "evan.biederstedt@gmail.com", role=c("cre", "aut")))
# Description: An R interface to the Leiden algorithm, an iterative community detection algorithm on networks. The algorithm is designed to converge to a partition in which all subsets of all communities are locally optimally assigned, yielding communities guaranteed to be connected. The implementation proves to be fast, scales well, and can be run on graphs of millions of nodes (as long as they can fit in memory). The original implementation was constructed as a python interface "leidenalg" found here: <https://github.com/vtraag/leidenalg>. The algorithm was originally described in Traag, V.A., Waltman, L. & van Eck, N.J. "From Louvain to Leiden: guaranteeing well-connected communities". Sci Rep 9, 5233 (2019) <doi:10.1038/s41598-019-41695-z>.
# License: GPL-3
# Copyright: See the file COPYRIGHTS for various leidenAlg copyright details
# Encoding: UTF-8
# LazyData: true
# Depends: R (>= 3.5.0), Matrix, igraph
# Imports: graphics, grDevices, Matrix.utils, parallel, Rcpp (>= 1.0.5), sccore, stats
# Suggests: pbapply, testthat (>= 3.1.0)
# LinkingTo: Rcpp, RcppArmadillo, RcppEigen
# SystemRequirements: GNU make
# RoxygenNote: 7.1.2
# URL: https://github.com/kharchenkolab/leidenAlg
# BugReports: https://github.com/kharchenkolab/leidenAlg/issues
# NeedsCompilation: yes
# Author: Peter Kharchenko [aut], Viktor Petukhov [aut], V.A. Traag [ctb], Gabor Csardi [ctb], Tamas Nepusz [ctb], Minh Van Nguyen [ctb], Evan Biederstedt [cre, aut]
# Maintainer: Evan Biederstedt <evan.biederstedt@gmail.com>
# Packaged: 2021-12-04 03:58:11 UTC; evanbiederstedt
# Repository: CRAN
# Date/Publication: 2021-12-04 05:50:05 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
