-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
161 lines (147 loc) · 4.48 KB
/
pyproject.toml
File metadata and controls
161 lines (147 loc) · 4.48 KB
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "jq-by-example"
version = "0.2.1"
description = "AI-Powered JQ Filter Synthesis Tool - synthesizes jq filters from input/output JSON examples using LLM generation with iterative refinement"
readme = "README_PYPI.md"
license = {text = "MIT"}
requires-python = ">=3.10"
authors = [
{name = "JQ-By-Example Contributors"}
]
keywords = ["jq", "json", "llm", "synthesis", "cli"]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Code Generators",
"Topic :: Text Processing :: Filters",
"Typing :: Typed",
]
dependencies = [
"httpx>=0.25.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"ruff>=0.14.0",
"mypy>=1.0",
]
[project.scripts]
jq-by-example = "src.cli:main"
[project.urls]
Homepage = "https://github.com/nulone/jq-by-example"
Repository = "https://github.com/nulone/jq-by-example"
Issues = "https://github.com/nulone/jq-by-example/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["src*"]
[tool.ruff]
target-version = "py310"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"ERA", # eradicate (commented-out code)
"PL", # pylint
"RUF", # Ruff-specific rules
]
ignore = [
"PLR0913", # Too many arguments
"PLR2004", # Magic value used in comparison
"PLR0911", # Too many return statements (ok for our code)
"PLR0912", # Too many branches (ok for our code)
"PLR0915", # Too many statements (ok for our code)
"PLW2901", # Loop variable overwritten (intentional in some cases)
"PLC0415", # Import should be at top-level (ok in test fixtures)
"ARG001", # Unused function argument (normal in tests)
"ARG002", # Unused method argument (normal in tests)
"E402", # Module level import not at top of file (normal in scripts)
"E501", # Line too long (readable code > strict line length)
"SIM108", # Use ternary operator (explicit if-else can be clearer)
"SIM102", # Use single if statement (nested can be clearer)
"SIM114", # Combine if branches (explicit can be clearer)
"SIM117", # Use single with statement (nested can be clearer)
"F841", # Unused variable (normal in tests for assertion side effects)
"F811", # Redefinition of unused variable (normal in tests)
"PLC1901", # Empty string comparison (explicit can be clearer)
"ERA001", # Commented-out code (useful for documentation in tests)
]
[tool.ruff.lint.isort]
known-first-party = ["src"]
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_configs = true
show_error_codes = true
show_column_numbers = true
pretty = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-fail-under=85",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"e2e: marks tests as end-to-end requiring API key",
]
filterwarnings = [
"error",
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["src"]
branch = true
omit = [
"tests/*",
"**/__init__.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
show_missing = true