-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
187 lines (169 loc) · 5.82 KB
/
Copy pathpyproject.toml
File metadata and controls
187 lines (169 loc) · 5.82 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "jobsearch-rag"
version = "0.1.0"
description = "Local LLM + RAG pipeline for intelligent job search filtering"
readme = "README.md"
requires-python = ">=3.11,<3.14"
license = { text = "PolyForm-Noncommercial-1.0.0" }
authors = [{ name = "Jack Pines" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: Other/Proprietary License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dependencies = [
"actionable-errors>=0.1.0",
"chromadb>=1.5,<2",
"httpx>=0.27,<1",
"ollama>=0.4,<1",
"playwright>=1.49,<2",
"playwright-stealth>=2.0,<3",
]
[project.optional-dependencies]
dev = [
"pyright>=1.1,<2",
"pre-commit>=4,<5",
"pytest>=8,<9",
"pytest-asyncio>=0.24,<1",
"pytest-cov>=6,<7",
"pytest-xdist>=3,<4",
"ruff>=0.8,<1",
"taskipy>=1.14,<2",
]
[project.scripts]
jobsearch-rag = "jobsearch_rag.__main__:main"
# ---------------------------------------------------------------------------
# uv
# ---------------------------------------------------------------------------
[tool.uv]
# Ensure the lock file resolves wheels for every CI platform.
# Without this, uv may pick a version that lacks wheels for some targets
# (e.g. onnxruntime 1.26.0 dropped macOS ARM64 wheels for Python 3.12).
required-environments = [
"sys_platform == 'darwin' and platform_machine == 'arm64'",
"sys_platform == 'linux' and platform_machine == 'x86_64'",
"sys_platform == 'win32' and platform_machine == 'AMD64'",
]
# onnxruntime 1.26.0 has no macOS ARM64 wheel for Python 3.12.
# Cap until upstream publishes the missing wheel.
constraint-dependencies = ["onnxruntime<1.26"]
# ---------------------------------------------------------------------------
# Taskipy
# ---------------------------------------------------------------------------
[tool.taskipy.tasks]
lint = "uv run ruff check --fix src/ tests/"
format = "uv run ruff format src/ tests/"
type = "uv run pyright src/ tests/"
test = "uv run pytest tests/ -v"
cov = "uv run pytest tests/ --cov=jobsearch_rag --cov-report=term-missing"
live = "uv run pytest tests/ -m \"live or integration\" -v"
check = "task format && task lint && task type && task cov"
# ---------------------------------------------------------------------------
# Ruff
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 99
src = ["src", "tests"]
[tool.ruff.lint]
preview = true
explicit-preview-rules = true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"RUF", # ruff-specific rules
"D", # pydocstyle
"PLC0415", # import-outside-top-level
"PLC2701", # import-private-name (preview)
]
ignore = [
"E501", # line length (handled by formatter)
"D212", # multi-line-summary-first-line (conflicts with D213)
"D203", # one-blank-line-before-class (conflicts with D211)
]
[tool.ruff.lint.isort]
known-first-party = ["jobsearch_rag"]
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"PLC2701", # import-private-name — testing internal state is intentional
"D205", # BDD Given/When/Then blocks aren't summary+body
"D400", # BDD steps don't end with periods
"D415", # same as D400
"D401", # fixture docstrings are descriptive, not imperative
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# ---------------------------------------------------------------------------
# Pyright
# ---------------------------------------------------------------------------
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "strict"
stubPath = "typings"
venvPath = "."
venv = ".venv"
# ---------------------------------------------------------------------------
# Coverage
# ---------------------------------------------------------------------------
[tool.coverage.run]
source = ["jobsearch_rag"]
branch = true
omit = ["tests/*"]
[tool.coverage.report]
show_missing = true
exclude_also = [
"if __name__ == .__main__.",
]
# ---------------------------------------------------------------------------
# Pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
python_files = ["*_test.py", "test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --strict-markers -m 'not integration and not live' -n auto --cov-fail-under=100"
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s %(levelname)-8s %(name)s — %(message)s"
log_cli_date_format = "%H:%M:%S"
markers = [
"integration: marks tests requiring live services (Ollama, browser)",
"live: marks tests requiring live external sites (ZipRecruiter, etc.)",
]
# ---------------------------------------------------------------------------
# python-semantic-release
# ---------------------------------------------------------------------------
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
version_variables = []
major_on_zero = false
allow_zero_version = true
commit_message = "chore(release): {version}"
tag_format = "v{version}"
branch = "main"
build_command = ""
upload_to_pypi = false
changelog_file = "CHANGELOG.md"
[tool.semantic_release.commit_parser_options]
allowed_tags = ["feat", "fix", "perf", "refactor", "docs", "style", "test", "build", "ci", "chore"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]