@connectci/xdmod-charts 0.0.0-stage → 0.3.0

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 (81) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -2
  3. package/dist/caption.d.ts +68 -0
  4. package/dist/caption.js +118 -0
  5. package/dist/csv.d.ts +22 -0
  6. package/dist/csv.js +95 -0
  7. package/dist/fixtures.d.ts +58 -0
  8. package/dist/fixtures.js +1 -0
  9. package/dist/format.d.ts +6 -0
  10. package/dist/format.js +39 -0
  11. package/dist/generated/palette.d.ts +4 -0
  12. package/dist/generated/palette.js +23 -0
  13. package/dist/generated/statistics.d.ts +6 -0
  14. package/dist/generated/statistics.js +217 -0
  15. package/dist/index.d.ts +13 -0
  16. package/dist/index.js +8 -0
  17. package/dist/measure.d.ts +7 -0
  18. package/dist/measure.js +14 -0
  19. package/dist/palette.d.ts +11 -0
  20. package/dist/palette.js +19 -0
  21. package/dist/parse.d.ts +3 -0
  22. package/dist/parse.js +82 -0
  23. package/dist/payload.d.ts +81 -0
  24. package/dist/payload.js +1 -0
  25. package/dist/view.d.ts +58 -0
  26. package/dist/view.js +243 -0
  27. package/fixtures/README.md +13 -0
  28. package/fixtures/aggregate-empty.json +85 -0
  29. package/fixtures/aggregate-fills-empty-buckets.json +118 -0
  30. package/fixtures/aggregate-has-more-others-count.json +103 -0
  31. package/fixtures/aggregate-incomplete-with-probe-day.json +108 -0
  32. package/fixtures/aggregate-jobs-by-resource.json +66 -0
  33. package/fixtures/aggregate-marks-resources-that-stop.json +125 -0
  34. package/fixtures/aggregate-no-fill-for-average.json +115 -0
  35. package/fixtures/aggregate-no-fill-incomplete-buckets.json +110 -0
  36. package/fixtures/aggregate-no-fill-when-bucket-filtered.json +114 -0
  37. package/fixtures/aggregate-no-fill-when-more.json +110 -0
  38. package/fixtures/aggregate-no-fill-with-offset.json +110 -0
  39. package/fixtures/aggregate-nominal-not-reordered.json +107 -0
  40. package/fixtures/aggregate-offset-page.json +103 -0
  41. package/fixtures/aggregate-ordered-bucket-order.json +116 -0
  42. package/fixtures/aggregate-probe-reaches-end.json +108 -0
  43. package/fixtures/aggregate-unknown-bucket-last.json +115 -0
  44. package/fixtures/aggregate-unordered.json +103 -0
  45. package/fixtures/average-leaves-gaps.json +125 -0
  46. package/fixtures/calendar-december-into-january.json +113 -0
  47. package/fixtures/calendar-range-ends-at-month-end.json +108 -0
  48. package/fixtures/cpu-hours-by-resource-incomplete.json +125 -0
  49. package/fixtures/early-end-average-by-resource-not-filled.json +147 -0
  50. package/fixtures/early-end-average-other-dimension.json +144 -0
  51. package/fixtures/early-end-daily-by-queue.json +180 -0
  52. package/fixtures/early-end-daily-series-stops.json +139 -0
  53. package/fixtures/early-end-day-inside-last-period.json +147 -0
  54. package/fixtures/early-end-fill-stops-at-last-day.json +145 -0
  55. package/fixtures/early-end-fills-to-resource-last-day.json +149 -0
  56. package/fixtures/early-end-other-dimension-never-filled.json +145 -0
  57. package/fixtures/early-end-probe-window-too-short.json +144 -0
  58. package/fixtures/early-end-resource-retired.json +144 -0
  59. package/fixtures/early-end-several-resources.json +205 -0
  60. package/fixtures/early-end-without-probe.json +140 -0
  61. package/fixtures/label-stripped-from-description.json +95 -0
  62. package/fixtures/no-series-values.json +86 -0
  63. package/fixtures/partial-last-day.json +119 -0
  64. package/fixtures/partial-last-month.json +122 -0
  65. package/fixtures/probe-day-after-range.json +113 -0
  66. package/fixtures/probe-day-inside-last-month.json +113 -0
  67. package/fixtures/probe-day-last-day-of-period.json +113 -0
  68. package/fixtures/rank-prefixes-on-series.json +130 -0
  69. package/fixtures/series-ended-before-probe-day.json +188 -0
  70. package/fixtures/timeseries-complete-last-period.json +113 -0
  71. package/fixtures/timeseries-month-gaps.json +121 -0
  72. package/fixtures/timeseries-more-series-than-palette.json +328 -0
  73. package/fixtures/warnings-all-three.json +104 -0
  74. package/fixtures/week-total-incomplete-last.json +135 -0
  75. package/fixtures/week-total-midweek-end.json +130 -0
  76. package/fixtures/week-total-midweek-start.json +129 -0
  77. package/package.json +32 -4
  78. package/rules/README.md +29 -0
  79. package/rules/palette.json +4 -0
  80. package/rules/statistics.json +217 -0
  81. package/schema/chart-payload.v1.json +320 -0
@@ -0,0 +1,144 @@
1
+ {
2
+ "description": "A probe that began after the series' last period ended can't say why it stopped: source series.",
3
+ "producers": [
4
+ "ts",
5
+ "py"
6
+ ],
7
+ "input": {
8
+ "request": {
9
+ "realm": "Jobs",
10
+ "statistic": "job_count",
11
+ "group_by": "resource",
12
+ "dataset_type": "timeseries",
13
+ "start_date": "2026-08-01",
14
+ "end_date": "2026-10-31",
15
+ "filters_notes": [],
16
+ "dimension_filtered": false,
17
+ "offset": 0,
18
+ "limit": 10,
19
+ "unit": "Month"
20
+ },
21
+ "label": "Number of Jobs Ended",
22
+ "description": "Jobs run",
23
+ "today": "2026-11-09",
24
+ "others_count": 0,
25
+ "has_more": false,
26
+ "latest_data_day": null,
27
+ "resource_days": {
28
+ "since": "2026-10-01",
29
+ "days": {
30
+ "Bridges 2 RM": "2026-10-31"
31
+ }
32
+ },
33
+ "link": "https://xdmod.example/chart",
34
+ "time_zone": "America/New_York",
35
+ "instance": {
36
+ "name": "ACCESS XDMoD",
37
+ "url": "https://xdmod.access-ci.org"
38
+ },
39
+ "series": [
40
+ {
41
+ "name": "Bridges 2 RM",
42
+ "values": {
43
+ "2026-08-01": 1,
44
+ "2026-09-01": 2,
45
+ "2026-10-01": 3
46
+ }
47
+ },
48
+ {
49
+ "name": "Old RM",
50
+ "values": {
51
+ "2026-08-01": 1
52
+ }
53
+ }
54
+ ]
55
+ },
56
+ "expected": {
57
+ "version": 1,
58
+ "realm": "Jobs",
59
+ "statistic": "job_count",
60
+ "group_by": "resource",
61
+ "dataset_type": "timeseries",
62
+ "unit": "Month",
63
+ "requested": {
64
+ "start": "2026-08-01",
65
+ "end": "2026-10-31"
66
+ },
67
+ "counted": {
68
+ "start": "2026-08-01",
69
+ "end": "2026-10-31"
70
+ },
71
+ "last_period_incomplete": false,
72
+ "measure": {
73
+ "label": "Number of Jobs Ended",
74
+ "description": "Jobs run",
75
+ "kind": "total",
76
+ "missing": "zero",
77
+ "unit": "jobs"
78
+ },
79
+ "dimension": {
80
+ "name": "resource",
81
+ "ordered": false
82
+ },
83
+ "filters": {
84
+ "notes": []
85
+ },
86
+ "time_basis": {
87
+ "zone": "America/New_York"
88
+ },
89
+ "instance": {
90
+ "name": "ACCESS XDMoD",
91
+ "url": "https://xdmod.access-ci.org"
92
+ },
93
+ "warnings": [],
94
+ "offset": 0,
95
+ "data_through": "2026-10-01",
96
+ "data_through_precision": "period",
97
+ "others_count": 0,
98
+ "last_data_period_partial": false,
99
+ "has_more": false,
100
+ "ranked_by": "value",
101
+ "link": "https://xdmod.example/chart",
102
+ "source": "XDMoD",
103
+ "retrieved": "2026-11-09",
104
+ "series": [
105
+ {
106
+ "name": "Bridges 2 RM",
107
+ "points": [
108
+ {
109
+ "start": "2026-08-01",
110
+ "value": 1
111
+ },
112
+ {
113
+ "start": "2026-09-01",
114
+ "value": 2
115
+ },
116
+ {
117
+ "start": "2026-10-01",
118
+ "value": 3
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "name": "Old RM",
124
+ "points": [
125
+ {
126
+ "start": "2026-08-01",
127
+ "value": 1
128
+ },
129
+ {
130
+ "start": "2026-09-01",
131
+ "value": null
132
+ },
133
+ {
134
+ "start": "2026-10-01",
135
+ "value": null
136
+ }
137
+ ],
138
+ "data_through": "2026-08-01",
139
+ "data_through_precision": "period",
140
+ "data_through_source": "series"
141
+ }
142
+ ]
143
+ }
144
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "description": "A resource the probe never saw, whose last period ended after the probe began: it stopped there, source resource.",
3
+ "producers": [
4
+ "ts",
5
+ "py"
6
+ ],
7
+ "input": {
8
+ "request": {
9
+ "realm": "Jobs",
10
+ "statistic": "job_count",
11
+ "group_by": "resource",
12
+ "dataset_type": "timeseries",
13
+ "start_date": "2026-08-01",
14
+ "end_date": "2026-10-31",
15
+ "filters_notes": [],
16
+ "dimension_filtered": false,
17
+ "offset": 0,
18
+ "limit": 10,
19
+ "unit": "Month"
20
+ },
21
+ "label": "Number of Jobs Ended",
22
+ "description": "Jobs run",
23
+ "today": "2026-11-09",
24
+ "others_count": 0,
25
+ "has_more": false,
26
+ "latest_data_day": null,
27
+ "resource_days": {
28
+ "since": "2026-08-15",
29
+ "days": {
30
+ "Bridges 2 RM": "2026-10-31"
31
+ }
32
+ },
33
+ "link": "https://xdmod.example/chart",
34
+ "time_zone": "America/New_York",
35
+ "instance": {
36
+ "name": "ACCESS XDMoD",
37
+ "url": "https://xdmod.access-ci.org"
38
+ },
39
+ "series": [
40
+ {
41
+ "name": "Bridges 2 RM",
42
+ "values": {
43
+ "2026-08-01": 1,
44
+ "2026-09-01": 2,
45
+ "2026-10-01": 3
46
+ }
47
+ },
48
+ {
49
+ "name": "Retired RM",
50
+ "values": {
51
+ "2026-08-01": 1
52
+ }
53
+ }
54
+ ]
55
+ },
56
+ "expected": {
57
+ "version": 1,
58
+ "realm": "Jobs",
59
+ "statistic": "job_count",
60
+ "group_by": "resource",
61
+ "dataset_type": "timeseries",
62
+ "unit": "Month",
63
+ "requested": {
64
+ "start": "2026-08-01",
65
+ "end": "2026-10-31"
66
+ },
67
+ "counted": {
68
+ "start": "2026-08-01",
69
+ "end": "2026-10-31"
70
+ },
71
+ "last_period_incomplete": false,
72
+ "measure": {
73
+ "label": "Number of Jobs Ended",
74
+ "description": "Jobs run",
75
+ "kind": "total",
76
+ "missing": "zero",
77
+ "unit": "jobs"
78
+ },
79
+ "dimension": {
80
+ "name": "resource",
81
+ "ordered": false
82
+ },
83
+ "filters": {
84
+ "notes": []
85
+ },
86
+ "time_basis": {
87
+ "zone": "America/New_York"
88
+ },
89
+ "instance": {
90
+ "name": "ACCESS XDMoD",
91
+ "url": "https://xdmod.access-ci.org"
92
+ },
93
+ "warnings": [],
94
+ "offset": 0,
95
+ "data_through": "2026-10-01",
96
+ "data_through_precision": "period",
97
+ "others_count": 0,
98
+ "last_data_period_partial": false,
99
+ "has_more": false,
100
+ "ranked_by": "value",
101
+ "link": "https://xdmod.example/chart",
102
+ "source": "XDMoD",
103
+ "retrieved": "2026-11-09",
104
+ "series": [
105
+ {
106
+ "name": "Bridges 2 RM",
107
+ "points": [
108
+ {
109
+ "start": "2026-08-01",
110
+ "value": 1
111
+ },
112
+ {
113
+ "start": "2026-09-01",
114
+ "value": 2
115
+ },
116
+ {
117
+ "start": "2026-10-01",
118
+ "value": 3
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "name": "Retired RM",
124
+ "points": [
125
+ {
126
+ "start": "2026-08-01",
127
+ "value": 1
128
+ },
129
+ {
130
+ "start": "2026-09-01",
131
+ "value": null
132
+ },
133
+ {
134
+ "start": "2026-10-01",
135
+ "value": null
136
+ }
137
+ ],
138
+ "data_through": "2026-08-01",
139
+ "data_through_precision": "period",
140
+ "data_through_source": "resource"
141
+ }
142
+ ]
143
+ }
144
+ }
@@ -0,0 +1,205 @@
1
+ {
2
+ "description": "Several resources stop on different days: each gets its own marker.",
3
+ "producers": [
4
+ "ts",
5
+ "py"
6
+ ],
7
+ "input": {
8
+ "request": {
9
+ "realm": "Jobs",
10
+ "statistic": "job_count",
11
+ "group_by": "resource",
12
+ "dataset_type": "timeseries",
13
+ "start_date": "2026-08-01",
14
+ "end_date": "2026-10-31",
15
+ "filters_notes": [],
16
+ "dimension_filtered": false,
17
+ "offset": 0,
18
+ "limit": 10,
19
+ "unit": "Month"
20
+ },
21
+ "label": "Number of Jobs Ended",
22
+ "description": "Jobs run",
23
+ "today": "2026-11-09",
24
+ "others_count": 0,
25
+ "has_more": false,
26
+ "latest_data_day": null,
27
+ "resource_days": {
28
+ "since": "2026-07-13",
29
+ "days": {
30
+ "Bridges 2 RM": "2026-10-31",
31
+ "Anvil": "2026-10-30",
32
+ "Delta": "2026-10-30",
33
+ "Expanse": "2026-10-19"
34
+ }
35
+ },
36
+ "link": "https://xdmod.example/chart",
37
+ "time_zone": "America/New_York",
38
+ "instance": {
39
+ "name": "ACCESS XDMoD",
40
+ "url": "https://xdmod.access-ci.org"
41
+ },
42
+ "series": [
43
+ {
44
+ "name": "Bridges 2 RM",
45
+ "values": {
46
+ "2026-08-01": 1,
47
+ "2026-09-01": 2,
48
+ "2026-10-01": 3
49
+ }
50
+ },
51
+ {
52
+ "name": "Anvil",
53
+ "values": {
54
+ "2026-08-01": 1,
55
+ "2026-09-01": 2,
56
+ "2026-10-01": 3
57
+ }
58
+ },
59
+ {
60
+ "name": "Delta",
61
+ "values": {
62
+ "2026-08-01": 1,
63
+ "2026-09-01": 2,
64
+ "2026-10-01": 3
65
+ }
66
+ },
67
+ {
68
+ "name": "Expanse",
69
+ "values": {
70
+ "2026-08-01": 1,
71
+ "2026-09-01": 2,
72
+ "2026-10-01": 3
73
+ }
74
+ }
75
+ ]
76
+ },
77
+ "expected": {
78
+ "version": 1,
79
+ "realm": "Jobs",
80
+ "statistic": "job_count",
81
+ "group_by": "resource",
82
+ "dataset_type": "timeseries",
83
+ "unit": "Month",
84
+ "requested": {
85
+ "start": "2026-08-01",
86
+ "end": "2026-10-31"
87
+ },
88
+ "counted": {
89
+ "start": "2026-08-01",
90
+ "end": "2026-10-31"
91
+ },
92
+ "last_period_incomplete": false,
93
+ "measure": {
94
+ "label": "Number of Jobs Ended",
95
+ "description": "Jobs run",
96
+ "kind": "total",
97
+ "missing": "zero",
98
+ "unit": "jobs"
99
+ },
100
+ "dimension": {
101
+ "name": "resource",
102
+ "ordered": false
103
+ },
104
+ "filters": {
105
+ "notes": []
106
+ },
107
+ "time_basis": {
108
+ "zone": "America/New_York"
109
+ },
110
+ "instance": {
111
+ "name": "ACCESS XDMoD",
112
+ "url": "https://xdmod.access-ci.org"
113
+ },
114
+ "warnings": [],
115
+ "offset": 0,
116
+ "data_through": "2026-10-01",
117
+ "data_through_precision": "period",
118
+ "others_count": 0,
119
+ "last_data_period_partial": false,
120
+ "has_more": false,
121
+ "ranked_by": "value",
122
+ "link": "https://xdmod.example/chart",
123
+ "source": "XDMoD",
124
+ "retrieved": "2026-11-09",
125
+ "series": [
126
+ {
127
+ "name": "Bridges 2 RM",
128
+ "points": [
129
+ {
130
+ "start": "2026-08-01",
131
+ "value": 1
132
+ },
133
+ {
134
+ "start": "2026-09-01",
135
+ "value": 2
136
+ },
137
+ {
138
+ "start": "2026-10-01",
139
+ "value": 3
140
+ }
141
+ ]
142
+ },
143
+ {
144
+ "name": "Anvil",
145
+ "points": [
146
+ {
147
+ "start": "2026-08-01",
148
+ "value": 1
149
+ },
150
+ {
151
+ "start": "2026-09-01",
152
+ "value": 2
153
+ },
154
+ {
155
+ "start": "2026-10-01",
156
+ "value": 3
157
+ }
158
+ ],
159
+ "data_through": "2026-10-30",
160
+ "data_through_precision": "day",
161
+ "data_through_source": "resource"
162
+ },
163
+ {
164
+ "name": "Delta",
165
+ "points": [
166
+ {
167
+ "start": "2026-08-01",
168
+ "value": 1
169
+ },
170
+ {
171
+ "start": "2026-09-01",
172
+ "value": 2
173
+ },
174
+ {
175
+ "start": "2026-10-01",
176
+ "value": 3
177
+ }
178
+ ],
179
+ "data_through": "2026-10-30",
180
+ "data_through_precision": "day",
181
+ "data_through_source": "resource"
182
+ },
183
+ {
184
+ "name": "Expanse",
185
+ "points": [
186
+ {
187
+ "start": "2026-08-01",
188
+ "value": 1
189
+ },
190
+ {
191
+ "start": "2026-09-01",
192
+ "value": 2
193
+ },
194
+ {
195
+ "start": "2026-10-01",
196
+ "value": 3
197
+ }
198
+ ],
199
+ "data_through": "2026-10-19",
200
+ "data_through_precision": "day",
201
+ "data_through_source": "resource"
202
+ }
203
+ ]
204
+ }
205
+ }
@@ -0,0 +1,140 @@
1
+ {
2
+ "description": "The per-resource probe failed: gaps stay, the marker says only that the series has nothing recorded.",
3
+ "producers": [
4
+ "ts",
5
+ "py"
6
+ ],
7
+ "input": {
8
+ "request": {
9
+ "realm": "Jobs",
10
+ "statistic": "job_count",
11
+ "group_by": "resource",
12
+ "dataset_type": "timeseries",
13
+ "start_date": "2026-08-01",
14
+ "end_date": "2026-10-31",
15
+ "filters_notes": [],
16
+ "dimension_filtered": false,
17
+ "offset": 0,
18
+ "limit": 10,
19
+ "unit": "Month"
20
+ },
21
+ "label": "Number of Jobs Ended",
22
+ "description": "Jobs run",
23
+ "today": "2026-11-09",
24
+ "others_count": 0,
25
+ "has_more": false,
26
+ "latest_data_day": null,
27
+ "resource_days": null,
28
+ "link": "https://xdmod.example/chart",
29
+ "time_zone": "America/New_York",
30
+ "instance": {
31
+ "name": "ACCESS XDMoD",
32
+ "url": "https://xdmod.access-ci.org"
33
+ },
34
+ "series": [
35
+ {
36
+ "name": "Bridges 2 RM",
37
+ "values": {
38
+ "2026-08-01": 1,
39
+ "2026-09-01": 2,
40
+ "2026-10-01": 3
41
+ }
42
+ },
43
+ {
44
+ "name": "Anvil",
45
+ "values": {
46
+ "2026-08-01": 1,
47
+ "2026-09-01": 2
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ "expected": {
53
+ "version": 1,
54
+ "realm": "Jobs",
55
+ "statistic": "job_count",
56
+ "group_by": "resource",
57
+ "dataset_type": "timeseries",
58
+ "unit": "Month",
59
+ "requested": {
60
+ "start": "2026-08-01",
61
+ "end": "2026-10-31"
62
+ },
63
+ "counted": {
64
+ "start": "2026-08-01",
65
+ "end": "2026-10-31"
66
+ },
67
+ "last_period_incomplete": false,
68
+ "measure": {
69
+ "label": "Number of Jobs Ended",
70
+ "description": "Jobs run",
71
+ "kind": "total",
72
+ "missing": "zero",
73
+ "unit": "jobs"
74
+ },
75
+ "dimension": {
76
+ "name": "resource",
77
+ "ordered": false
78
+ },
79
+ "filters": {
80
+ "notes": []
81
+ },
82
+ "time_basis": {
83
+ "zone": "America/New_York"
84
+ },
85
+ "instance": {
86
+ "name": "ACCESS XDMoD",
87
+ "url": "https://xdmod.access-ci.org"
88
+ },
89
+ "warnings": [],
90
+ "offset": 0,
91
+ "data_through": "2026-10-01",
92
+ "data_through_precision": "period",
93
+ "others_count": 0,
94
+ "last_data_period_partial": false,
95
+ "has_more": false,
96
+ "ranked_by": "value",
97
+ "link": "https://xdmod.example/chart",
98
+ "source": "XDMoD",
99
+ "retrieved": "2026-11-09",
100
+ "series": [
101
+ {
102
+ "name": "Bridges 2 RM",
103
+ "points": [
104
+ {
105
+ "start": "2026-08-01",
106
+ "value": 1
107
+ },
108
+ {
109
+ "start": "2026-09-01",
110
+ "value": 2
111
+ },
112
+ {
113
+ "start": "2026-10-01",
114
+ "value": 3
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ "name": "Anvil",
120
+ "points": [
121
+ {
122
+ "start": "2026-08-01",
123
+ "value": 1
124
+ },
125
+ {
126
+ "start": "2026-09-01",
127
+ "value": 2
128
+ },
129
+ {
130
+ "start": "2026-10-01",
131
+ "value": null
132
+ }
133
+ ],
134
+ "data_through": "2026-09-01",
135
+ "data_through_precision": "period",
136
+ "data_through_source": "series"
137
+ }
138
+ ]
139
+ }
140
+ }