@prismatic-io/lux 0.0.2-preview.30 → 0.0.2-preview.32

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 (64) hide show
  1. package/lib/assertions/core/command-exits-zero.d.ts +1 -0
  2. package/lib/assertions/core/command-exits-zero.d.ts.map +1 -1
  3. package/lib/assertions/core/file-checks.d.ts +6 -0
  4. package/lib/assertions/core/file-checks.d.ts.map +1 -1
  5. package/lib/assertions/core/json-pointer-equals.d.ts +1 -0
  6. package/lib/assertions/core/json-pointer-equals.d.ts.map +1 -1
  7. package/lib/assertions/core/output-checks.d.ts +3 -0
  8. package/lib/assertions/core/output-checks.d.ts.map +1 -1
  9. package/lib/assertions/core/predicate.d.ts +1 -0
  10. package/lib/assertions/core/predicate.d.ts.map +1 -1
  11. package/lib/assertions/core/resource-checks.d.ts +6 -0
  12. package/lib/assertions/core/resource-checks.d.ts.map +1 -1
  13. package/lib/assertions/rubric/index.d.ts +2 -0
  14. package/lib/assertions/rubric/index.d.ts.map +1 -1
  15. package/lib/cli/output-schemas.d.ts +5 -3
  16. package/lib/cli/output-schemas.d.ts.map +1 -1
  17. package/lib/cli/output-schemas.js +1 -1
  18. package/lib/cli/output-schemas.js.map +1 -1
  19. package/lib/cli/program.d.ts.map +1 -1
  20. package/lib/cli/program.js +2 -1
  21. package/lib/cli/program.js.map +1 -1
  22. package/lib/cli/render/reporter.d.ts.map +1 -1
  23. package/lib/cli/render/reporter.js +9 -2
  24. package/lib/cli/render/reporter.js.map +1 -1
  25. package/lib/core/assertion.d.ts +5 -2
  26. package/lib/core/assertion.d.ts.map +1 -1
  27. package/lib/core/assertion.js +3 -1
  28. package/lib/core/assertion.js.map +1 -1
  29. package/lib/core/case.d.ts +5 -1
  30. package/lib/core/case.d.ts.map +1 -1
  31. package/lib/core/case.js +1 -0
  32. package/lib/core/case.js.map +1 -1
  33. package/lib/core/rubric.d.ts +1 -0
  34. package/lib/core/rubric.d.ts.map +1 -1
  35. package/lib/core/run.d.ts +1 -0
  36. package/lib/core/run.d.ts.map +1 -1
  37. package/lib/orchestrator/compare.d.ts +2 -2
  38. package/lib/orchestrator/compare.d.ts.map +1 -1
  39. package/lib/orchestrator/compare.js +7 -5
  40. package/lib/orchestrator/compare.js.map +1 -1
  41. package/lib/orchestrator/config.d.ts +2 -0
  42. package/lib/orchestrator/config.d.ts.map +1 -1
  43. package/lib/orchestrator/grader-experiment.d.ts +4 -2
  44. package/lib/orchestrator/grader-experiment.d.ts.map +1 -1
  45. package/lib/orchestrator/grading.d.ts.map +1 -1
  46. package/lib/orchestrator/grading.js +27 -31
  47. package/lib/orchestrator/grading.js.map +1 -1
  48. package/lib/orchestrator/list-runs.d.ts.map +1 -1
  49. package/lib/orchestrator/list-runs.js +4 -2
  50. package/lib/orchestrator/list-runs.js.map +1 -1
  51. package/lib/orchestrator/regrade.d.ts +2 -1
  52. package/lib/orchestrator/regrade.d.ts.map +1 -1
  53. package/package.json +1 -1
  54. package/skills/lux-answerer/SKILL.md +1 -1
  55. package/src/cli/output-schemas.ts +1 -1
  56. package/src/cli/program.ts +3 -1
  57. package/src/cli/render/reporter.ts +8 -2
  58. package/src/core/assertion.ts +3 -1
  59. package/src/core/case.ts +5 -1
  60. package/src/orchestrator/compare.ts +7 -5
  61. package/src/orchestrator/grading.ts +39 -28
  62. package/src/orchestrator/list-runs.ts +3 -2
  63. package/viewer/app.css +4 -0
  64. package/viewer/detail.js +14 -8
package/viewer/detail.js CHANGED
@@ -1,3 +1,9 @@
1
+ const assertionPresentation = (assertion) => {
2
+ if (assertion.passed === null) return { className: " informational", mark: "ℹ", tone: "" };
3
+ if (assertion.passed) return { className: " passed", mark: "✓", tone: "tone-positive" };
4
+ return { className: "", mark: "×", tone: "tone-negative" };
5
+ };
6
+
1
7
  import { comparisonBars, compositionFigure, quantizedBar } from "./charts.js";
2
8
  import {
3
9
  badge,
@@ -261,11 +267,11 @@ export const renderRunDetail = (item, detail) => {
261
267
  {
262
268
  key: "regressed",
263
269
  label: "Failed",
264
- value: assertions.filter((assertion) => !assertion.passed).length,
270
+ value: assertions.filter((assertion) => assertion.passed === false).length,
265
271
  },
266
272
  ],
267
273
  `${assertions.filter((assertion) => assertion.passed).length} of ${
268
- assertions.length
274
+ assertions.filter((assertion) => assertion.passed !== null).length
269
275
  } assertions passed`,
270
276
  )}
271
277
  ${
@@ -305,25 +311,25 @@ export const renderRunDetail = (item, detail) => {
305
311
  : ""
306
312
  }
307
313
  <section class="detail-section">
308
- <h3>Judgment <span>${assertions.filter((entry) => entry.passed).length}/${assertions.length} passed</span></h3>
314
+ <h3>Judgment <span>${assertions.filter((entry) => entry.passed).length}/${assertions.filter((entry) => entry.passed !== null).length} passed</span></h3>
309
315
  <div class="assertion-list">
310
316
  ${
311
317
  assertions.length
312
318
  ? assertions
313
319
  .map(
314
320
  (assertion) => `
315
- <article class="assertion${assertion.passed ? " passed" : ""}">
316
- <span class="assertion-mark">${assertion.passed ? "✓" : "×"}</span>
321
+ <article class="assertion${assertionPresentation(assertion).className}">
322
+ <span class="assertion-mark">${assertionPresentation(assertion).mark}</span>
317
323
  <span class="assertion-content">
318
324
  <strong>${escapeHtml(assertion.name)}</strong>
319
325
  <small>${escapeHtml(assertionMeta(assertion))}</small>
320
326
  ${quantizedBar(
321
327
  assertion.score,
322
- assertion.passed ? "tone-positive" : "tone-negative",
328
+ assertionPresentation(assertion).tone,
323
329
  `${assertion.name} scored ${percentage(
324
330
  assertion.score,
325
- )}; threshold ${percentage(assertion.threshold)}`,
326
- assertion.threshold,
331
+ )}${assertion.passed === null ? " (informational)" : `; threshold ${percentage(assertion.threshold)}`}`,
332
+ assertion.passed === null ? null : assertion.threshold,
327
333
  )}
328
334
  ${assertionDiagnostics(assertion)}
329
335
  </span>