-
Notifications
You must be signed in to change notification settings - Fork 99
/
pyproject.toml
125 lines (111 loc) · 3.31 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
check_untyped_defs = true
disable_error_code = ["empty-body"]
disallow_untyped_defs = false
strict = true
[[tool.mypy.overrides]]
module = [
"filetype",
"litellm",
"litellm.utils",
"litellm.integrations.custom_logger",
"logfire_api",
]
ignore_missing_imports = true
[tool.poetry]
name = "magentic"
version = "0.32.0"
description = "Seamlessly integrate LLMs as Python functions"
license = "MIT"
authors = ["Jack Collins"]
readme = "README.md"
homepage = "https://magentic.dev/"
repository = "https://github.com/jackmpcollins/magentic"
[tool.poetry.dependencies]
python = ">=3.10,<4.0"
anthropic = {version = ">=0.27.0", optional = true}
filetype = "*"
litellm = {version = ">=1.41.12", optional = true}
logfire-api = "*"
openai = ">=1.40.0"
pydantic = ">=2.7.0"
pydantic-settings = ">=2.0.0"
[tool.poetry.extras]
anthropic = ["anthropic"]
litellm = ["litellm"]
[tool.poetry.group.dev.dependencies]
blacken-docs = "^1.16.0"
logfire = ">=0.46.1,<0.50.0"
mypy = "*"
pytest = "*"
pytest-asyncio = "*"
pytest-clarity = "*"
pytest-cov = "*"
python-dotenv = "^1.0.1"
ruff = "^0.6.7"
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5.3"
mkdocs-glightbox = "^0.4.0"
mkdocs-jupyter = ">=0.24.6,<0.26.0"
mkdocs-material = "^9.5.11"
[tool.poetry.group.examples.dependencies]
ghapi = "^1.0.5"
jupyter = "*"
pandas = "^2.2.1"
[tool.pytest.ini_options]
addopts = "--cov=magentic --cov-report=term-missing -m 'not anthropic and not litellm_anthropic and not litellm_openai and not mistral and not litellm_ollama and not openai'"
markers = [
"anthropic: Tests that query the Anthropic API. Requires the ANTHROPIC_API_KEY environment variable to be set.",
"litellm_anthropic: Tests that query the Anthropic API via litellm. Requires the ANTHROPIC_API_KEY environment variable to be set.",
"litellm_ollama: Tests that query Ollama. Requires ollama to be installed and running on localhost:11434.",
"litellm_openai: Tests that query the OpenAI API via litellm. Requires the OPENAI_API_KEY environment variable to be set.",
"mistral: Tests that query the Mistral API (via openai). Requires the MISTRAL_API_KEY environment variable to be set.",
"openai: Tests that query the OpenAI API. Requires the OPENAI_API_KEY environment variable to be set.",
]
[tool.ruff]
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
target-version = "py310"
# Use `ruff linter` to list available linters
# https://beta.ruff.rs/docs/rules/
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"C90", # mccabe
"D", # pydocstyle
"ANN", # flake8-annotations
"A", # flake8-builtins
"COM", # flake8-commas
"FA", # flake8-future-annotations
"INP", # flake8-no-pep420
"PIE790", # flake8-pie: Unnecessary `...` literal
"SLF", # flake8-self
"ARG", # flake8-unused-arguments
"TD", # flake8-todos
"FIX", # flake8-fixme
"PL", # Pylint
# Compatibility with ruff formatter
"E501",
"ISC001",
"Q000",
"Q001",
"Q002",
"Q003",
"W191",
]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
[tool.ruff.lint.isort]
known-first-party = ["magentic"]
[tool.ruff.lint.per-file-ignores]
"docs/examples/*" = [
"T20", # flake8-print
]
"examples/*" = [
"T20", # flake8-print
]
"tests/*" = [
"S", # flake8-bandit
]