Commit a10c15c
committed
Load and wire validator plugins; identify them in reports; improve test file handling
Loading and wiring:
- validate.py: add load_validation_plugins(), thread plugin_validators
into validate_test_resources() and validate_transform_output()
- postprocess.py: instantiate plugin validators at startup, pass them
through the validate/transform calls; delete legacy .transforms-sandbox
on startup instead of renaming it (venvs have hardcoded absolute
shebangs that break on rename); fix missing _rel import; add shutil import
- validation/plugin.py: PluginValidator class — subprocess-based
execution, per-class venv management, mime-type/extension matching
Plugin identification in reports:
- Every entry emitted by a plugin now carries payload['plugin'] =
'module.ClassName', making the source identifiable in all report formats
- validation/__init__.py: write_text() groups PLUGIN section entries with
'--- Plugin: ... ---' sub-headers on class transitions
- report.html.mako: render a per-plugin heading in the Plugin section
using a mutable state container to track transitions across loop
iterations; fix subsection lookup (payload keys are top-level in the
template dict, not nested under 'payload')
Test file handling improvements:
- validate.py: replace the hard-coded .json/.jsonld/.ttl extension filter
for tests/ directory files with fn.is_file() — validators self-filter
via _matches(); files no validator claims are silently dropped
- Remove the same extension filter from tests.yaml extra resources
- Add media-type field support for tests.yaml entries, allowing explicit
MIME type declaration when the file extension is ambiguous or absent
- tests.schema.yaml: document the new media-type property1 parent ffe16b0 commit a10c15c
6 files changed
Lines changed: 411 additions & 14 deletions
File tree
- ogc/bblocks
- schemas
- validation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
32 | | - | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
61 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| 76 | + | |
70 | 77 | | |
71 | | - | |
| 78 | + | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
151 | 159 | | |
152 | 160 | | |
153 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
154 | 183 | | |
155 | 184 | | |
156 | 185 | | |
| |||
234 | 263 | | |
235 | 264 | | |
236 | 265 | | |
237 | | - | |
| 266 | + | |
| 267 | + | |
238 | 268 | | |
239 | 269 | | |
240 | 270 | | |
| |||
480 | 510 | | |
481 | 511 | | |
482 | 512 | | |
483 | | - | |
| 513 | + | |
| 514 | + | |
484 | 515 | | |
485 | 516 | | |
486 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
31 | 36 | | |
32 | 37 | | |
33 | 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 | + | |
34 | 105 | | |
35 | 106 | | |
36 | 107 | | |
| |||
158 | 229 | | |
159 | 230 | | |
160 | 231 | | |
161 | | - | |
| 232 | + | |
162 | 233 | | |
163 | 234 | | |
164 | 235 | | |
| |||
167 | 238 | | |
168 | 239 | | |
169 | 240 | | |
170 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
171 | 244 | | |
172 | 245 | | |
173 | 246 | | |
| |||
203 | 276 | | |
204 | 277 | | |
205 | 278 | | |
206 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
207 | 283 | | |
208 | 284 | | |
209 | 285 | | |
| |||
245 | 321 | | |
246 | 322 | | |
247 | 323 | | |
| 324 | + | |
248 | 325 | | |
249 | 326 | | |
250 | 327 | | |
| |||
259 | 336 | | |
260 | 337 | | |
261 | 338 | | |
| 339 | + | |
262 | 340 | | |
263 | 341 | | |
264 | 342 | | |
| |||
276 | 354 | | |
277 | 355 | | |
278 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
279 | 360 | | |
280 | 361 | | |
281 | 362 | | |
| |||
295 | 376 | | |
296 | 377 | | |
297 | 378 | | |
298 | | - | |
| 379 | + | |
| 380 | + | |
299 | 381 | | |
300 | 382 | | |
301 | 383 | | |
| |||
313 | 395 | | |
314 | 396 | | |
315 | 397 | | |
| 398 | + | |
316 | 399 | | |
317 | 400 | | |
318 | 401 | | |
319 | 402 | | |
320 | 403 | | |
321 | | - | |
| 404 | + | |
322 | 405 | | |
323 | 406 | | |
324 | 407 | | |
| |||
328 | 411 | | |
329 | 412 | | |
330 | 413 | | |
| 414 | + | |
| 415 | + | |
331 | 416 | | |
332 | 417 | | |
333 | 418 | | |
334 | 419 | | |
335 | 420 | | |
336 | 421 | | |
337 | 422 | | |
338 | | - | |
339 | | - | |
340 | 423 | | |
341 | 424 | | |
342 | 425 | | |
343 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
344 | 430 | | |
345 | 431 | | |
346 | 432 | | |
| |||
349 | 435 | | |
350 | 436 | | |
351 | 437 | | |
352 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
353 | 441 | | |
354 | 442 | | |
355 | 443 | | |
| |||
406 | 494 | | |
407 | 495 | | |
408 | 496 | | |
| 497 | + | |
| 498 | + | |
409 | 499 | | |
410 | 500 | | |
411 | 501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
103 | 110 | | |
104 | 111 | | |
105 | 112 | | |
| |||
0 commit comments