patchrail 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. patchrail/__init__.py +7 -0
  2. patchrail/__main__.py +7 -0
  3. patchrail/ci/__init__.py +7 -0
  4. patchrail/ci/classify.py +888 -0
  5. patchrail/cli.py +8566 -0
  6. patchrail/funded_issues/__init__.py +138 -0
  7. patchrail/funded_issues/algora_board.py +240 -0
  8. patchrail/funded_issues/blocklist.py +112 -0
  9. patchrail/funded_issues/discovery.py +4091 -0
  10. patchrail/funded_issues/importers.py +316 -0
  11. patchrail/funded_issues/source_noise.py +349 -0
  12. patchrail/funded_issues/store.py +459 -0
  13. patchrail/queue/__init__.py +75 -0
  14. patchrail/queue/server.py +273 -0
  15. patchrail/queue/status.py +756 -0
  16. patchrail/queue/store.py +600 -0
  17. patchrail/reviewer_quick_check.py +650 -0
  18. patchrail/schemas/__init__.py +1 -0
  19. patchrail/schemas/application-dossier.v1.schema.json +305 -0
  20. patchrail/schemas/ci-benchmark.v1.schema.json +174 -0
  21. patchrail/schemas/ci-fixture-check.v1.schema.json +122 -0
  22. patchrail/schemas/ci-pilot-metrics.v1.schema.json +164 -0
  23. patchrail/schemas/ci-pilot-summary.v1.schema.json +146 -0
  24. patchrail/schemas/ci-result.v1.schema.json +133 -0
  25. patchrail/schemas/funded-issues-client-report.v1.schema.json +524 -0
  26. patchrail/schemas/funded-issues-recheck-queue.v1.schema.json +333 -0
  27. patchrail/schemas/funded-issues-recheck-summary.v1.schema.json +136 -0
  28. patchrail/schemas/funded-issues-report.v1.schema.json +836 -0
  29. patchrail/schemas/funded-issues-shortlist.v1.schema.json +953 -0
  30. patchrail/schemas/funded-issues-store-status.v1.schema.json +96 -0
  31. patchrail/schemas/funded-issues-store.v1.schema.json +117 -0
  32. patchrail/schemas/queue-audit-event.v1.schema.json +44 -0
  33. patchrail/schemas/queue-audit-summary.v1.schema.json +169 -0
  34. patchrail/schemas/queue-gate-report.v1.schema.json +158 -0
  35. patchrail/schemas/queue-policy-resolution.v1.schema.json +188 -0
  36. patchrail/schemas/queue-policy-scan.v1.schema.json +175 -0
  37. patchrail/schemas/queue-proposal.v1.schema.json +61 -0
  38. patchrail/schemas/queue-review.v1.schema.json +218 -0
  39. patchrail/schemas/queue-status.v1.schema.json +179 -0
  40. patchrail/schemas/queue-work-item.v1.schema.json +64 -0
  41. patchrail/schemas/reviewer-quick-check-artifacts.v1.schema.json +104 -0
  42. patchrail/web_metrics.py +649 -0
  43. patchrail-0.1.0.dist-info/METADATA +279 -0
  44. patchrail-0.1.0.dist-info/RECORD +47 -0
  45. patchrail-0.1.0.dist-info/WHEEL +4 -0
  46. patchrail-0.1.0.dist-info/entry_points.txt +2 -0
  47. patchrail-0.1.0.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,524 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://patchrail.dev/schemas/funded-issues-client-report.v1.schema.json",
4
+ "title": "PatchRail Funded Issues Client Report",
5
+ "description": "Client-facing read-only opportunity shortlist deliverable emitted by patchrail funded-issues client-report.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "source_schema_version",
11
+ "read_only",
12
+ "client_name",
13
+ "prepared_by",
14
+ "date",
15
+ "scope",
16
+ "blocked_actions",
17
+ "filters",
18
+ "executive_summary",
19
+ "top_recommendations",
20
+ "watchlist",
21
+ "no_go_list",
22
+ "no_go_moat_evidence",
23
+ "patterns_observed",
24
+ "recommended_operating_procedure",
25
+ "disclaimer",
26
+ "requirements",
27
+ "boundary"
28
+ ],
29
+ "properties": {
30
+ "schema_version": {
31
+ "const": "patchrail.funded_issues.client_report.v1"
32
+ },
33
+ "source_schema_version": {
34
+ "const": "patchrail.funded_issues.v1"
35
+ },
36
+ "read_only": {
37
+ "const": true
38
+ },
39
+ "client_name": {
40
+ "type": "string",
41
+ "minLength": 1
42
+ },
43
+ "prepared_by": {
44
+ "type": "string",
45
+ "minLength": 1
46
+ },
47
+ "date": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ },
51
+ "scope": {
52
+ "type": "string"
53
+ },
54
+ "blocked_actions": {
55
+ "$ref": "#/$defs/blocked_actions"
56
+ },
57
+ "filters": {
58
+ "$ref": "#/$defs/filters"
59
+ },
60
+ "executive_summary": {
61
+ "$ref": "#/$defs/executive_summary"
62
+ },
63
+ "top_recommendations": {
64
+ "type": "array",
65
+ "items": {
66
+ "$ref": "#/$defs/recommendation"
67
+ }
68
+ },
69
+ "watchlist": {
70
+ "type": "array",
71
+ "items": {
72
+ "$ref": "#/$defs/watchlist_row"
73
+ }
74
+ },
75
+ "no_go_list": {
76
+ "type": "array",
77
+ "items": {
78
+ "$ref": "#/$defs/no_go_row"
79
+ }
80
+ },
81
+ "no_go_moat_evidence": {
82
+ "$ref": "#/$defs/no_go_moat_evidence"
83
+ },
84
+ "patterns_observed": {
85
+ "$ref": "#/$defs/patterns_observed"
86
+ },
87
+ "recommended_operating_procedure": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "string"
91
+ }
92
+ },
93
+ "disclaimer": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "requirements": {
98
+ "$ref": "#/$defs/safe_requirements"
99
+ },
100
+ "boundary": {
101
+ "type": "string"
102
+ }
103
+ },
104
+ "$defs": {
105
+ "blocked_actions": {
106
+ "type": "array",
107
+ "items": {
108
+ "enum": [
109
+ "automatic_claims",
110
+ "automatic_pull_requests",
111
+ "automatic_issue_comments",
112
+ "mass_outreach",
113
+ "ranking_by_money_only"
114
+ ]
115
+ }
116
+ },
117
+ "safe_requirements": {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": [
121
+ "network_required",
122
+ "github_write_permission_required",
123
+ "external_model_required",
124
+ "billing_required"
125
+ ],
126
+ "properties": {
127
+ "network_required": {
128
+ "const": false
129
+ },
130
+ "github_write_permission_required": {
131
+ "const": false
132
+ },
133
+ "external_model_required": {
134
+ "const": false
135
+ },
136
+ "billing_required": {
137
+ "const": false
138
+ }
139
+ }
140
+ },
141
+ "filters": {
142
+ "type": "object",
143
+ "required": [
144
+ "profile",
145
+ "platform",
146
+ "language",
147
+ "min_usd",
148
+ "opportunity_state",
149
+ "risk_level"
150
+ ],
151
+ "properties": {
152
+ "profile": {
153
+ "oneOf": [
154
+ {
155
+ "type": "null"
156
+ },
157
+ {
158
+ "$ref": "#/$defs/client_profile"
159
+ }
160
+ ]
161
+ },
162
+ "platform": {
163
+ "type": ["string", "null"]
164
+ },
165
+ "language": {
166
+ "type": ["string", "null"]
167
+ },
168
+ "min_usd": {
169
+ "type": ["number", "null"]
170
+ },
171
+ "opportunity_state": {
172
+ "type": ["string", "null"]
173
+ },
174
+ "risk_level": {
175
+ "type": ["string", "null"]
176
+ }
177
+ }
178
+ },
179
+ "client_profile": {
180
+ "type": "object",
181
+ "required": [
182
+ "schema_version",
183
+ "name",
184
+ "languages",
185
+ "min_usd",
186
+ "allowed_opportunity_states",
187
+ "allowed_risk_levels",
188
+ "excluded_risk_flags",
189
+ "read_only"
190
+ ],
191
+ "properties": {
192
+ "schema_version": {
193
+ "const": "patchrail.funded_issues.client_profile.v1"
194
+ },
195
+ "read_only": {
196
+ "const": true
197
+ }
198
+ }
199
+ },
200
+ "executive_summary": {
201
+ "type": "object",
202
+ "additionalProperties": false,
203
+ "required": [
204
+ "reviewed",
205
+ "go",
206
+ "watchlist",
207
+ "no_go",
208
+ "actionable_percent",
209
+ "top_recommendation",
210
+ "dominant_no_go_reason"
211
+ ],
212
+ "properties": {
213
+ "reviewed": {
214
+ "type": "integer",
215
+ "minimum": 0
216
+ },
217
+ "go": {
218
+ "type": "integer",
219
+ "minimum": 0
220
+ },
221
+ "watchlist": {
222
+ "type": "integer",
223
+ "minimum": 0
224
+ },
225
+ "no_go": {
226
+ "type": "integer",
227
+ "minimum": 0
228
+ },
229
+ "actionable_percent": {
230
+ "type": "number",
231
+ "minimum": 0,
232
+ "maximum": 100
233
+ },
234
+ "top_recommendation": {
235
+ "type": ["string", "null"]
236
+ },
237
+ "dominant_no_go_reason": {
238
+ "oneOf": [
239
+ {
240
+ "type": "null"
241
+ },
242
+ {
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "required": ["reason_code", "count", "of_total"],
246
+ "properties": {
247
+ "reason_code": {
248
+ "type": "string"
249
+ },
250
+ "count": {
251
+ "type": "integer",
252
+ "minimum": 1
253
+ },
254
+ "of_total": {
255
+ "type": "integer",
256
+ "minimum": 0
257
+ }
258
+ }
259
+ }
260
+ ]
261
+ }
262
+ }
263
+ },
264
+ "recommendation": {
265
+ "type": "object",
266
+ "additionalProperties": false,
267
+ "required": [
268
+ "reference",
269
+ "title",
270
+ "url",
271
+ "platform",
272
+ "language",
273
+ "payout",
274
+ "state",
275
+ "maintainer_activity",
276
+ "scope",
277
+ "risk",
278
+ "effort",
279
+ "recommended_next_step",
280
+ "confidence",
281
+ "decision"
282
+ ],
283
+ "properties": {
284
+ "reference": {
285
+ "type": "string"
286
+ },
287
+ "title": {
288
+ "type": "string"
289
+ },
290
+ "url": {
291
+ "type": "string"
292
+ },
293
+ "platform": {
294
+ "type": "string"
295
+ },
296
+ "language": {
297
+ "type": ["string", "null"]
298
+ },
299
+ "payout": {
300
+ "type": "string"
301
+ },
302
+ "state": {
303
+ "type": "string"
304
+ },
305
+ "maintainer_activity": {
306
+ "type": "string"
307
+ },
308
+ "scope": {
309
+ "type": "string"
310
+ },
311
+ "risk": {
312
+ "type": "string"
313
+ },
314
+ "effort": {
315
+ "type": ["string", "null"]
316
+ },
317
+ "recommended_next_step": {
318
+ "type": "string"
319
+ },
320
+ "confidence": {
321
+ "type": "number",
322
+ "minimum": 0,
323
+ "maximum": 1
324
+ },
325
+ "decision": {
326
+ "enum": ["Go", "Watchlist"]
327
+ }
328
+ }
329
+ },
330
+ "watchlist_row": {
331
+ "type": "object",
332
+ "additionalProperties": false,
333
+ "required": [
334
+ "reference",
335
+ "title",
336
+ "url",
337
+ "payout",
338
+ "blocker",
339
+ "trigger_to_promote"
340
+ ],
341
+ "properties": {
342
+ "reference": {
343
+ "type": "string"
344
+ },
345
+ "title": {
346
+ "type": "string"
347
+ },
348
+ "url": {
349
+ "type": "string"
350
+ },
351
+ "payout": {
352
+ "type": "string"
353
+ },
354
+ "blocker": {
355
+ "type": "string"
356
+ },
357
+ "trigger_to_promote": {
358
+ "type": "string"
359
+ }
360
+ }
361
+ },
362
+ "no_go_row": {
363
+ "type": "object",
364
+ "additionalProperties": false,
365
+ "required": [
366
+ "reference",
367
+ "title",
368
+ "url",
369
+ "payout",
370
+ "reason_code",
371
+ "reason_codes",
372
+ "evidence"
373
+ ],
374
+ "properties": {
375
+ "reference": {
376
+ "type": "string"
377
+ },
378
+ "title": {
379
+ "type": "string"
380
+ },
381
+ "url": {
382
+ "type": "string"
383
+ },
384
+ "payout": {
385
+ "type": "string"
386
+ },
387
+ "reason_code": {
388
+ "type": "string"
389
+ },
390
+ "reason_codes": {
391
+ "type": "array",
392
+ "items": {
393
+ "type": "string"
394
+ }
395
+ },
396
+ "evidence": {
397
+ "type": "string"
398
+ }
399
+ }
400
+ },
401
+ "no_go_moat_evidence": {
402
+ "type": "object",
403
+ "additionalProperties": false,
404
+ "required": [
405
+ "raw_results_reviewed",
406
+ "in_scope_reviewed",
407
+ "high_risk_or_excluded",
408
+ "missing_contribution_guidelines",
409
+ "ambiguous_scope",
410
+ "spam_attractive",
411
+ "funding_unknown",
412
+ "stale_or_closed",
413
+ "final_go_candidates"
414
+ ],
415
+ "properties": {
416
+ "raw_results_reviewed": {
417
+ "type": "integer",
418
+ "minimum": 0
419
+ },
420
+ "in_scope_reviewed": {
421
+ "type": "integer",
422
+ "minimum": 0
423
+ },
424
+ "high_risk_or_excluded": {
425
+ "type": "integer",
426
+ "minimum": 0
427
+ },
428
+ "missing_contribution_guidelines": {
429
+ "type": "integer",
430
+ "minimum": 0
431
+ },
432
+ "ambiguous_scope": {
433
+ "type": "integer",
434
+ "minimum": 0
435
+ },
436
+ "spam_attractive": {
437
+ "type": "integer",
438
+ "minimum": 0
439
+ },
440
+ "funding_unknown": {
441
+ "type": "integer",
442
+ "minimum": 0
443
+ },
444
+ "stale_or_closed": {
445
+ "type": "integer",
446
+ "minimum": 0
447
+ },
448
+ "final_go_candidates": {
449
+ "type": "integer",
450
+ "minimum": 0
451
+ }
452
+ }
453
+ },
454
+ "patterns_observed": {
455
+ "type": "object",
456
+ "additionalProperties": false,
457
+ "required": [
458
+ "no_go_reason_code_counts",
459
+ "go_platform_counts",
460
+ "go_language_counts",
461
+ "no_go_platform_counts",
462
+ "moat_highlights"
463
+ ],
464
+ "properties": {
465
+ "no_go_reason_code_counts": {
466
+ "type": "object",
467
+ "additionalProperties": {
468
+ "type": "integer",
469
+ "minimum": 0
470
+ }
471
+ },
472
+ "go_platform_counts": {
473
+ "type": "object",
474
+ "additionalProperties": {
475
+ "type": "integer",
476
+ "minimum": 0
477
+ }
478
+ },
479
+ "go_language_counts": {
480
+ "type": "object",
481
+ "additionalProperties": {
482
+ "type": "integer",
483
+ "minimum": 0
484
+ }
485
+ },
486
+ "no_go_platform_counts": {
487
+ "type": "object",
488
+ "additionalProperties": {
489
+ "type": "integer",
490
+ "minimum": 0
491
+ }
492
+ },
493
+ "moat_highlights": {
494
+ "type": "object",
495
+ "additionalProperties": false,
496
+ "required": [
497
+ "high_risk_or_excluded",
498
+ "funding_unknown",
499
+ "ambiguous_scope",
500
+ "stale_or_closed"
501
+ ],
502
+ "properties": {
503
+ "high_risk_or_excluded": {
504
+ "type": "integer",
505
+ "minimum": 0
506
+ },
507
+ "funding_unknown": {
508
+ "type": "integer",
509
+ "minimum": 0
510
+ },
511
+ "ambiguous_scope": {
512
+ "type": "integer",
513
+ "minimum": 0
514
+ },
515
+ "stale_or_closed": {
516
+ "type": "integer",
517
+ "minimum": 0
518
+ }
519
+ }
520
+ }
521
+ }
522
+ }
523
+ }
524
+ }