# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

[metadata]
name = cylc-flow
version = attr: cylc.flow.__version__
author = Hilary Oliver
url=https://cylc.org/
description = A workflow engine for cycling systems
long_description=file: README.md
long_description_content_type=text/markdown
project_urls =
    Documentation = https://cylc.github.io/cylc-doc/stable/html/index.html
    Source = https://github.com/cylc/cylc-flow
    Tracker = https://github.com/cylc/cylc-flow/issues
keywords =
    cycling-workflows
    hpc
    job-scheduler
    metascheduler
    workflow-automation
    workflow-engine
    workflow-management
    scheduling
license = GPL
license_file = COPYING
platforms = any
classifiers =
    Environment :: Console
    Environment :: Web Environment
    Intended Audience :: Developers
    Intended Audience :: System Administrators
    Intended Audience :: Science/Research
    License :: OSI Approved :: GNU General Public License v3 (GPLv3)
    Operating System :: POSIX :: Linux
    Programming Language :: Python
    Programming Language :: Python :: 3.12
    Programming Language :: Python :: 3.13
    Programming Language :: Python :: 3 :: Only
    Programming Language :: Python :: Implementation :: CPython
    Topic :: Scientific/Engineering :: Atmospheric Science

[options]
packages = find_namespace:
include_package_data = True
python_requires = >=3.12
install_requires =
    ansimarkup>=1.0.0
    colorama>=0.4,<1
    graphql-core>=3.2,<3.3
    graphene>=3.4.0,<3.5
    # Note: can't pin jinja2 any higher than this until we give up on Cylc 7 back-compat
    jinja2==3.0.*
    metomi-isodatetime>=1!3.0.0,<1!3.2.0
    # Constrain protobuf version for compatible Scheduler-UIS comms across hosts
    packaging
    protobuf>=5,<8
    psutil>=5.6.0
    pyzmq>=22
    # NOTE: exclude two urwid versions that were not compatible with Tui
    urwid>=2.2,!=2.6.2,!=2.6.3,<4

[options.packages.find]
include = cylc*

[options.extras_require]
graph =
    pillow
main_loop-log_data_store =
    pympler
    matplotlib
main_loop-log_main_loop =
    matplotlib
main_loop-log_memory =
    pympler
    matplotlib
main_loop-log_db =
    sqlparse
report-timings =
    pandas==1.*
    matplotlib
tests =
    aiosmtpd
    async_generator
    bandit>=1.7.0
    coverage>=7.9.0
    flake8-broken-line>=0.3.0
    flake8-bugbear>=21.0.0
    flake8-builtins>=1.5.0
    flake8-comprehensions>=3.5.0
    flake8-debugger>=4.0.0
    flake8-implicit-str-concat>=0.4
    flake8-mutable>=1.2.0
    flake8-simplify>=0.14.0; python_version<"3.14"
    flake8-type-checking
    flake8>=3.0.0
    mypy>=0.910
    # https://github.com/pytest-dev/pytest-asyncio/issues/706
    pytest-asyncio>=0.21.2,!=0.23.*
    pytest-cov>=2.8.0
    pytest-xdist>=2
    pytest-mock>=3.7
    pytest>=6
    testfixtures>=6.11.0
    towncrier>=24.7.0
    # Type annotation stubs
    # http://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html
    types-Jinja2>=0.1.3
    types-protobuf>=0.1.10,!=5.29.1.20250402
tutorials =
    h5py
    requests
all =
    %(graph)s
    %(main_loop-log_data_store)s
    %(main_loop-log_db)s
    %(main_loop-log_main_loop)s
    %(main_loop-log_memory)s
    %(tests)s
    %(tutorials)s

[options.entry_points]
# top level shell commands
console_scripts =
    clyc = cylc.flow.scripts.cylc:main
    cylc = cylc.flow.scripts.cylc:main
# cylc subcommands
cylc.command =
    broadcast = cylc.flow.scripts.broadcast:main
    cat-log = cylc.flow.scripts.cat_log:main
    check-versions = cylc.flow.scripts.check_versions:main
    clean = cylc.flow.scripts.clean:main
    client = cylc.flow.scripts.client:main
    completion-server = cylc.flow.scripts.completion_server:main
    config = cylc.flow.scripts.config:main
    cycle-point = cylc.flow.scripts.cycle_point:main
    diff = cylc.flow.scripts.diff:main
    dump = cylc.flow.scripts.dump:main
    ext-trigger = cylc.flow.scripts.ext_trigger:main
    get-resources = cylc.flow.scripts.get_resources:main
    function-run = cylc.flow.scripts.function_run:main
    get-workflow-contact = cylc.flow.scripts.get_workflow_contact:main
    get-workflow-version = cylc.flow.scripts.get_workflow_version:main
    graph = cylc.flow.scripts.graph:main
    hold = cylc.flow.scripts.hold:main
    install = cylc.flow.scripts.install:main
    jobs-kill = cylc.flow.scripts.jobs_kill:main
    jobs-poll = cylc.flow.scripts.jobs_poll:main
    jobs-submit = cylc.flow.scripts.jobs_submit:main
    kill = cylc.flow.scripts.kill:main
    lint = cylc.flow.scripts.lint:main
    list = cylc.flow.scripts.list:main
    message = cylc.flow.scripts.message:main
    pause = cylc.flow.scripts.pause:main
    ping = cylc.flow.scripts.ping:main
    play = cylc.flow.scripts.play:main
    poll = cylc.flow.scripts.poll:main
    psutils = cylc.flow.scripts.psutil:main
    reinstall = cylc.flow.scripts.reinstall:main
    release = cylc.flow.scripts.release:main
    reload = cylc.flow.scripts.reload:main
    remote-init = cylc.flow.scripts.remote_init:main
    remote-tidy = cylc.flow.scripts.remote_tidy:main
    remove = cylc.flow.scripts.remove:main
    report-timings = cylc.flow.scripts.report_timings:main [report-timings]
    scan = cylc.flow.scripts.scan:cli
    show = cylc.flow.scripts.show:main
    set = cylc.flow.scripts.set:main
    stop = cylc.flow.scripts.stop:main
    subscribe = cylc.flow.scripts.subscribe:main
    verbosity = cylc.flow.scripts.verbosity:main
    workflow-state = cylc.flow.scripts.workflow_state:main
    tui = cylc.flow.scripts.tui:main
    trigger = cylc.flow.scripts.trigger:main
    validate = cylc.flow.scripts.validate:main
    view = cylc.flow.scripts.view:main
    vip = cylc.flow.scripts.validate_install_play:main
    vr = cylc.flow.scripts.validate_reinstall:main
# async functions to run within the scheduler main loop
cylc.main_loop =
    health_check = cylc.flow.main_loop.health_check
    auto_restart = cylc.flow.main_loop.auto_restart
    log_data_store = cylc.flow.main_loop.log_data_store [main_loop-log_data_store]
    log_db = cylc.flow.main_loop.log_db [main_loop-log_db]
    log_main_loop = cylc.flow.main_loop.log_main_loop [main_loop-log_main_loop]
    log_memory = cylc.flow.main_loop.log_memory [main_loop-log_memory]
    reset_bad_hosts = cylc.flow.main_loop.reset_bad_hosts
# NOTE: all entry points should be listed here even if Cylc Flow does not
# provide any implementations, to make entry point scraping easier
cylc.pre_configure =
cylc.post_install =
    log_vc_info = cylc.flow.install_plugins.log_vc_info:main
# NOTE: Built-in xtrigger modules
#   - must contain a function (the xtrigger) with the same name as the module
#   - and may contain a "validate" function to check arguments
cylc.xtriggers =
    echo = cylc.flow.xtriggers.echo
    wall_clock = cylc.flow.xtriggers.wall_clock
    workflow_state = cylc.flow.xtriggers.workflow_state
    suite_state = cylc.flow.xtriggers.suite_state
    xrandom = cylc.flow.xtriggers.xrandom

[bdist_rpm]
requires =
    python3-colorama
    python-isodatetime
    python3-jinja2
    python3-MarkupSafe
    python3-zmq
