{% set name = "imbalanced-learn" %}
{% set version = "0.11.0" %}
{% set sha256 = "7582ae8858e6db0b92fef97dd08660a18297ee128d78c2abdc006b8bd86b8fdc" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 1
  script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation . -vv
  skip: True  # [py<38]

requirements:
  host:
    - python
    - setuptools
    - pip
    - wheel
  run:
    - python
    - numpy >=1.17.3
    - scipy >=1.5.0
    - scikit-learn >=1.0.2
    - joblib >=1.1.1
  run_constrained:
    - threadpoolctl >=2.0.0
    # intel-openmp 2023.1 and llvm-openmp 14.0.6 appear not be compatible
    # leading to segfault in test_pairwise_distances_reduction.py::test_sqeuclidean_row_norms[42-float64-8-5-100]
    - intel-openmp <2023.1.0  # [osx and x86_64]
    - pandas >=1.0.5
    - tensorflow >=2.4.3
    - keras >=2.4.3

test:
  requires:
    - pip
    - pytest >=5.0.1
    - pytest-timeout
    - pytest-xdist
  imports:
    - imblearn
  commands:
    - pip check
    - pytest -n auto --timeout 300 --verbose --pyargs imblearn

about:
  home: https://github.com/scikit-learn-contrib/imbalanced-learn
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: Python module to balance data set using under- and over-sampling
  description: |
    imbalanced-learn is a python package offering a number of re-sampling
    techniques commonly used in datasets showing strong between-class imbalance.
    It is compatible with scikit-learn and is part of scikit-learn-contrib
    projects.
  doc_url: https://imbalanced-learn.org/stable/
  dev_url: https://github.com/scikit-learn-contrib/imbalanced-learn

extra:
  recipe-maintainers:
    - glemaitre
