-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
174 lines (142 loc) · 6.06 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
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
[tool.poetry] # https://python-poetry.org/docs/pyproject/
name = "cover_letter_automation"
version = "0.4.1"
description = "A Python package for ingesting job descriptions & resumes, and crafting cover letters that use the latter to satisfy the former"
authors = ["Simon Podhajsky <simon.podhajsky@gmail.com>"]
license = "Proprietary"
readme = "README.md"
repository = "https://github.com/shippy/cover_letter_automation/"
[build-system] # https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies] # https://python-poetry.org/docs/dependency-specification/
python = ">=3.11.8,<3.13"
poethepoet = ">=0.24.4"
pydantic = ">=2.6.1"
pyautogen = {extras = ["retrievechat", "teachable", "websurfer"], version = "^0.2.21"}
python-dotenv = "^1.0.1"
typer = {extras = ["all"], version = "^0.12.3"}
[tool.poetry.scripts] # https://python-poetry.org/docs/pyproject/#scripts
make-cover-letter = "cover_letter_automation.cli:app"
[tool.poetry.group.dev.dependencies] # https://python-poetry.org/docs/master/managing-dependencies/
coverage = { extras = ["toml"], version = ">=7.4.1" }
ipython = ">=8.20.0"
mypy = "1.9.0"
pre-commit = ">=3.6.2"
pytest = ">=8.1.1"
pytest-clarity = ">=1.0.1"
pytest-mock = ">=3.12.0"
ruff = ">=0.3.3"
safety = ">=2.3.5,!=2.3.5"
shellcheck-py = ">=0.9.0"
typeguard = ">=4.1.5"
deepeval = "^0.21.30"
types-pyyaml = "^6.0.12.20240311"
[[tool.poetry.source]] # https://python-poetry.org/docs/repositories/
name = "pypi"
priority = "primary"
[tool.coverage.report] # https://coverage.readthedocs.io/en/latest/config.html#report
# TODO: please raise the bar :)
fail_under = 0
precision = 1
show_missing = true
skip_covered = true
[tool.coverage.run] # https://coverage.readthedocs.io/en/latest/config.html#run
branch = true
command_line = "--module pytest"
data_file = "reports/.coverage"
source = ["src"]
[tool.coverage.xml] # https://coverage.readthedocs.io/en/latest/config.html#xml
output = "reports/coverage.xml"
[tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html
junit_xml = "reports/mypy.xml"
plugins = "pydantic.mypy"
strict = true
disallow_subclassing_any = false
disallow_untyped_decorators = false
explicit_package_bases = true
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
warn_unreachable = true
mypy_path = "src"
[tool.pydantic-mypy] # https://pydantic-docs.helpmanual.io/mypy_plugin/#configuring-the-plugin
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pytest.ini_options] # https://docs.pytest.org/en/latest/reference/reference.html#ini-options-ref
markers = [
"eval: a LLM-involved test",
]
addopts = "--color=yes --doctest-modules --failed-first --strict-config --strict-markers --typeguard-packages=cover_letter_automation --verbosity=2 --junitxml=reports/pytest.xml"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore::pytest.PytestUnraisableExceptionWarning",
"ignore::pytest.PytestAssertRewriteWarning",
"ignore::UserWarning",
]
testpaths = ["src", "tests"]
xfail_strict = true
log_file_level = "info"
pythonpath = "src"
[tool.ruff] # https://github.com/charliermarsh/ruff
ignore-init-module-imports = true
line-length = 120
src = ["src", "tests"]
target-version = "py311"
force-exclude = true # https://docs.astral.sh/ruff/settings/#force-exclude
preview = true # https://docs.astral.sh/ruff/preview/
[tool.ruff.lint] # https://github.com/charliermarsh/ruff
extend-safe-fixes = ["TID252"] # https://docs.astral.sh/ruff/settings/#extend-safe-fixes
fixable = ["ALL"] # Allow fix for all enabled rules (when `--fix`) is provided.
ignore = ["FBT001", "E501", "EM101", "EM102", "ISC001", "RET504", "S101", "TRY003", "TRY300", "W505"]
select = ["A", "ASYNC", "B", "BLE", "C4", "C90", "D", "DTZ", "E", "EM", "ERA", "F", "FBT", "FLY", "FURB", "G", "I", "ICN", "INP", "INT", "ISC", "LOG", "N", "NPY", "PERF", "PGH", "PIE", "PLC", "PLE", "PLR", "PLW", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "S", "SIM", "SLF", "SLOT", "T10", "T20", "TCH", "TID", "TRY", "UP", "W", "YTT"]
unfixable = ["ERA001", "F401", "F841", "T201", "T203"] # https://docs.astral.sh/ruff/settings/#unfixable
[tool.ruff.lint.extend-per-file-ignores] # https://docs.astral.sh/ruff/settings/#extend-per-file-ignores
# Ignore missing __init__.py files in tests.
"tests/*" = ["INP001", "PLR2004"]
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pep8-naming]
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
classmethod-decorators = ["classmethod", "pydantic.validator", "pydantic.root_validator"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 100
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.poe.tasks] # https://poethepoet.natn.io/index.html
[tool.poe.tasks.lint]
help = "Lint this package"
[[tool.poe.tasks.lint.sequence]]
shell = '[ -d ".git" ] || { echo "\n\\033[0;31mGit is not initialized in this directory. Please run \"git init\" to fix linting.\\033[0m\n"; exit 1; }'
[[tool.poe.tasks.lint.sequence]]
cmd = """
pre-commit run
--all-files
--color always
"""
[tool.poe.tasks.safety]
help = "Run safety checks on this package"
shell = "safety check --continue-on-error --full-report"
[tool.poe.tasks.test]
help = "Test this package"
[[tool.poe.tasks.test.sequence]]
# Don't run eval tests by default; don't even collect them, since they require OPENAI_API_KEY
cmd = "coverage run -m pytest -m 'not eval' --ignore=tests/cover_letter_automation/agents"
[[tool.poe.tasks.test.sequence]]
cmd = "coverage report"
[[tool.poe.tasks.test.sequence]]
cmd = "coverage xml"
[tool.poe.tasks.eval]
help = "Run DeepEval on this package"
[[tool.poe.tasks.eval.sequence]]
cmd = "deepeval login --use-existing"
[[tool.poe.tasks.eval.sequence]]
cmd = "deepeval test run tests/cover_letter_automation/agents/"