{% set name = "prophet" %}
{% set version = "1.1.3" %}

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

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

build:
  number: 0
  # LunarCalendar, which is a noarch package, requires ephem, unavailable on s390x
  # https://blog.quantinsti.com/installing-prophet-library-windows/
  skip: true  # [py<39 or (linux and s390x)]
  script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv
  binary_has_prefix_files:
    - {{ SP_DIR|replace("\\", "/") }}/stan_model/prophet_model.bin
  # To use our own cmdstan rather than download and build a different one:
  script_env:
    - PROPHET_REPACKAGE_CMDSTAN=false
    - BOOST="${LIBRARY_INC}"  # [win]

requirements:
  build:
    - {{ compiler('cxx') }}  # [not win]
    - {{ compiler('m2w64_cxx') }}  # [win]
    - m2w64-make                   # [win]
    - m2-coreutils                 # [win]
  host:
    - python
    - cmdstanpy 1.1.0
    - numpy {{ numpy }}
    - pip
    - setuptools
    - wheel
    - tbb-devel 2021.8.0
    - cmdstan 2.31.0
    - libboost 1.73
  run:
    - python
    - {{ pin_compatible('numpy') }}
    - cmdstanpy >=1.0.4
    - convertdate >=2.1.2
    - holidays >=0.14.2
    - LunarCalendar >=0.0.9
    - matplotlib-base >=2.0.0
    - pandas >=1.0.4
    - python-dateutil >=2.8.0
    - tqdm >=4.36.1
    - importlib_resources
    - cmdstan

test:
  requires:
    - pip
    - pytest
    - notebook
    - plotly

about:
  home: https://facebook.github.io/prophet/
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: Automatic Forecasting Procedure
  description: |
    Implements a procedure for forecasting time series data based on an
    additive model where non-linear trends are fit with yearly, weekly, and
    daily seasonality, plus holiday effects. It works best with time series
    that have strong seasonal effects and several seasons of historical data.
    Prophet is robust to missing data and shifts in the trend, and typically
    handles outliers well.
  doc_url: https://facebook.github.io/prophet/docs/quick_start.html
  dev_url: https://github.com/facebook/prophet

extra:
  recipe-maintainers:
    - bletham
    - maresb
  skip-lints:
    - missing_pip_check
