content: [tool.poetry]
  name = "promptflow-devkit"
  version = "1.18.0"
  description = "Prompt flow devkit"
  include = [
    "promptflow/_sdk/_service/static/*",
    "promptflow/_sdk/_service/static/assets/*",
    "promptflow/_cli/data/**/*",
    "promptflow/_sdk/data/**/*",
  ]
  
  license = "MIT"
  
  authors = [
    "Microsoft Corporation <aml-pt-eng@microsoft.com>"
  ]
  
  repository = "https://github.com/microsoft/promptflow"
  homepage = "https://microsoft.github.io/promptflow/"
  
  readme = ["README.md"]
  keywords = ["devkit"]
  
  classifiers = [
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
  ]
  
  packages = [
    { include = "promptflow" }
  ]
  
  [tool.poetry.urls]
  "Bug Reports" = "https://github.com/microsoft/promptflow/issues"
  
  [tool.poetry.dependencies]
  python = ">=3.9,<3.9.7 || >3.9.7,<3.14"
  promptflow-core = "<2.0.0"
  httpx = ">=0.25.1"  # used to send http requests asynchronously
  sqlalchemy = ">=1.4.48,<3.0.0"  # sqlite requirements
  pandas = ">=1.5.3,<3.0.0"  # load data requirements
  python-dotenv = ">=1.0.0,<2.0.0"  # control plane sdk requirements, to load .env file
  keyring = ">=24.2.0,<25.0.0"  # control plane sdk requirements, to access system keyring service
  pydash = ">=6.0.0,<8.0.0"  # control plane sdk requirements, to support parameter overrides in schema.
  cryptography = ">=42.0.4"  # control plane sdk requirements to support connection encryption
  colorama = ">=0.4.6,<0.5.0"  # producing colored terminal text for testing chat flow
  tabulate = ">=0.9.0,<1.0.0"  # control plane sdk requirements, to print table in console
  filelock = ">=3.4.0,<4.0.0"  # control plane sdk requirements, to lock for multiprocessing
  marshmallow = ">=3.5,<4.0.0"
  gitpython = ">=3.1.24,<4.0.0"  # used git info to generate flow id
  strictyaml = ">=1.5.0,<2.0.0"  # used to identify exact location of validation error
  waitress = ">=3.0.0,<4.0.0"  # used to serve local service
  azure-monitor-opentelemetry-exporter = ">=1.0.0b21,<2.0.0"
  pyarrow = { version = ">=14.0.1,<15.0.0", optional = true }  # used to read parquet file with pandas.read_parquet
  pillow = ">=10.1.0,<11.1.0"  # used to generate icon data URI for package tool
  opentelemetry-exporter-otlp-proto-http = ">=1.22.0,<2.0.0"  # trace support
  flask-restx = ">=1.2.0,<2.0.0"  # PFS Swagger
  flask-cors = ">=6.0.0,<7.0.0"  # handle PFS CORS
  pyinstaller = { version = ">=5.13.2", optional = true}  # used to package the CLI tool
  streamlit = { version = ">=1.26.0", optional = true}
  streamlit-quill = { version = "<0.1.0", optional = true}
  bs4 = { version = "*", optional = true}
  argcomplete = ">=3.2.3" # for generating shell autocompletions
  pywin32 = {version = "*", markers = "sys_platform == 'win32'"}  # Support PFS detach mode in windows
  
  [tool.poetry.extras]
  executable = [
    "pyarrow",
    "pyinstaller",
    "streamlit",
    "streamlit-quill",
    "bs4",
  ]
  pyarrow = [
    "pyarrow",
  ]
  
  [tool.poetry.group.dev.dependencies]
  pre-commit = "*"
  import-linter = "*"
  promptflow-core = {path = "../promptflow-core", extras = ["azureml-serving"], develop = true}
  promptflow-tracing = {path = "../promptflow-tracing", develop = true}
  promptflow = {path = "../promptflow"}
  promptflow-tools = {path = "../promptflow-tools"}
  promptflow-recording =  {path = "../promptflow-recording", develop = true}
  promptflow-azure =  {path = "../promptflow-azure", develop = true}
  
  [tool.poetry.group.ci.dependencies]
  import-linter = "*"
  promptflow-core = {path = "../promptflow-core", extras = ["azureml-serving"]}
  promptflow-tracing = {path = "../promptflow-tracing"}
  promptflow = {path = "../promptflow"}
  promptflow-tools = {path = "../promptflow-tools"}
  promptflow-recording =  {path = "../promptflow-recording"}
  numpy = "<2.0.0"  # avoid pandas incompatibility
  tenacity = "<8.4.0"  # tenacity has breaking in 8.4.0
  
  [tool.poetry.group.test.dependencies]
  pytest = "*"
  pytest-cov = "*"
  pytest-xdist = "*"
  pytest-mock = "*"
  pytest-asyncio = "*"
  mock = "*"
  ipykernel = ">=6.27.1"
  papermill = ">=2.5.0"
  keyrings-alt = "*"
  bs4 = "*"
  uvicorn = ">=0.27.0"
  
  [build-system]
  requires = ["poetry-core>=1.5.0"]
  build-backend = "poetry.core.masonry.api"
  
  [tool.poetry.scripts]
  pf = "promptflow._cli.pf:main"
  
  [tool.pytest.ini_options]
  markers = [
    "unittest",
    "e2etest",
    "csharp"
  ]
  # junit - analyse and publish test results (https://github.com/EnricoMi/publish-unit-test-result-action)
  # durations - list the slowest test durations
  addopts = """
  --junit-xml=test-results.xml \
  --dist loadfile \
  --log-level=info \
  --log-format="%(asctime)s %(levelname)s %(message)s" \
  --log-date-format="[%Y-%m-%d %H:%M:%S]" \
  --durations=5 \
  -ra \
  -vv
  """
  testpaths = ["tests"]
  
  [tool.coverage.run]
  source = [
    "*/promptflow/_cli/**",
    "*/promptflow/_orchestrator/**",
    "*/promptflow/_proxy/**",
    "*/promptflow/_sdk/**",
    "*/promptflow/batch/**",
  ]
  omit = [
    "*/__init__.py",
    "*/promptflow/_sdk/_serving/*",
  ]
  
  [tool.black]
  line-length = 120
  
  [tool.importlinter]
  root_package = "promptflow"
  include_external_packages = "True"
  
  [[tool.importlinter.contracts]]
  name = "Contract forbidden modules"
  type = "forbidden"
  source_modules = [
    "promptflow._cli",
    "promptflow._internal",
    "promptflow._proxy",
    "promptflow._sdk",
    "promptflow.batch",
    "promptflow.client",
    "promptflow.entities",
    "promptflow.operations"
  ]
  forbidden_modules = ["promptflow.azure"]
  