-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
175 lines (153 loc) · 4.13 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
175
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "embedder"
version = "0.1.2"
description = "Embedder para o Assistente Virtual"
authors = [{name = "Anatel", email = "[email protected]"}]
dependencies = [
"fastapi==0.111.0",
"sqlalchemy>=2.0.0,<3.0.0",
"pandas",
"numpy",
"langchain==0.1.20",
"langchain-openai==0.1.6",
"langchain-community==0.0.38",
"langchain-text-splitters==0.0.1",
"sentence-transformers==2.7.0",
"transformers==4.41.1",
"python-poppler==0.4.1",
"requests",
"zeep==4.2.1",
"pgvector==0.2.5",
"python-dotenv==1.0.1",
"tiktoken==0.7.0",
"pymysql==1.1.1",
"beautifulsoup4==4.12.3",
"psycopg2-binary==2.9.9",
"dill",
"pydantic==2.8.2",
"oracledb==2.3.0",
"pyodbc==5.1.0"
]
[project.optional-dependencies]
dev = [
"pytest>=6.0",
"black",
"ruff==0.4.3",
"pytype",
"requests-mock",
"coverage",
"pytest-mock",
"taskipy"
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
pythonpath = ["."]
[tool.coverage.run]
branch = true
source = ["."]
omit = ["./tests/*", "./.conda/*"]
[tool.taskipy.tasks]
pre-commit = """
set -e
ruff check --statistics .
pytype --exclude=tests/* --exclude=.conda/* -k .
black . --check
coverage run --source=. -m pytest ./tests/unit
coverage report --fail-under=95
coverage run --source=. -m pytest ./tests/integration
coverage report --fail-under=80
"""
[tool.pytype]
inputs = [
"pytype/*.py",
"pytype/overlays/",
"pytype/pyc/",
"pytype/pyi/",
"pytype/pytd/",
"pytype/tools/",
"pytype/typegraph/",
"pytype_extensions/**/*.py",
]
exclude = [
"tests/*",
".conda",
".pytype*",
"__pypackages__",
"venv",
"*.egg-info",
".pytest*"
]
[tool.black]
line-length = 120
target-version = ['py38']
include = '\.pyi?$'
force-exclude = '''
/(
\.git
| \.mypy_cache
| \.venv
| _build
| build
| dist
| tests
)/
'''
[tool.ruff]
# Ruff - An extremely fast Python linter, written in Rust. - https://beta.ruff.rs
# Exclude a variety of commonly ignored directories.
exclude = [
".conda",
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"*ipynb_checkpoints"
]
# Same as Black.
#line-length = 88
# Same as PyCharm.
line-length = 120
# Assume Python 3.10
target-version = "py310"
[tool.ruff.lint]
# Enable all rules https://beta.ruff.rs/docs/rules/
select = ['A', 'ANN', 'ARG', 'B', 'BLE', 'C', 'C4', 'C90', 'COM', 'D', 'DJ', 'DTZ', 'E', 'EM', 'ERA', 'EXE', 'F', 'FBT', 'G', 'I', 'ICN', 'INP', 'ISC', 'N', 'NPY', 'PD', 'PGH', 'PIE', 'PL', 'PLC', 'PLE', 'PLR', 'PLW', 'PT', 'PTH', 'PYI', 'Q', 'RET', 'RSE', 'RUF', 'S', 'SIM', 'SLF', 'T10', 'T20', 'TCH', 'TID', 'TRY', 'UP', 'W', 'YTT']
#select = ['D']
# Rules to ignore:
# COM flake8-commas is no longer maintained, and now black or https://github.com/asottile/add-trailing-comma is recommended instead
# PLR0913 Too many arguments to function call (6 > 5)
# G003 Logging statement uses `+`
# G004 Logging statement uses f-string
# S324 Probable use of insecure hash functions in `hashlib`: `sha1`
# ANN101 Missing type annotation for `self` in method
ignore = ["COM","PLR0913", "G003", "G004", "S324", "ANN101"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
#fixable = ["A", "B", "C", "D", "E", "F", "I"]
fixable = ['A', 'ANN', 'ARG', 'B', 'BLE', 'C', 'C4', 'C90', 'COM', 'D', 'DJ', 'DTZ', 'E', 'EM', 'ERA', 'EXE', 'F', 'FBT', 'G', 'I', 'ICN', 'INP', 'ISC', 'N', 'NPY', 'PD', 'PGH', 'PIE', 'PL', 'PLC', 'PLE', 'PLR', 'PLW', 'PT', 'PTH', 'PYI', 'Q', 'RET', 'RSE', 'RUF', 'S', 'SIM', 'SLF', 'T10', 'T20', 'TCH', 'TID', 'TRY', 'UP', 'W', 'YTT']
# Avoid trying to fix flake8-bugbear (`B`) violations.
unfixable = ["B"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.pydocstyle]
# Google DocString Convention
convention = "google"