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

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: 7f91e4ba322786e9512158783800b6eafb002200a7b3e9eadc13d7ff4d6e0634
  patches:
    - setup-make-folder.patch

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]
    - m2-patch  # [win]
    - patch     # [not win]
  host:
    - python
    - cmdstan 2.31.0
    - cmdstanpy 1.1.0
    - libboost 1.73
    - numpy {{ numpy }}
    - pip
    - setuptools
    - tbb-devel 2021.8.0
    - wheel
  run:
    - python
    - {{ pin_compatible('numpy') }}
    - cmdstan
    - cmdstanpy >=1.0.4
    - convertdate >=2.1.2
    - holidays >=0.25.0
    - importlib_resources
    - LunarCalendar >=0.0.9
    - matplotlib-base >=2.0.0
    - pandas >=1.0.4
    - python-dateutil >=2.8.0
    - tqdm >=4.36.1

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
