{% set name = "datashader" %}
{% set version = "0.14.1" %}

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

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

build:
  number: 1
  # Currently it's not available on s390x:
  # There are missing datashape, numba, fastparquet, netcdf4.
  skip: True  # [py<37 or s390x]
  script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
  entry_points:
    - datashader = datashader.__main__:main

requirements:
  host:
    - python
    - pip
    - param
    - pyct
    - setuptools
    - wheel
  run:
    - python
    # It seems datashader 0.14.1 isn't compatible with bokeh >=3.0.0
    - bokeh <3.0.0
    - colorcet >=0.9.0
    - dask >=0.18.0
    - datashape >=0.5.1
    - numba >=0.51
    # 2022/11/14: NumPy has a hard upper limit.
    # NumPy 1.22.0, 1.22.1, 1.22.2 are all broken for ufuncs
    # xref: https://github.com/numba/numba/issues/7756
    # NumPy >=1.23 breaks with CUDA test: test_reinterpret_array_type
    # xref: https://github.com/numba/numba/issues/8529
    - numpy >=1.18,!=1.22.0,!=1.22.1,!=1.22.2,<1.23
    - pandas >=0.24.1
    - param >=1.6.1
    - pillow >=3.1.1
    - pyct >=0.4.5
    - scipy
    - xarray >=0.9.6

test:
  imports:
    - datashader
  requires:
    - pip
    - fastparquet >=0.1.6
    - flake8
    - nbsmoke >0.5.0
    - pytest >=3.9.3
    - pytest-benchmark >=3.0.0
    - holoviews >=1.10.0
    - netcdf4
  commands:
    - pip check || true    # [not win]
    - pip check || exit 0  # [win]
    - datashader --help
    - datashader copy-examples --path=. --force
    # just run one notebook for now; increase in the future if notebooks can be run quickly with test/tiny data
    - pytest --nbsmoke-run -k ".ipynb" getting_started/2_Pipeline.ipynb

about:
  home: https://datashader.org
  license: BSD-3-Clause
  license_family: BSD
  license_file: LICENSE.txt
  summary: Data visualization toolchain based on aggregating into a grid
  description: |
    Datashader is a data rasterization pipeline for automating the process of
    creating meaningful representations of large amounts of data.
  doc_url: https://datashader.org
  dev_url: https://github.com/holoviz/datashader

extra:
  recipe-maintainers:
    - jbednar
    - ocefpaf
    - philippjfr
    - jsignell
