{% set name = "imbalanced-learn" %}
{% set version = "0.13.0" %}

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name}}/{{ name.replace("-", "_") }}-{{ version }}.tar.gz
  sha256: d4a8d6372086982350d6de1c7e5b1ed5ece9e41bf93043b4d0e9ea1c422a6606

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

requirements:
  host:
    - python
    - setuptools
    - pip
    - wheel
    - setuptools_scm >=8
  run:
    - python
    - numpy >=1.24.3,<3
    - scipy >=1.10.1,<2
    - scikit-learn >=1.3.2,<2
    - sklearn-compat >=0.1,<1
    - joblib >=1.1.1,<2
    - threadpoolctl >=2.0.0,<4
  run_constrained:
    - pandas >=1.5.3,<3
    - tensorflow >=2.13.1,<3
    - keras >=3.0.5,<4

test:
  requires:
    - pip
    - pytest >=7.2.2,<9
    - pytest-timeout
    - packaging >=23.2,<25
    - pytest-xdist >=3.5.0,<4
  imports:
    - imblearn
  commands:
    - pip check
    # Skipping because README.rst and pyproject.toml deps are misaligned causing failures
    # test_estimators_compat_sklearn appears to have a bug introduced with latest release of scikit-learn RE: tags
    - pytest --pyargs imblearn -vv --timeout 300 -k "not (test_min_dependencies_readme or test_estimators_compatibility_sklearn)"

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
