-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
289 lines (263 loc) · 7.37 KB
/
Copy pathpyproject.toml
File metadata and controls
289 lines (263 loc) · 7.37 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
[build-system]
requires = [
"setuptools >= 61",
"setuptools_scm[toml] >= 8",
]
build-backend = 'setuptools.build_meta'
[project]
name="INFRA-COMPASS"
dynamic = ["version"]
description = "INFRA-COMPASS is a tool that leverages Large Language Models (LLMs) to create and maintain an inventory of state and local codes and ordinances applicable to energy infrastructure."
readme = "README.rst"
authors = [
{name = "Paul Pinchuk", email = "ppinchuk@nlr.gov"},
{name = "Guilherme Castelão", email = "gpimenta@nlr.gov"},
]
maintainers = [
{name = "Paul Pinchuk", email = "ppinchuk@nlr.gov"},
{name = "Guilherme Castelão", email = "gpimenta@nlr.gov"},
]
license = "BSD-3-Clause"
keywords = ["COMPASS", "NLR", "Ordinance", "Database"]
requires-python = ">=3.12"
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
dependencies = [
"beautifulsoup4>=4.12.3,<5",
"click>=8.1.7,<9",
"crawl4ai>=0.8.6,<0.9",
"docling>=2.90.0,<3",
"docling-core>=2.73.0,<3.0.0",
"docling-parse>=5.3.2,<6.0.0",
"html5lib>=1.1,<2",
"huggingface_hub<1",
"langchain-text-splitters>=1.0.0,<2",
"networkx>=3.4.2,<4",
"nltk>=3.9.1,<4",
"nlr-elm>=0.0.44,<1",
"numpy>=2.4.3,<3",
"openai>=2.34.0",
"pandas>=2.2.3,<3",
"pdftotext>=2.2.2,<3",
"platformdirs>=4.5.1,<5",
"playwright>=1.49.0,<1.52", # version range required for c4ai"
"pyjson5>=2.0.0,<3",
"python-dotenv>=1.2.2,<2",
"rich>=13.9.4,<14",
"toml>=0.10.2,<0.11",
]
[project.optional-dependencies]
ocr = [
"pytesseract>=0.3.13,<0.4"
]
dev = [
"jupyter>=1.0.0,<1.1",
"pipreqs>=0.4.13,<0.5",
"ruff>=0.15.22,<0.16",
]
test = [
"codespell>=2.4,<3",
"flaky>=3.8.1,<4",
"pytest>=9.0.3,<9.1",
"pytest-asyncio>=1.3.0,<2",
"pytest-cases>=3.10.1,<4",
"pytest-cov>=7.1.0,<8",
"pytest-mock>=3.15.1,<4",
"pytest-profiling>=1.8.1,<2",
"pytest-xdist>=3.8.0,<4",
"snakeviz>=2.2.2,<3",
"statsmodels>=0.14,<0.15", # Wilson CI for eval metrics
"tox>=4.52.1,<5",
]
doc = [
"ghp-import>=2.1.0,<3",
"myst-parser>=5.0.0,<6",
"pydata-sphinx-theme>=0.17.1,<0.18",
"sphinx-click>=6.2.0,<7",
"sphinx-copybutton>=0.5.2,<0.6",
"sphinx-tabs>=3.5,<4",
"sphinxcontrib-mermaid>=2.0.1,<3",
]
anthropic = [
"anthropic>=0.40.0,<0.41",
"botocore>=1.35.72,<2",
"boto3>=1.35.71,<2",
]
build = [
"build>=1.2.2,<2",
"pkginfo>=1.12.1.2,<2",
]
[project.scripts]
compass = "compass._cli.main:main"
[project.urls]
homepage = "https://github.com/NatLabRockies/COMPASS"
documentation = "https://natlabrockies.github.io/COMPASS/"
repository = "https://github.com/NatLabRockies/COMPASS"
[tool.setuptools.packages]
find = { include = ["compass*"] }
[tool.setuptools_scm]
fallback_version = "9999"
# Default git command uses "*[0-9]*", which breaks with cX.X.X tags.
# This spec below forces setuptools_scm to look strictly for vX.X.X tags
git_describe_command = [ "git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*" ]
version_file = "compass/_version.py"
[tool.ruff]
line-length = 79
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.ruff.lint]
preview = true
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"ARG", # flake8-unused-arguments
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe
"COM", # flake8-commas
"D", # pydocstyle
"E", # pycodestyle
"EM", # flake8-errmsg
"F", # Pyflakes
"FURB", # refurb
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # numpy-specific
"PD", # pandas-vet
"PERF", # Perflint
"PIE", # flake8-pie
"PL", # Pylint
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports (absolute imports)
"TRY", # tryceratops
"UP", # pyupgrade
"W", # Warning
]
ignore = [
"no-explicit-stacklevel",
"missing-trailing-comma",
"undocumented-magic-method",
"missing-blank-line-after-summary",
"blank-line-after-function",
"surrounding-whitespace",
"missing-trailing-period",
"non-imperative-mood",
"first-word-uncapitalized",
"reimplemented-starmap",
"unsorted-imports",
"collections-named-tuple",
"mutable-class-default",
"incorrectly-parenthesized-tuple-in-subscript",
"non-empty-init-module",
"assert",
"hashlib-insecure-hash-function",
"suspicious-pickle-import",
"raise-vanilla-args",
]
[tool.ruff.lint.pycodestyle]
max-doc-length = 72
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["unused-import"]
"{tests,evals}/**.py" = [
"unused-function-argument",
"unused-method-argument",
"undocumented-public-class",
"undocumented-public-method",
"raw-string-in-exception",
"logging-f-string",
"implicit-namespace-package",
"non-lowercase-variable-in-function",
"import-private-name",
"too-many-locals",
"too-many-statements",
"magic-value-comparison",
"no-self-use",
"private-member-access",
"raise-within-try",
"doc-line-too-long",
]
[tool.ruff.lint.pylint]
max-args = 10
max-positional-args = 10
[tool.coverage.run]
branch = true
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"if self\\.debug",
# Don't complain about repr methods
"def __repr__",
"def _repr_markdown_",
# Don't complain about data I/O code
"def load*",
"def _load*",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
# Don't complain about logging debugging functions
"def print_logging_info*",
"def __cls_name",
]
omit = [
# omit test files
"tests/*",
# omit init files
"__init__.py",
# omit version file
"_version.py",
# omit log file copied over from other repo
"compass/utilities/log.py",
# omit config loading code for now
"compass/utilities/config.py",
# omit pixi files
".pixi/*",
]
[tool.codespell]
# Applied by the codespell workflow (.github/workflows/ci-codespell.yml)
# to compass/extraction, which is the primary area for new schemas.
# Add project-specific false positives to `ignore-words-list` below as a
# comma-separated list of lowercase words (uncomment when needed).
skip = "*.lock,*.min.js,*.svg,*.pdf,*.png,*.jpg,*.jpeg,*.gif,*.ico"
# ignore-words-list = "word1,word2"
[tool.pytest.ini_options]
addopts = '--durations=10 --disable-warnings -m "not evals"'
asyncio_mode="auto"
asyncio_default_fixture_loop_scope="function"
markers = [
"evals: accuracy/quality evals (live billable LLM calls). Deselected by default. Run with `pixi run evals <name>` (dev dataset) or `pixi run evals <name> --held-out` (held-out dataset).",
]
testpaths = [
"tests/python/unit",
"tests/python/integration",
]