Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
186 lines (169 loc) · 5.71 KB
/
Copy pathpyproject.toml
File metadata and controls
186 lines (169 loc) · 5.71 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "bugbug"
dynamic = ["version"]
description = "ML tools for Mozilla projects"
license = "MPL-2.0"
requires-python = ">=3.14"
authors = [{ name = "Marco Castelluccio", email = "mcastelluccio@mozilla.com" }]
classifiers = [
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
]
dependencies = [
"amqp~=5.3.1",
"async-lru~=2.3.0",
"beautifulsoup4>=4.14.3,<4.16.0",
"boto3>=1.42.78,<1.44.0",
"httpx~=0.28.1",
"imbalanced-learn~=0.14.1",
"langchain~=1.3.15",
"langchain-anthropic>=1.3.4,<1.6.0",
"langchain-classic~=1.0.3",
"langchain-community~=0.4.1",
"langchain-google-genai>=4.2.1,<4.4.0",
"langchain-mistralai~=1.1.2",
"langchain-openai>=1.1.14,<1.5.0",
"langgraph>=1.2.5",
"libmozdata~=0.2.12",
"lmdb>=1.8.1,<2.4.0",
"lxml-html-clean~=0.4.4",
"markdown2~=2.5.5",
"matplotlib>=3.10.8,<3.12.0",
"mercurial~=7.2",
"microannotate~=0.0.24",
"mozci~=2.4.8",
"numpy~=2.4.3",
"orjson>=3.11.7,<3.14.0",
"ortools~=9.15.6755",
"pandas~=3.0.1",
"psutil~=7.2.2",
"pyOpenSSL>=0.14",
"python-dateutil~=2.9.0.post0",
"python-hglib~=2.6.2",
"qdrant-client~=1.15.1",
"ratelimit~=2.2.1",
"requests>=2.33,<2.35",
"requests-html~=0.10.0",
"rs-parsepatch~=0.4.6",
"searchfox>=0.20.3",
"scikit-learn~=1.7.2",
"scipy>=1.17.1,<1.19.0",
"sendgrid~=6.12.5",
"shap[plots]>=0.51,<0.53",
"tabulate~=0.10.0",
"taskcluster>=97.1,<103.1",
"tenacity~=9.1.4",
"tqdm>=4.67.3,<4.71.0",
"unidiff~=0.7.5",
"weave>=0.53.4",
"whatthepatch~=1.0.7",
"xgboost>=3.2,<3.5",
"zstandard~=0.25.0",
]
[project.optional-dependencies]
nlp = [
"spacy==3.8.16",
]
nn = []
perf-regression-predictor = [
"torch==2.13.0",
"transformers==5.15.0",
]
[dependency-groups]
test = [
"coverage==7.16.2",
"hypothesis==6.168.5",
"igraph==1.0.0",
"jsonschema==4.26.0",
"pre-commit==4.6.2",
"pytest==9.1.1",
"pytest-asyncio==1.4.0",
"pytest-cov==7.1.0",
"pytest-responses==0.6.0",
"responses==0.26.3",
]
spawn-pipeline = [
"json-e==4.8.4",
"pyyaml==6.0.3",
"requests==2.34.2",
"taskcluster==103.0.1",
]
[project.scripts]
bugbug-data-commits = "scripts.commit_retriever:main"
bugbug-data-bugzilla = "scripts.bug_retriever:main"
bugbug-data-test-scheduling-history = "scripts.test_scheduling_history_retriever:main"
bugbug-data-revisions = "scripts.revision_retriever:main"
bugbug-train = "scripts.trainer:main"
bugbug-check = "scripts.check:main"
bugbug-maintenance-effectiveness-indicator = "scripts.maintenance_effectiveness_indicator:main"
bugbug-microannotate-generate = "scripts.microannotate_generator:main"
bugbug-classify-commit = "scripts.commit_classifier:main"
bugbug-classify-bug = "scripts.bug_classifier:main"
bugbug-classify-comment = "scripts.comment_classifier:main"
bugbug-regressor-finder = "scripts.regressor_finder:main"
bugbug-retrieve-training-metrics = "scripts.retrieve_training_metrics:main"
bugbug-analyze-training-metrics = "scripts.analyze_training_metrics:main"
bugbug-check-all-metrics = "scripts.check_all_metrics:main"
bugbug-past-bugs-by-unit = "scripts.past_bugs_by_unit:main"
bugbug-testing-policy-stats = "scripts.testing_policy_stats:main"
bugbug-generate-landings-risk-report = "scripts.generate_landings_risk_report:main"
bugbug-shadow-scheduler-stats = "scripts.shadow_scheduler_stats:main"
bugbug-data-github = "scripts.github_issue_retriever:main"
bugbug-fixed-comments = "scripts.inline_comments_data_collection:main"
bugbug-ci-failures-retriever = "scripts.retrieve_ci_failures:main"
bugbug-try-pushes-retriever = "scripts.retrieve_try_pushes:main"
bugbug-validate-review-context = "bugbug.tools.code_review.review_context_schema:main"
bugbug-predict-perf-regression = "scripts.perf_regression_predictor:main"
[tool.hatch.version]
path = "VERSION"
pattern = "(?P<version>.+)"
[tool.hatch.build.targets.sdist]
include = ["/bugbug", "/scripts", "/VERSION"]
[tool.hatch.build.targets.wheel]
packages = ["bugbug", "scripts"]
[tool.uv]
# xgboost pulls in NCCL (~300 MB) for multi-GPU training, which we never use.
override-dependencies = ["nvidia-nccl-cu13; sys_platform == 'never'"]
[tool.uv.workspace]
members = ["http_service", "agents/*", "libs/*", "services/*", "tools/*"]
exclude = [
# JavaScript package (no pyproject.toml).
"services/hackbot-ui",
# Not migrated to the workspace yet.
"services/buildrepair",
]
[tool.uv.sources]
hackbot-runtime = { workspace = true }
agent-tools = { workspace = true }
torch = [
{ index = "pytorch-cpu", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.ruff]
extend-exclude = ["data"]
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I", "T10", "CPY", "G", "D", "B", "SIM", "FAST", "ASYNC"]
# Ignore warnings about missing docstrings.
ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D107",
# B905: zip() without explicit strict= needs case-by-case review to pick the right value (usually strict=True); tracked in #6916.
"B905"
]
[tool.ruff.lint.per-file-ignores]
"http_service/**" = ["D"]
# Agents currently run sequentially, so blocking calls in async functions are harmless there; tracked in #7008.
"agents/**" = ["ASYNC"]
"libs/agent-tools/**" = ["ASYNC"]
"libs/hackbot-runtime/**" = ["ASYNC"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["bugbug_http"]
[tool.codespell]
ignore-words-list = ["aFile", "thirdparty", "checkin"]