Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
165 lines (151 loc) · 4.49 KB
/
Copy pathpyproject.toml
File metadata and controls
165 lines (151 loc) · 4.49 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "procgrep"
version = "0.1.3"
description = "Procedural fingerprinting of LLM coding-agent rollouts: canonical atoms, BPE procedures, Jensen-Shannon divergence."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"
authors = [
{ name = "Hamidah Oderinwale" },
]
keywords = [
"llm",
"coding-agents",
"procedural-fingerprinting",
"bpe",
"jensen-shannon",
"trace-analysis",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Information Analysis",
]
dependencies = [
"numpy>=1.24",
"scipy>=1.10",
"scikit-learn>=1.3",
"altair>=5.0",
"pyyaml>=6.0",
"typer>=0.12",
]
[project.optional-dependencies]
reward = [
"pyyaml>=6.0",
]
viz = [
"umap-learn>=0.5.5", # only needed for umap_project / the `umap` CLI
"matplotlib>=3.8", # only needed to regenerate the essay/cascade figures (analysis/fig_*.py)
]
embed = [
"sentence-transformers>=2.2", # only needed for the default hf_embedder; any callable works
]
dev = [
"umap-learn>=0.5.5", # so the umap_project test runs in CI
"datasets>=2.19", # so the from_hf tests can patch datasets.load_dataset
"ruff==0.15.17", # pinned to match .pre-commit-config so local lint == CI lint
"mypy==1.18.2", # pinned likewise (avoid local/CI linter version skew)
"pre-commit>=3.7",
"pytest>=8.0",
"pytest-cov>=5.0",
"types-pyyaml",
]
[project.scripts]
procgrep = "procgrep.cli:app"
[project.urls]
Repository = "https://github.com/hamidahoderinwale/procgrep"
Issues = "https://github.com/hamidahoderinwale/procgrep/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/procgrep"]
[tool.hatch.build.targets.sdist]
# Ship the library, its tests, runnable examples, and the markdown docs; keep
# the rendered essay/figures (docs/), case studies, data stores, and the HF
# Space app out of the source distribution (pyproject.toml is always included).
include = [
"src/procgrep",
"tests",
"examples",
"README.md",
"NOTES.md",
"METRICS.md",
"STUDIES.md",
"CITATION.cff",
"LICENSE",
]
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
exclude = ["examples/paper", "docs"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"SIM", # flake8-simplify
"RUF", # ruff-specific rules
"N", # pep8-naming
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"PT", # flake8-pytest-style
]
ignore = [
"E501", # line length handled by formatter
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["B011"] # allow assert False
"docs/build/*.py" = ["RUF001"] # embedded page uses real typography (multiplication sign, micro, less-or-equal)
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
[tool.mypy]
# No python_version pin: mypy follows the interpreter it runs under (3.12 in the
# lint job). numpy>=2.5 ships stubs that need 3.12 syntax, so a 3.10 target cannot
# check them; the pytest matrix is what covers 3.10 and 3.11 at runtime.
strict = true
warn_return_any = true
warn_unused_ignores = true
warn_redundant_casts = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
[[tool.mypy.overrides]]
module = [
"altair.*",
"sklearn.*",
"scipy.*",
"datasets.*",
"typer.*",
"sentence_transformers.*",
"certifi", # optional fallback in ask.py; not installed in the lint job
]
ignore_missing_imports = true
# UMAP 0.6 ships typing metadata but leaves its public estimator untyped.
# Keep this optional third-party implementation outside our strict source check.
[[tool.mypy.overrides]]
module = ["umap.*"]
ignore_missing_imports = true
follow_imports = "skip"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra -q --strict-markers"
filterwarnings = [
"error",
"ignore::DeprecationWarning:umap.*",
"ignore::ImportWarning:umap.*",
"ignore::UserWarning:umap.*",
"ignore::DeprecationWarning:numba.*",
"ignore::DeprecationWarning:sklearn.*",
"ignore::FutureWarning:sklearn.*",
]