forked from jackmpcollins/magentic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
118 lines (104 loc) · 2.99 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
[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",
]
ignore_missing_imports = true
[tool.poetry]
name = "magentic"
version = "0.20.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.23.0", optional = true}
filetype = "*"
litellm = {version = ">=1.33.7", optional = true}
openai = ">=1.0"
pydantic = ">=2.0.0"
pydantic-settings = ">=2.0.0"
[tool.poetry.extras]
anthropic = ["anthropic"]
litellm = ["litellm"]
[tool.poetry.group.dev.dependencies]
blacken-docs = "^1.16.0"
mypy = "*"
pytest = "*"
pytest-asyncio = "*"
pytest-clarity = "*"
pytest-cov = "*"
python-dotenv = "^1.0.1"
ruff = "^0.3.0"
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5.3"
mkdocs-jupyter = "^0.24.6"
mkdocs-material = "^9.5.11"
[tool.poetry.group.examples.dependencies]
jupyter = "*"
pandas = "^2.2.1"
wikipedia = "*"
[tool.pytest.ini_options]
addopts = "--cov=magentic --cov-report=term-missing -m 'not anthropic and not litellm_anthropic and not litellm_openai and not 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_openai: Tests that query the OpenAI API via litellm. Requires the OPENAI_API_KEY environment variable to be set.",
"ollama: Tests that query Ollama. Requires ollama to be installed and running on localhost:11434.",
"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"]
# 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
]