-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
112 lines (89 loc) · 2.65 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
[tool.poetry]
name = "galileo-protect"
version = "0.15.3"
description = "🛡️ Secure your Generative AI applications with Galileo Protect!"
authors = ["Galileo Technologies Inc. <[email protected]>"]
readme = "README.md"
packages = [{ include = "galileo_protect", from = "src" }]
[tool.poetry.dependencies]
python = "^3.8.1,<3.13"
galileo-core = "^2.30.2"
langchain-core = { version = ">=0.1.52,<0.3.0", optional = true }
[tool.poetry.extras]
langchain = ["langchain-core"]
all = ["langchain-core"]
[tool.poetry.group.test.dependencies]
pytest = "^8.1.1"
coverage = "^7.3.4"
pytest-cov = "^5.0.0"
pytest-xdist = "^3.5.0"
pytest-socket = "^0.7.0"
pytest-asyncio = "^0.24.0"
galileo-core = { extras = ["testing"], version = "^2.30.2" }
[tool.poetry.group.dev.dependencies]
mypy = "^1.14.0"
pre-commit = "^3.5.0"
invoke = "^2.2.0"
pydantic = { extras = ["mypy"], version = "^2.6.0" }
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.0"
mkdocstrings = "^0.26.0"
mkdocstrings-python = "^1.10.2"
mkdocs-material = "^9.5.24"
griffe-fieldz = "^0.2.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# Test.
[tool.pytest.ini_options]
pythonpath = ["./src/"]
addopts = [
# Run tests in parallel.
"-n",
"auto",
# Show local variables in tracebacks.
"--showlocals",
# Show extra test summary info as specified by chars.
"-o",
"console_output_style=progress",
# Disable warnings.
"--disable-warnings",
# Show slowest 10 test durations.
"--durations=10",
# Disable internet access.
"--disable-socket",
"--allow-unix-socket",
]
asyncio_default_fixture_loop_scope = "function"
# Linters and formatters.
[tool.ruff]
line-length = 120
fix = true
src = ["src"]
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I", "UP", "ASYNC"]
ignore = []
[tool.ruff.lint.isort]
known-first-party = ["galileo_core"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.docformatter]
style = "numpy"
recursive = true
wrap-summaries = 120
wrap-descriptions = 120
[tool.mypy]
mypy_path = ["src"]
disallow_untyped_defs = true
plugins = ["pydantic.mypy"]
# Release.
[tool.semantic_release]
# Package version.
version_variables = ["src/galileo_protect/__init__.py:__version__"]
version_toml = ["pyproject.toml:tool.poetry.version"]
version_source = "tag"
commit_message = "chore(release): v{version}\n\nAutomatically generated by python-semantic-release"
[tool.semantic_release.commit_parser_options]
# Release patch version on these tags,
# https://python-semantic-release.readthedocs.io/en/latest/configuration.html#commit-parser-options-dict-str-any
patch_tags = ["fix", "perf", "chore", "docs", "style", "refactor"]