blob: 40b13bd21a957ba9e334ebf7a1b8dd3a8ded01b8 [file] [log] [blame]
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
[build-system]
# Minimum requirements for the build system to execute.
requires = [
"setuptools>=75.3",
"wheel",
]
build-backend = "setuptools.build_meta"
[project]
name = "flink-agents"
version = "0.2.dev0"
description = "Flink Agents Python API"
license-files = ["LICENSE"]
requires-python = ">=3.10,<3.12"
authors = [
{ name = "Apache Software Foundation", email = "dev@flink.apache.org" },
]
readme = "README.md"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
]
dependencies = [
"pydantic==2.11.4",
"docstring-parser==0.16",
"pyyaml==6.0.2",
"mcp>=1.8.0",
"setuptools>=75.3",
"find_libpython",
#TODO: Seperate integration dependencies from project
"ollama==0.6.1",
"dashscope~=1.24.2",
"openai>=1.66.3",
"anthropic>=0.64.0",
"chromadb==1.0.21",
]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = [""]
[tool.setuptools.package-data]
"flink_agents.lib" = ["**/*.jar"]
# Optional dependencies (dependency groups)
[project.optional-dependencies]
# Development dependencies - includes all tools needed for development
dev = [
"flink-agents[build]",
"flink-agents[lint]",
"flink-agents[test]",
]
# Build dependencies - tools needed for building the package
build = [
"build",
]
# Test dependencies
test = [
"pytest==8.4.0",
]
# Lint dependencies
lint = [
"ruff==0.11.13",
]
[tool.cibuildwheel]
build = ["cp310-*", "cp311-*"]
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
[tool.cibuildwheel.linux]
archs = ["x86_64"]
# Configure uv workspace (if needed for multi-package projects)
[tool.uv.workspace]
# Currently a single package project, but ready for workspace expansion
members = ["."]
# Configure platform-specific dependency resolution
[tool.uv]
# Configure required environments for platform compatibility
required-environments = [
"sys_platform == 'darwin' and platform_machine == 'arm64'",
"sys_platform == 'linux'",
"sys_platform == 'win32'",
]
[tool.ruff]
line-length = 88
fix = true
[tool.ruff.lint]
select = [
"ANN", # flake8-annotations
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # flake8-docstrings
"E", # pycodestyle
"EM", # flake8-errmsg
"F", # pyflakes
"FA", # flake8-future-annotations
"FBT001", # flake8-boolean-trap
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"PERF", # perflint
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"RUF", # ruff-specific rules
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"TD", # flake8-todos
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D205", # Missing-blank-line-after-summary
# ------------------------------------------------------------------
"ANN401", # Dynamically typed expressions (Any) are disallowed
"D401", # Relax NumPy docstring convention: first line should be imperative
"E501", # Line length regulated by formatter
"FA100", # Future-rewritable-type-annotation, unsafe for Pydantic
"PT011", # pytest.raises is too broad, set match or use a more specific exception
"PYI041", # Use float instead of int | float
"RUF022", # `__all__` is not sorted
"RUF005", # Consider expression instead of concatenation
"SIM102", # Use a single `if` statement instead of nested `if` statements
"SIM108", # Use ternary operator
"SIM114", # Combine `if` branches
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
"TID252", # Prefer absolute imports over relative imports
"TRY003", # Avoid specifying long messages outside the exception class
"UP006", # Non-pep585-annotation, unsafe for Pydantic
"UP035", # Deprecated-import, unsafe for Pydantic
]
[tool.ruff.lint.per-file-ignores]
"dependencies.py" = ["ICN001"]
"tests/**/*.py" = ["ANN001", "ANN201", "D100", "D102", "D103", "B018", "FBT001"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 88
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.ruff.format]
docstring-code-format = true