@grnsft/if 0.3.2 → 0.3.4

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 (187) hide show
  1. package/.commitlintrc.js +3 -0
  2. package/.env +5 -0
  3. package/.release-it.json +18 -0
  4. package/CONTRIBUTING.md +77 -4
  5. package/README.md +34 -26
  6. package/build/builtins/export-csv-raw.js +4 -4
  7. package/build/builtins/export-csv.js +5 -5
  8. package/build/builtins/export-log.js +26 -2
  9. package/build/builtins/export-yaml.js +3 -3
  10. package/build/config/config.d.ts +3 -3
  11. package/build/config/config.js +23 -27
  12. package/build/config/strings.d.ts +1 -0
  13. package/build/config/strings.js +8 -3
  14. package/build/index.js +23 -14
  15. package/build/lib/environment.d.ts +5 -0
  16. package/build/lib/environment.js +69 -0
  17. package/build/lib/exhaust.d.ts +2 -1
  18. package/build/lib/exhaust.js +11 -9
  19. package/build/lib/initialize.d.ts +2 -2
  20. package/build/lib/initialize.js +5 -5
  21. package/build/lib/load.d.ts +1 -29
  22. package/build/lib/load.js +2 -5
  23. package/build/types/environment.d.ts +18 -0
  24. package/build/types/environment.js +3 -0
  25. package/build/types/manifest.d.ts +1 -0
  26. package/build/types/manifest.js +1 -1
  27. package/build/types/process-args.d.ts +13 -1
  28. package/build/types/process-args.js +1 -1
  29. package/build/util/args.d.ts +3 -5
  30. package/build/util/args.js +14 -10
  31. package/build/util/errors.d.ts +1 -1
  32. package/build/util/errors.js +2 -3
  33. package/build/util/helpers.d.ts +6 -0
  34. package/build/util/helpers.js +9 -3
  35. package/build/util/os-checker.d.ts +7 -0
  36. package/build/util/os-checker.js +97 -0
  37. package/build/util/validations.d.ts +90 -4
  38. package/build/util/validations.js +14 -2
  39. package/coverage/clover.xml +1590 -0
  40. package/coverage/coverage-final.json +50 -0
  41. package/coverage/lcov-report/base.css +224 -0
  42. package/coverage/lcov-report/block-navigation.js +87 -0
  43. package/coverage/lcov-report/builtins/coefficient/index.html +116 -0
  44. package/coverage/lcov-report/builtins/coefficient/index.ts.html +295 -0
  45. package/coverage/lcov-report/builtins/csv-lookup/index.html +116 -0
  46. package/coverage/lcov-report/builtins/csv-lookup/index.ts.html +832 -0
  47. package/coverage/lcov-report/builtins/divide/index.html +116 -0
  48. package/coverage/lcov-report/builtins/divide/index.ts.html +361 -0
  49. package/coverage/lcov-report/builtins/exponent/index.html +116 -0
  50. package/coverage/lcov-report/builtins/exponent/index.ts.html +355 -0
  51. package/coverage/lcov-report/builtins/export-csv-raw.ts.html +553 -0
  52. package/coverage/lcov-report/builtins/export-csv.ts.html +433 -0
  53. package/coverage/lcov-report/builtins/export-log.ts.html +145 -0
  54. package/coverage/lcov-report/builtins/export-yaml.ts.html +184 -0
  55. package/coverage/lcov-report/builtins/group-by.ts.html +364 -0
  56. package/coverage/lcov-report/builtins/index.html +206 -0
  57. package/coverage/lcov-report/builtins/index.ts.html +130 -0
  58. package/coverage/lcov-report/builtins/interpolation/index.html +131 -0
  59. package/coverage/lcov-report/builtins/interpolation/index.ts.html +670 -0
  60. package/coverage/lcov-report/builtins/interpolation/types.ts.html +100 -0
  61. package/coverage/lcov-report/builtins/mock-observations/helpers/common-generator.ts.html +181 -0
  62. package/coverage/lcov-report/builtins/mock-observations/helpers/index.html +131 -0
  63. package/coverage/lcov-report/builtins/mock-observations/helpers/rand-int-generator.ts.html +295 -0
  64. package/coverage/lcov-report/builtins/mock-observations/index.html +116 -0
  65. package/coverage/lcov-report/builtins/mock-observations/index.ts.html +613 -0
  66. package/coverage/lcov-report/builtins/multiply/index.html +116 -0
  67. package/coverage/lcov-report/builtins/multiply/index.ts.html +337 -0
  68. package/coverage/lcov-report/builtins/regex/index.html +116 -0
  69. package/coverage/lcov-report/builtins/regex/index.ts.html +379 -0
  70. package/coverage/lcov-report/builtins/sci/config.ts.html +205 -0
  71. package/coverage/lcov-report/builtins/sci/index.html +116 -0
  72. package/coverage/lcov-report/builtins/sci/index.ts.html +331 -0
  73. package/coverage/lcov-report/builtins/sci-embodied/index.html +116 -0
  74. package/coverage/lcov-report/builtins/sci-embodied/index.ts.html +481 -0
  75. package/coverage/lcov-report/builtins/shell/index.html +116 -0
  76. package/coverage/lcov-report/builtins/shell/index.ts.html +283 -0
  77. package/coverage/lcov-report/builtins/subtract/index.html +116 -0
  78. package/coverage/lcov-report/builtins/subtract/index.ts.html +373 -0
  79. package/coverage/lcov-report/builtins/sum/index.html +116 -0
  80. package/coverage/lcov-report/builtins/sum/index.ts.html +340 -0
  81. package/coverage/lcov-report/builtins/time-sync.ts.html +1459 -0
  82. package/coverage/lcov-report/config/config.ts.html +334 -0
  83. package/coverage/lcov-report/config/index.html +161 -0
  84. package/coverage/lcov-report/config/index.ts.html +94 -0
  85. package/coverage/lcov-report/config/params.ts.html +697 -0
  86. package/coverage/lcov-report/config/strings.ts.html +415 -0
  87. package/coverage/lcov-report/favicon.png +0 -0
  88. package/coverage/lcov-report/index.html +386 -0
  89. package/coverage/lcov-report/lib/aggregate.ts.html +331 -0
  90. package/coverage/lcov-report/lib/compare.ts.html +283 -0
  91. package/coverage/lcov-report/lib/compute.ts.html +391 -0
  92. package/coverage/lcov-report/lib/environment.ts.html +343 -0
  93. package/coverage/lcov-report/lib/exhaust.ts.html +283 -0
  94. package/coverage/lcov-report/lib/index.html +221 -0
  95. package/coverage/lcov-report/lib/initialize.ts.html +388 -0
  96. package/coverage/lcov-report/lib/load.ts.html +268 -0
  97. package/coverage/lcov-report/lib/parameterize.ts.html +283 -0
  98. package/coverage/lcov-report/prettify.css +1 -0
  99. package/coverage/lcov-report/prettify.js +2 -0
  100. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  101. package/coverage/lcov-report/sorter.js +196 -0
  102. package/coverage/lcov-report/types/aggregation.ts.html +94 -0
  103. package/coverage/lcov-report/types/index.html +146 -0
  104. package/coverage/lcov-report/types/interface.ts.html +181 -0
  105. package/coverage/lcov-report/types/parameters.ts.html +106 -0
  106. package/coverage/lcov-report/util/aggregation-helper.ts.html +286 -0
  107. package/coverage/lcov-report/util/args.ts.html +508 -0
  108. package/coverage/lcov-report/util/errors.ts.html +232 -0
  109. package/coverage/lcov-report/util/helpers.ts.html +613 -0
  110. package/coverage/lcov-report/util/index.html +266 -0
  111. package/coverage/lcov-report/util/json.ts.html +115 -0
  112. package/coverage/lcov-report/util/log-memoize.ts.html +145 -0
  113. package/coverage/lcov-report/util/logger.ts.html +151 -0
  114. package/coverage/lcov-report/util/os-checker.ts.html +421 -0
  115. package/coverage/lcov-report/util/plugin-storage.ts.html +199 -0
  116. package/coverage/lcov-report/util/validations.ts.html +526 -0
  117. package/coverage/lcov-report/util/yaml.ts.html +193 -0
  118. package/coverage/lcov.info +2811 -0
  119. package/github-processes.md +10 -0
  120. package/{examples/manifests/pipeline-demo-2.yml → manifests/bugs/aggregation-error-wrong-metric.yml} +8 -34
  121. package/manifests/bugs/azure-importer-ignoring-defaults.yml +61 -0
  122. package/manifests/bugs/azure-importer-incorrect-calculation.yml +56 -0
  123. package/manifests/bugs/initialize-error-no-config.yml +27 -0
  124. package/manifests/bugs/initialize-error-no-path.yml +28 -0
  125. package/manifests/bugs/initialize-error-no-plugins.yml +23 -0
  126. package/manifests/bugs/input-error-missing-duration.yml +21 -0
  127. package/manifests/bugs/pipeline-error-naming-mismatch.yml +28 -0
  128. package/manifests/bugs/pipeline-error-uninitialized-plugin.yml +29 -0
  129. package/{examples/manifests/boavizta-pipeline.yml → manifests/bugs/pipeline-ordering-error.yml} +7 -10
  130. package/{examples/manifests → manifests/examples}/basic.yml +3 -2
  131. package/{examples/manifests → manifests/examples}/generics.yml +2 -2
  132. package/{examples/manifests/asim-demo.yml → manifests/examples/mock-cpu-util-to-carbon.yml} +3 -7
  133. package/{examples/manifests → manifests/examples}/nesting.yml +3 -2
  134. package/{examples/manifests → manifests/examples}/pipeline-teads-sci.yml +1 -1
  135. package/{examples/manifests/pipeline-demo.yml → manifests/examples/pipeline-with-aggregate.yml} +2 -2
  136. package/{examples/manifests → manifests/examples}/pipeline-with-mocks.yml +3 -2
  137. package/manifests/features/aggregate-horizontal.yml +44 -0
  138. package/manifests/features/aggregate-vertical.yml +44 -0
  139. package/manifests/features/aggregate.yml +44 -0
  140. package/manifests/integrations/mock-obs-groupby.yml +39 -0
  141. package/manifests/integrations/mock-obs-time-sync.yml +65 -0
  142. package/manifests/plugins/cloud-metadata/failure-invalid-vendor.yaml +21 -0
  143. package/{examples/manifests/cloud-metadata.yml → manifests/plugins/cloud-metadata/success.yml} +2 -1
  144. package/manifests/plugins/coefficient/failure-invalid-config-input-param.yml +24 -0
  145. package/{examples/manifests/coefficient.yml → manifests/plugins/coefficient/success.yml} +2 -1
  146. package/manifests/plugins/divide/failure-invalid-config-denominator.yml +39 -0
  147. package/manifests/plugins/divide/success.yml +39 -0
  148. package/manifests/plugins/groupby/failure-invalid-config-group.yml +47 -0
  149. package/{examples/manifests/group-by.yml → manifests/plugins/groupby/success.yml} +3 -2
  150. package/manifests/plugins/mock-observations/failure-invalid-config-cpu-range.yml +34 -0
  151. package/{examples/manifests/mock-observation.yml → manifests/plugins/mock-observations/success.yml} +2 -1
  152. package/manifests/plugins/multiply/failure-input-parameter-is-missing.yml +24 -0
  153. package/{examples/manifests/multiply.yml → manifests/plugins/multiply/success.yml} +3 -2
  154. package/manifests/plugins/regex/failure-missing-input-param.yml +24 -0
  155. package/{examples/manifests/regex.yml → manifests/plugins/regex/success.yml} +3 -2
  156. package/manifests/plugins/sci/failure-invalid-config-value.yml +28 -0
  157. package/{examples/manifests/sci.yml → manifests/plugins/sci/success.yml} +3 -2
  158. package/manifests/plugins/sci-m/failure-invalid-default-emission-value.yml +24 -0
  159. package/{examples/manifests/sci-m.yml → manifests/plugins/sci-m/success.yml} +2 -1
  160. package/manifests/plugins/shell/failure-invalid-command.yml +21 -0
  161. package/{examples/manifests/shell.yml → manifests/plugins/shell/success.yml} +3 -2
  162. package/manifests/plugins/sum/failure-missing-input-param.yml +24 -0
  163. package/{examples/manifests/sum.yml → manifests/plugins/sum/success.yml} +3 -2
  164. package/manifests/plugins/tdp-finder/failure-missing-input-param.yml +18 -0
  165. package/{examples/manifests/tdp-finder.yml → manifests/plugins/tdp-finder/success.yml} +2 -1
  166. package/manifests/plugins/time-sync/failure-config-start-later-end.yml +34 -0
  167. package/{examples/manifests/time-sync.yml → manifests/plugins/time-sync/success.yml} +4 -2
  168. package/package.json +4 -2
  169. package/src/__tests__/integration/manifest/sci-e.yaml +23 -0
  170. package/examples/manifests/azure-importer.yml +0 -24
  171. package/examples/manifests/basic-demo.yml +0 -70
  172. package/examples/manifests/boavizta-cloud.yml +0 -20
  173. package/examples/manifests/boavizta.yml +0 -26
  174. package/examples/manifests/ccf.yml +0 -20
  175. package/examples/manifests/cloud-metadata-teads.yml +0 -41
  176. package/examples/manifests/co2js.yml +0 -30
  177. package/examples/manifests/csv-export.yml +0 -34
  178. package/examples/manifests/e-mem.yml +0 -21
  179. package/examples/manifests/e-net.yml +0 -22
  180. package/examples/manifests/nesting-demo.yml +0 -89
  181. package/examples/manifests/pipeline-demo-1.yml +0 -85
  182. package/examples/manifests/pipeline-with-generics.yml +0 -152
  183. package/examples/manifests/sci-e.yml +0 -19
  184. package/examples/manifests/sci-o.yml +0 -26
  185. package/examples/manifests/teads-curve.yml +0 -20
  186. package/examples/manifests/watt-time.yml +0 -35
  187. /package/{examples/manifests/divide.yml → manifests/integrations/cloud-metadata-divide-boavizta.yml} +0 -0
@@ -66,6 +66,16 @@ Here are the rules applied to each branch:
66
66
  - On `main` we can be slightly more flexible. It is acceptable to skip QA for PRs that only change typos, documentation or comments. Any changes to source code or tests should be QA approved before merge.
67
67
  - In emergency scenarios where an urgent hotfix is required it might be required to skip QA review on `main` branches - this should only happen with QA authorization so QA can retroactively test as soon as possible.
68
68
 
69
+ ### How to create a release
70
+
71
+ Creating a release of `if`, `if-plugins` or `if-unofficial-plugins` is achieved by following these steps:
72
+
73
+ 1) core team member creates a tagged release on `main`
74
+ 2) new tagged release triggers automatic commit to be pushed to `main` that updates package and lock files that include new version numbers
75
+ 3) `main` branch is manually merged into `release` by core team member
76
+ 4) merging into release triggers automatic new release to be created on npm
77
+
78
+ We use [semantic versioning](https://semver.org/) to number our releases.
69
79
  ## DCO
70
80
 
71
81
  We require contributors to conform to the DCO agreement on our repositories. This means either signing commits or explicitly adding a DCO commit message. This ensures all contributors agree to the conditions imposed by our licenses and adhere to our expected practices. The DCO must be satisfied in order to PRs to be merged.
@@ -1,15 +1,10 @@
1
- name: pipeline-demo
2
- description:
1
+ name: aggregation-error-wrong-metric
2
+ description: a negative test case that fails due to the aggregation feature being passed an incorrect metric
3
3
  tags:
4
4
  aggregation:
5
5
  metrics:
6
- - "carbon"
6
+ - "dummy-param"
7
7
  type: "both"
8
- params:
9
- - name: carbon-plus-energy
10
- description: "sum of energies"
11
- unit: "kWh"
12
- aggregation: sum
13
8
  initialize:
14
9
  plugins:
15
10
  "teads-curve":
@@ -17,14 +12,9 @@ initialize:
17
12
  method: TeadsCurve
18
13
  global-config:
19
14
  interpolation: spline
20
- "sum":
15
+ "sci-e":
21
16
  path: "@grnsft/if-plugins"
22
- method: Sum
23
- global-config:
24
- input-parameters:
25
- - cpu/energy
26
- - network/energy
27
- output-parameter: carbon-plus-energy
17
+ method: SciE
28
18
  "sci-m":
29
19
  path: "@grnsft/if-plugins"
30
20
  method: SciM
@@ -53,7 +43,7 @@ tree:
53
43
  child-1:
54
44
  pipeline:
55
45
  - teads-curve
56
- - sum
46
+ - sci-e
57
47
  - sci-m
58
48
  - sci-o
59
49
  - time-sync
@@ -78,33 +68,25 @@ tree:
78
68
  cloud/region: uk-west
79
69
  duration: 1
80
70
  cpu/utilization: 10
81
- network/energy: 10
82
- energy: 5
83
71
  - timestamp: "2023-12-12T00:00:01.000Z"
84
72
  duration: 5
85
73
  cpu/utilization: 20
86
74
  cloud/instance-type: A1
87
75
  cloud/region: uk-west
88
- network/energy: 10
89
- energy: 5
90
76
  - timestamp: "2023-12-12T00:00:06.000Z"
91
77
  duration: 7
92
78
  cpu/utilization: 15
93
79
  cloud/instance-type: A1
94
80
  cloud/region: uk-west
95
- network/energy: 10
96
- energy: 5
97
81
  - timestamp: "2023-12-12T00:00:13.000Z"
98
82
  duration: 30
99
83
  cloud/instance-type: A1
100
84
  cloud/region: uk-west
101
85
  cpu/utilization: 15
102
- network/energy: 10
103
- energy: 5
104
86
  child-2:
105
87
  pipeline:
106
88
  - teads-curve
107
- - sum
89
+ - sci-e
108
90
  - sci-m
109
91
  - sci-o
110
92
  - time-sync
@@ -113,7 +95,7 @@ tree:
113
95
  group-by:
114
96
  group:
115
97
  - cloud/region
116
- - instance-type
98
+ - cloud/instance-type
117
99
  defaults:
118
100
  cpu/thermal-design-power: 100
119
101
  grid/carbon-intensity: 800
@@ -129,26 +111,18 @@ tree:
129
111
  cpu/utilization: 30
130
112
  cloud/instance-type: A1
131
113
  cloud/region: uk-west
132
- network/energy: 10
133
- energy: 5
134
114
  - timestamp: "2023-12-12T00:00:01.000Z"
135
115
  duration: 5
136
116
  cpu/utilization: 28
137
117
  cloud/instance-type: A1
138
118
  cloud/region: uk-west
139
- network/energy: 10
140
- energy: 5
141
119
  - timestamp: "2023-12-12T00:00:06.000Z"
142
120
  duration: 7
143
121
  cpu/utilization: 40
144
122
  cloud/instance-type: A1
145
123
  cloud/region: uk-west
146
- network/energy: 10
147
- energy: 5
148
124
  - timestamp: "2023-12-12T00:00:13.000Z"
149
125
  duration: 30
150
126
  cpu/utilization: 33
151
127
  cloud/instance-type: A1
152
128
  cloud/region: uk-west
153
- network/energy: 10
154
- energy: 5
@@ -0,0 +1,61 @@
1
+ name: pipeline-demo
2
+ description: https://github.com/Green-Software-Foundation/if-unofficial-plugins/issues/81
3
+ tags:
4
+ # aggregation:
5
+ # metrics:
6
+ # - "carbon"
7
+ # - "energy"
8
+ #type: "both"
9
+ initialize:
10
+ outputs:
11
+ - yaml
12
+ # - csv
13
+ plugins:
14
+ "azure-importer":
15
+ method: AzureImporter
16
+ path: "@grnsft/if-unofficial-plugins"
17
+ "try-defaults-1":
18
+ path: "@grnsft/if-plugins"
19
+ method: Coefficient
20
+ global-config:
21
+ input-parameter: grid/carbon-intensity
22
+ coefficient: 0.1
23
+ output-parameter: grid/carbon-intensity
24
+ "try-defaults-2":
25
+ path: "@grnsft/if-plugins"
26
+ method: Coefficient
27
+ global-config:
28
+ input-parameter: network/energy
29
+ coefficient: 1000
30
+ output-parameter: network/energy
31
+ "sci-o":
32
+ method: SciO
33
+ path: "@grnsft/if-plugins"
34
+ "group-by":
35
+ path: "builtin"
36
+ method: GroupBy
37
+ tree:
38
+ children:
39
+ web-front: # name this according to the sub-system, e.g. portal, APIs/backend, DB
40
+ pipeline:
41
+ - azure-importer
42
+ #- try-defaults-1
43
+ #- try-defaults-2
44
+ - sci-o
45
+ config:
46
+ group-by:
47
+ group:
48
+ - instance-type
49
+ azure-importer:
50
+ azure-observation-window: 60 min
51
+ azure-observation-aggregation: "average"
52
+ azure-subscription-id: 30b6e171-af2c-4fe6-b00d-d4c70f6291fe
53
+ azure-resource-group: gcf-app_group
54
+ azure-vm-name: gcf-app
55
+ defaults:
56
+ grid/carbon-intensity: 800 # adjust for SG grid
57
+ network/energy: 0.001 # review for naming accuracy
58
+ inputs:
59
+ - timestamp: "2024-04-04T08:00:00.001Z"
60
+ duration: 3600
61
+ energy: 100
@@ -0,0 +1,56 @@
1
+ name: pipeline-demo
2
+ description: https://github.com/Green-Software-Foundation/if-unofficial-plugins/issues/81
3
+ tags: null
4
+ initialize:
5
+ plugins:
6
+ azure-importer:
7
+ path: '@grnsft/if-unofficial-plugins'
8
+ method: AzureImporter
9
+ try-defaults-1:
10
+ path: '@grnsft/if-plugins'
11
+ method: Coefficient
12
+ global-config:
13
+ input-parameter: grid/carbon-intensity
14
+ coefficient: 0.1
15
+ output-parameter: grid/carbon-intensity
16
+ try-defaults-2:
17
+ path: '@grnsft/if-plugins'
18
+ method: Coefficient
19
+ global-config:
20
+ input-parameter: network/energy
21
+ coefficient: 1000
22
+ output-parameter: network/energy
23
+ sci-o:
24
+ path: '@grnsft/if-plugins'
25
+ method: SciO
26
+ group-by:
27
+ path: builtin
28
+ method: GroupBy
29
+ outputs:
30
+ - yaml
31
+ if-version: v0.3.2
32
+ tree:
33
+ children:
34
+ web-front:
35
+ pipeline:
36
+ - azure-importer
37
+ - try-defaults-1
38
+ - try-defaults-2
39
+ config:
40
+ group-by:
41
+ group:
42
+ - instance-type
43
+ azure-importer:
44
+ azure-observation-window: 60 min
45
+ azure-observation-aggregation: average
46
+ azure-subscription-id: 30b6e171-af2c-4fe6-b00d-d4c70f6291fe
47
+ azure-resource-group: gcf-app_group
48
+ azure-vm-name: gcf-app
49
+ defaults:
50
+ grid/carbon-intensity: 800
51
+ network/energy: 0.001
52
+ inputs:
53
+ - timestamp: '2024-04-04T08:00:00.001Z'
54
+ duration: 3600
55
+ energy: 100
56
+
@@ -0,0 +1,27 @@
1
+ name: initialize-error-no-config
2
+ description: a negative test case that fails due to plugin initialization missing some required config
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ teads-curve:
7
+ path: '@grnsft/if-unofficial-plugins'
8
+ method: TeadsCurve
9
+ global-config:
10
+ outputs: ['yaml']
11
+ tree:
12
+ children:
13
+ child-0:
14
+ defaults:
15
+ cpu/thermal-design-power: 100
16
+ pipeline:
17
+ - teads-curve
18
+ inputs:
19
+ - timestamp: 2023-07-06T00:00
20
+ duration: 1
21
+ cpu/utilization: 20
22
+ - timestamp: 2023-07-06T00:01
23
+ duration: 1
24
+ cpu/utilization: 80
25
+ - timestamp: 2023-07-06T00:02
26
+ duration: 1
27
+ cpu/utilization: 20
@@ -0,0 +1,28 @@
1
+ name: initialize-error-no-path
2
+ description: a negative test case that fails because the path is mising in a plugin initialization
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ teads-curve:
7
+ path:
8
+ method: TeadsCurve
9
+ global-config:
10
+ interpolation: spline
11
+ outputs: ['yaml']
12
+ tree:
13
+ children:
14
+ child-0:
15
+ defaults:
16
+ cpu/thermal-design-power: 100
17
+ pipeline:
18
+ - teads-curve
19
+ inputs:
20
+ - timestamp: 2023-07-06T00:00
21
+ duration: 1
22
+ cpu/utilization: 20
23
+ - timestamp: 2023-07-06T00:01
24
+ duration: 1
25
+ cpu/utilization: 80
26
+ - timestamp: 2023-07-06T00:02
27
+ duration: 1
28
+ cpu/utilization: 20
@@ -0,0 +1,23 @@
1
+ name: initialize-error-no-path
2
+ description: a negative test case that fails becuase no plugins are included in the initialize block
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ outputs: ['yaml']
7
+ tree:
8
+ children:
9
+ child-0:
10
+ defaults:
11
+ cpu/thermal-design-power: 100
12
+ pipeline:
13
+ - teads-curve
14
+ inputs:
15
+ - timestamp: 2023-07-06T00:00
16
+ duration: 1
17
+ cpu/utilization: 20
18
+ - timestamp: 2023-07-06T00:01
19
+ duration: 1
20
+ cpu/utilization: 80
21
+ - timestamp: 2023-07-06T00:02
22
+ duration: 1
23
+ cpu/utilization: 20
@@ -0,0 +1,21 @@
1
+ name: input-error-missing-duration
2
+ description: a negative test case that fails due to the required `duration` field being omitted from input data
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ teads-curve:
7
+ path: '@grnsft/if-unofficial-plugins'
8
+ method: TeadsCurve
9
+ global-config:
10
+ interpolation: spline
11
+ outputs: ['yaml']
12
+ tree:
13
+ children:
14
+ child-0:
15
+ defaults:
16
+ cpu/thermal-design-power: 100
17
+ pipeline:
18
+ - teads-curve
19
+ inputs:
20
+ - timestamp: 2023-07-06T00:00
21
+ cpu/utilization: 20
@@ -0,0 +1,28 @@
1
+ name: pipeline-error-naming-mismatch
2
+ description: a negative test case that fails due to the plugin name in the pipeline not matching the name given in initialize
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ teads-curve:
7
+ path: '@grnsft/if-unofficial-plugins'
8
+ method: TeadsCurve
9
+ global-config:
10
+ interpolation: spline
11
+ outputs: ['yaml']
12
+ tree:
13
+ children:
14
+ child-0:
15
+ defaults:
16
+ cpu/thermal-design-power: 100
17
+ pipeline:
18
+ - wrong-name
19
+ inputs:
20
+ - timestamp: 2023-07-06T00:00
21
+ duration: 1
22
+ cpu/utilization: 20
23
+ - timestamp: 2023-07-06T00:01
24
+ duration: 1
25
+ cpu/utilization: 80
26
+ - timestamp: 2023-07-06T00:02
27
+ duration: 1
28
+ cpu/utilization: 20
@@ -0,0 +1,29 @@
1
+ name: pipeline-uninitialized-plugin-error
2
+ description: a negative test case that fails due to an uninitialized plugin being invoked in a pipeline
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ teads-curve:
7
+ path: '@grnsft/if-unofficial-plugins'
8
+ method: TeadsCurve
9
+ global-config:
10
+ interpolation: spline
11
+ outputs: ['yaml']
12
+ tree:
13
+ children:
14
+ child-0:
15
+ defaults:
16
+ cpu/thermal-design-power: 100
17
+ pipeline:
18
+ - teads-curve
19
+ - multiply
20
+ inputs:
21
+ - timestamp: 2023-07-06T00:00
22
+ duration: 1
23
+ cpu/utilization: 20
24
+ - timestamp: 2023-07-06T00:01
25
+ duration: 1
26
+ cpu/utilization: 80
27
+ - timestamp: 2023-07-06T00:02
28
+ duration: 1
29
+ cpu/utilization: 20
@@ -1,14 +1,13 @@
1
- name: boavizta-demo
2
- description:
1
+ name: pipeline-ordering-error
2
+ description: a negative test case that fails because sci-o is invoked too early in the pipeline (before its inputs are generated)
3
3
  tags:
4
4
  initialize:
5
5
  plugins:
6
- boavizta-cpu:
7
- method: BoaviztaCpuOutput
6
+ "teads-curve":
8
7
  path: "@grnsft/if-unofficial-plugins"
8
+ method: TeadsCurve
9
9
  global-config:
10
- allocation: LINEAR
11
- verbose: true
10
+ interpolation: spline
12
11
  "sum":
13
12
  path: "@grnsft/if-plugins"
14
13
  method: Sum
@@ -41,10 +40,10 @@ tree:
41
40
  children:
42
41
  child-1:
43
42
  pipeline:
44
- - boavizta-cpu
43
+ - teads-curve
44
+ - sci-o
45
45
  - sum
46
46
  - sci-m
47
- - sci-o
48
47
  - time-sync
49
48
  - sci
50
49
  config:
@@ -56,8 +55,6 @@ tree:
56
55
  device/expected-lifespan: 94608000 # 3 years in seconds
57
56
  resources-reserved: 1
58
57
  resources-total: 8
59
- cpu/number-cores: 24
60
- cpu/name: Intel® Core™ i7-1185G7
61
58
  inputs:
62
59
  - timestamp: "2023-12-12T00:00:00.000Z"
63
60
  cloud/instance-type: A1
@@ -1,5 +1,5 @@
1
- name: basic-demo
2
- description:
1
+ name: basic
2
+ description: a minimal manifest executing a single plugin on a single component for a single timestep
3
3
  tags:
4
4
  initialize:
5
5
  plugins:
@@ -8,6 +8,7 @@ initialize:
8
8
  method: TeadsCurve
9
9
  global-config:
10
10
  interpolation: spline
11
+ outputs: ['yaml']
11
12
  tree:
12
13
  children:
13
14
  child-0:
@@ -1,5 +1,5 @@
1
- name: generic-arithmetic-demo
2
- description:
1
+ name: generics
2
+ description: a pipeline that does arbitrary calculations using our generic arithmetic builtins
3
3
  tags:
4
4
  initialize:
5
5
  plugins:
@@ -1,11 +1,7 @@
1
- name: My Manifest File
2
- description: My First Manifest File 💚
3
- # aggregation:
4
- # metrics:
5
- # - 'carbon'
6
- # type: 'both'
1
+ name: mock-cpu-util-to-carbon
2
+ description: a complete pipeline that starts with mocked CPU utilization data and outputs operational carbon in gCO2eq
7
3
  initialize:
8
- outputs: ['yaml', 'csv']
4
+ outputs: ['yaml']
9
5
  plugins:
10
6
  group-by:
11
7
  path: 'builtin'
@@ -1,5 +1,5 @@
1
- name: nesting-demo
2
- description: null
1
+ name: nesting
2
+ description: a manifest that includes nested child components
3
3
  tags:
4
4
  kind: web
5
5
  complexity: moderate
@@ -11,6 +11,7 @@ aggregation:
11
11
  type: "both"
12
12
  params:
13
13
  initialize:
14
+ outputs: ['yaml']
14
15
  plugins:
15
16
  teads-curve:
16
17
  path: "@grnsft/if-unofficial-plugins"
@@ -1,5 +1,5 @@
1
1
  name: pipeline-teads-sci
2
- description:
2
+ description: a full pipeline seeded with some hardcoded input data and yielding an SCI score
3
3
  tags:
4
4
  initialize:
5
5
  plugins:
@@ -1,5 +1,5 @@
1
- name: realistic-pipeline-demo
2
- description:
1
+ name: pipeline-with-aggregate
2
+ description: a full pipeline with the aggregate feature enabled
3
3
  tags:
4
4
  aggregation:
5
5
  metrics:
@@ -1,5 +1,5 @@
1
- name: pipeline-with-mock-obs-demo
2
- description:
1
+ name: pipeline-with-mocks
2
+ description: a full pipeline seeded with data from mock-observations feature
3
3
  tags:
4
4
  aggregation:
5
5
  metrics:
@@ -56,6 +56,7 @@ initialize:
56
56
  "group-by":
57
57
  path: builtin
58
58
  method: GroupBy
59
+ outputs: ['yaml']
59
60
  tree:
60
61
  children:
61
62
  child-1:
@@ -0,0 +1,44 @@
1
+ name: Aggregation
2
+ description: Apply `horizontal` aggregation
3
+ aggregation:
4
+ metrics:
5
+ - 'cpu/utilization'
6
+ type: 'horizontal'
7
+ initialize:
8
+ plugins:
9
+ cloud-metadata:
10
+ method: CloudMetadata
11
+ path: "@grnsft/if-plugins"
12
+ tree:
13
+ children:
14
+ application:
15
+ pipeline:
16
+ - cloud-metadata
17
+ children:
18
+ uk-west:
19
+ children:
20
+ server-1:
21
+ inputs:
22
+ - timestamp: '2024-02-26 00:00:00'
23
+ duration: 300
24
+ cloud/instance-type: m5n.large
25
+ cloud/vendor: aws
26
+ cpu/utilization: 89
27
+ - timestamp: '2024-02-26 00:05:00'
28
+ duration: 300
29
+ cloud/instance-type: m5n.large
30
+ cloud/vendor: aws
31
+ cpu/utilization: 59
32
+ server-2:
33
+ inputs:
34
+ - timestamp: '2024-02-26 00:00:00'
35
+ duration: 300
36
+ cloud/instance-type: m5n.large
37
+ cloud/vendor: aws
38
+ cpu/utilization: 24
39
+ - timestamp: '2024-02-26 00:05:00'
40
+ duration: 300
41
+ cloud/instance-type: m5n.large
42
+ cloud/vendor: aws
43
+ cpu/utilization: 27
44
+
@@ -0,0 +1,44 @@
1
+ name: Aggregation
2
+ description: Apply `vertical` aggregation
3
+ aggregation:
4
+ metrics:
5
+ - 'cpu/utilization'
6
+ type: 'vertical'
7
+ initialize:
8
+ plugins:
9
+ cloud-metadata:
10
+ method: CloudMetadata
11
+ path: "@grnsft/if-plugins"
12
+ tree:
13
+ children:
14
+ application:
15
+ pipeline:
16
+ - cloud-metadata
17
+ children:
18
+ uk-west:
19
+ children:
20
+ server-1:
21
+ inputs:
22
+ - timestamp: '2024-02-26 00:00:00'
23
+ duration: 300
24
+ cloud/instance-type: m5n.large
25
+ cloud/vendor: aws
26
+ cpu/utilization: 89
27
+ - timestamp: '2024-02-26 00:05:00'
28
+ duration: 300
29
+ cloud/instance-type: m5n.large
30
+ cloud/vendor: aws
31
+ cpu/utilization: 59
32
+ server-2:
33
+ inputs:
34
+ - timestamp: '2024-02-26 00:00:00'
35
+ duration: 300
36
+ cloud/instance-type: m5n.large
37
+ cloud/vendor: aws
38
+ cpu/utilization: 24
39
+ - timestamp: '2024-02-26 00:05:00'
40
+ duration: 300
41
+ cloud/instance-type: m5n.large
42
+ cloud/vendor: aws
43
+ cpu/utilization: 27
44
+
@@ -0,0 +1,44 @@
1
+ name: Aggregation
2
+ description: Apply both `horizontal` and `vertical` aggregations
3
+ aggregation:
4
+ metrics:
5
+ - 'cpu/utilization'
6
+ type: 'both'
7
+ initialize:
8
+ plugins:
9
+ cloud-metadata:
10
+ method: CloudMetadata
11
+ path: "@grnsft/if-plugins"
12
+ tree:
13
+ children:
14
+ application:
15
+ pipeline:
16
+ - cloud-metadata
17
+ children:
18
+ uk-west:
19
+ children:
20
+ server-1:
21
+ inputs:
22
+ - timestamp: '2024-02-26 00:00:00'
23
+ duration: 300
24
+ cloud/instance-type: m5n.large
25
+ cloud/vendor: aws
26
+ cpu/utilization: 89
27
+ - timestamp: '2024-02-26 00:05:00'
28
+ duration: 300
29
+ cloud/instance-type: m5n.large
30
+ cloud/vendor: aws
31
+ cpu/utilization: 59
32
+ server-2:
33
+ inputs:
34
+ - timestamp: '2024-02-26 00:00:00'
35
+ duration: 300
36
+ cloud/instance-type: m5n.large
37
+ cloud/vendor: aws
38
+ cpu/utilization: 24
39
+ - timestamp: '2024-02-26 00:05:00'
40
+ duration: 300
41
+ cloud/instance-type: m5n.large
42
+ cloud/vendor: aws
43
+ cpu/utilization: 27
44
+