forked from StacklokLabs/promptwright
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
128 lines (113 loc) · 2.85 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
126
127
128
[project]
name = "promptwright"
version = "1.0.1"
description = "A tool for generating and managing prompts for local LLMs using Ollama"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"requests>=2.25.0",
"tqdm>=4.65.0",
"huggingface-hub==0.26.0",
"datasets==3.0.2",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.10.0",
"requests-mock>=1.11.0",
"ruff>=0.1.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q --strict-markers"
testpaths = [
"tests",
]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::UserWarning",
]
[tool.ruff]
# Target Python version
target-version = "py311"
# Line length
line-length = 100
[tool.ruff.lint]
# Enable all rules by default, then configure specific ones
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
"N", # pep8-naming
"YTT", # flake8-2020
"S", # flake8-bandit
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T20", # flake8-print
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"ERA", # eradicate
"PLC", # pylint
"PLE", # pylint-errors
"PLR", # pylint-refactor
"PLW", # pylint-warnings
"TRY", # tryceratops
]
ignore = [
"E501", # Line too long (handled by formatter)
"ISC001", #
"B008", # Do not perform function call in argument defaults
"C901", # Function is too complex
"T201", # Print found
"S101", # Use of assert detected
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
]
# Allow unused variables when underscore-prefixed
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Files to exclude
exclude = [
".git",
".ruff_cache",
".venv",
"venv",
"__pycache__",
"build",
"dist",
]
[tool.ruff.lint.per-file-ignores]
# Test files can use assertions and have long functions
"tests/*" = ["S101", "PLR0915"]
"conftest.py" = ["S101"]
[tool.ruff.lint.isort]
known-first-party = ["promptwright"]
lines-between-types = 1
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 8
[tool.ruff.format]
# Formatting options
indent-style = "space"
line-ending = "lf"
skip-magic-trailing-comma = false
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"