{% set name = "parsl" %}
{% set version = "2023.12.4" %}

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

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

build:
  number: 0
  noarch: python

requirements:
  host:
    - python >=3.8
    - pip
  run:
    - python >=3.8

outputs:
  - name: {{ name }}
    script: install_parsl.sh
    build:
      noarch: python
      entry_points:
        - parsl-globus-auth=parsl.data_provider.globus:cli_run
        - parsl-visualize=parsl.monitoring.visualization.app:cli_run
        - parsl-perf=parsl.benchmark.perf:cli_run

    requirements:
      host:
        - python >=3.8
        - pip
      run:
        - python >=3.8
        # requirements.txt
        - pyzmq >=17.1.2
        - typeguard >=2.10,<3
        - typing-extensions
        - six
        - globus-sdk
        - dill
        - tblib
        - requests
        - paramiko
        - psutil >=5.5.1
        - setproctitle

    test:
      requires:
        - pip
      imports:
        - parsl
      commands:
        - pip check

  - name: {{ name }}-with-monitoring
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - sqlalchemy >=1.4,<2

    test:
      imports:
        - parsl
        - parsl.monitoring
      commands:
        - pip check
      requires:
        - pip

  - name: {{ name }}-with-visualization
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - {{ name }}-with-monitoring
        - pydot
        - networkx >=2.5,<2.6
        - flask >=1.0.2
        - flask-sqlalchemy
        - pandas <2
        - plotly
        # 3.0.1 has a build without proper constraints on setuptools
        - python-daemon !=3.0.1

    test:
      imports:
        - parsl
        - parsl.monitoring
      commands:
        - pip check
        - parsl-visualize --help
      requires:
        - pip

  - name: {{ name }}-with-aws
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - boto3
    test:
      imports:
        - parsl
      commands:
        - pip check
      requires:
        - pip

  - name: {{ name }}-with-kubernetes
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - kubernetes
    test:
      imports:
        - parsl
      commands:
        - pip check
      requires:
        - pip

# oauth-ssh not on conda-forge
#  - name: {{ name }}-with-oauth_ssh
#    build:
#      noarch: python
#    requirements:
#      host:
#        - python >=3.8
#      run:
#        - python >=3.8
#        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
#        - oauth-ssh >=0.9
#    test:
#      imports:
#        - parsl
#      commands:
#        - pip check
#      requires:
#        - pip

  - name: {{ name }}-with-google_cloud
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - google-auth
        - google-api-python-client
    test:
      imports:
        - parsl
      commands:
        - pip check
      requires:
        - pip

  - name: {{ name }}-with-gssapi
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - python-gssapi
    test:
      imports:
        - parsl
      commands:
        - pip check
      requires:
        - pip

# azure 3.0.0 was not built for linux
#  - name: {{ name }}-with-azure
#    build:
#      noarch: python
#    requirements:
#      host:
#        - python >=3.8
#      run:
#        - python >=3.8
#        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
#        - azure <=4
#        - msrestazure
#    test:
#      imports:
#        - parsl
#      commands:
#        - pip check
#      requires:
#        - pip

  - name: {{ name }}-with-workqueue
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - ndcctools
        # there is no work_queue pypi or conda-forge package
        # - work_queue
    test:
      imports:
        - parsl
      commands:
        # temporarily disable pip check because conda 23.10.0 (a dependency of ndcctools) 
        # is failing pip check becaue of https://github.com/conda-forge/conda-feedstock/pull/225
        # - pip check
      requires:
        # - pip

  - name: {{ name }}-with-flux
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - pyyaml
        - cffi
        - jsonschema
    test:
      imports:
        - parsl
      commands:
        - pip check
      requires:
        - pip

  - name: {{ name }}-with-proxystore
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - proxystore
    test:
      imports:
        - parsl
      commands:
        - pip check
      requires:
        - pip

  - name: {{ name }}-with-radical-pilot
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - python >=3.8
        - {{ pin_subpackage(name, max_pin='x.x.x.x.x.x') }}
        - radical.pilot
    test:
      imports:
        - parsl
      commands:
        - pip check
      requires:
        - pip

about:
  home: https://github.com/Parsl/parsl
  license: Apache-2.0
  license_file: LICENSE
  summary: Simple parallel workflows system for Python

  description: |
    Parsl is a Python library for programming and executing 
    data-oriented workflows (dataflows) in parallel.
  doc_url: https://parsl.readthedocs.io/
  dev_url: https://github.com/Parsl/parsl

extra:
  recipe-maintainers:
    - ZhuozhaoLi
    - yadudoc
    - xylar
