@grnsft/if 0.1.8 → 0.2.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 (208) hide show
  1. package/.commitlintrc.js +45 -0
  2. package/.husky/commit-msg +4 -0
  3. package/.husky/pre-commit +6 -0
  4. package/CONTRIBUTING.md +81 -98
  5. package/README.md +16 -12
  6. package/build/config/config.d.ts +4 -5
  7. package/build/config/config.js +16 -12
  8. package/build/config/index.d.ts +1 -0
  9. package/build/config/index.js +4 -2
  10. package/build/config/params.d.ts +2 -0
  11. package/build/config/params.js +146 -0
  12. package/build/config/strings.d.ts +14 -8
  13. package/build/config/strings.js +18 -12
  14. package/build/index.js +18 -38
  15. package/build/lib/aggregate.d.ts +6 -0
  16. package/build/lib/aggregate.js +72 -0
  17. package/build/lib/compute.d.ts +5 -0
  18. package/build/lib/compute.js +84 -0
  19. package/build/lib/exhaust.d.ts +6 -0
  20. package/build/lib/exhaust.js +47 -0
  21. package/build/lib/initialize.d.ts +6 -0
  22. package/build/lib/initialize.js +98 -0
  23. package/build/lib/load.d.ts +6 -0
  24. package/build/lib/load.js +24 -0
  25. package/build/lib/parameterize.d.ts +5 -0
  26. package/build/lib/parameterize.js +49 -0
  27. package/build/models/export-csv.d.ts +2 -0
  28. package/build/models/export-csv.js +129 -0
  29. package/build/models/export-log.d.ts +4 -0
  30. package/build/models/export-log.js +18 -0
  31. package/build/models/export-yaml.d.ts +4 -0
  32. package/build/models/export-yaml.js +24 -0
  33. package/build/models/group-by.d.ts +11 -0
  34. package/build/models/group-by.js +56 -0
  35. package/build/models/index.d.ts +2 -1
  36. package/build/models/index.js +5 -3
  37. package/build/models/time-sync.d.ts +2 -54
  38. package/build/models/time-sync.js +216 -147
  39. package/build/types/aggregation.d.ts +3 -0
  40. package/build/types/aggregation.js +5 -0
  41. package/build/types/compute.d.ts +25 -0
  42. package/build/types/compute.js +3 -0
  43. package/build/types/exhaust-plugin-interface.d.ts +7 -0
  44. package/build/types/exhaust-plugin-interface.js +3 -0
  45. package/build/types/group-by.d.ts +3 -0
  46. package/build/types/group-by.js +3 -0
  47. package/build/types/initialize.d.ts +4 -0
  48. package/build/types/initialize.js +3 -0
  49. package/build/types/interface.d.ts +8 -0
  50. package/build/types/interface.js +3 -0
  51. package/build/types/load.d.ts +7 -0
  52. package/build/types/load.js +3 -0
  53. package/build/types/manifest.d.ts +40 -0
  54. package/build/types/manifest.js +3 -0
  55. package/build/types/parameters.d.ts +15 -0
  56. package/build/types/parameters.js +5 -0
  57. package/build/types/process-args.d.ts +4 -5
  58. package/build/types/process-args.js +1 -1
  59. package/build/types/time-sync.d.ts +10 -2
  60. package/build/types/time-sync.js +1 -1
  61. package/build/util/aggregation-helper.d.ts +6 -0
  62. package/build/util/aggregation-helper.js +56 -0
  63. package/build/util/args.d.ts +7 -3
  64. package/build/util/args.js +46 -18
  65. package/build/util/errors.d.ts +1 -1
  66. package/build/util/errors.js +8 -4
  67. package/build/util/helpers.d.ts +4 -0
  68. package/build/util/helpers.js +23 -4
  69. package/build/util/json.d.ts +4 -0
  70. package/build/util/json.js +16 -0
  71. package/build/util/logger.d.ts +5 -0
  72. package/build/util/logger.js +40 -0
  73. package/build/util/validations.d.ts +30 -21
  74. package/build/util/validations.js +54 -55
  75. package/build/util/yaml.js +27 -4
  76. package/examples/manifests/azure-importer.yml +24 -0
  77. package/examples/manifests/basic-demo.yml +75 -0
  78. package/examples/manifests/basic.yml +27 -0
  79. package/examples/manifests/boavizta-pipeline.yml +85 -0
  80. package/examples/{impls/case-studies → manifests}/boavizta.yml +14 -14
  81. package/examples/{impls/test → manifests}/ccf.yml +9 -10
  82. package/examples/manifests/cim.yml +20 -0
  83. package/examples/manifests/cloud-metadata.yml +41 -0
  84. package/examples/manifests/co2js.yml +30 -0
  85. package/examples/manifests/coefficient.yml +23 -0
  86. package/examples/manifests/csv-export.yml +34 -0
  87. package/examples/manifests/e-mem.yml +21 -0
  88. package/examples/{impls/test → manifests}/e-net.yml +9 -8
  89. package/examples/manifests/generics.yml +71 -0
  90. package/examples/manifests/group-by.yml +48 -0
  91. package/examples/manifests/mock-observation.yml +33 -0
  92. package/examples/manifests/multiply.yml +23 -0
  93. package/examples/manifests/nesting-demo.yml +89 -0
  94. package/examples/manifests/nesting.yml +215 -0
  95. package/examples/manifests/pipeline-demo-1.yml +85 -0
  96. package/examples/manifests/pipeline-demo-2.yml +149 -0
  97. package/examples/manifests/pipeline-demo.yml +128 -0
  98. package/examples/manifests/pipeline-teads-sci.yml +82 -0
  99. package/examples/manifests/pipeline-with-generics.yml +147 -0
  100. package/examples/manifests/pipeline-with-mocks.yml +146 -0
  101. package/examples/{impls/test → manifests}/sci-e.yml +6 -8
  102. package/examples/manifests/sci-m.yml +23 -0
  103. package/examples/{impls/test → manifests}/sci-o.yml +10 -10
  104. package/examples/{impls/test → manifests}/sci.yml +10 -9
  105. package/examples/manifests/shell.yml +20 -0
  106. package/examples/manifests/sum.yml +23 -0
  107. package/examples/{impls/test → manifests}/tdp-finder.yml +6 -7
  108. package/examples/manifests/teads-aws.yml +22 -0
  109. package/examples/manifests/teads-curve.yml +20 -0
  110. package/examples/manifests/time-sync.yml +32 -0
  111. package/examples/manifests/watt-time.yml +42 -0
  112. package/jest.config.js +6 -1
  113. package/package.json +13 -8
  114. package/src/__tests__/integration/templates/integration.yaml +16 -0
  115. package/src/models/README.md +9 -7
  116. package/tsconfig.test.json +1 -1
  117. package/Makefile +0 -16
  118. package/build/config/units.yaml +0 -112
  119. package/build/lib/models-universe.d.ts +0 -36
  120. package/build/lib/models-universe.js +0 -113
  121. package/build/lib/observatory.d.ts +0 -20
  122. package/build/lib/observatory.js +0 -31
  123. package/build/lib/planet-aggregator.d.ts +0 -6
  124. package/build/lib/planet-aggregator.js +0 -35
  125. package/build/lib/supercomputer.d.ts +0 -37
  126. package/build/lib/supercomputer.js +0 -148
  127. package/build/types/helpers.d.ts +0 -1
  128. package/build/types/helpers.js +0 -3
  129. package/build/types/impl.d.ts +0 -45
  130. package/build/types/impl.js +0 -5
  131. package/build/types/model-interface.d.ts +0 -14
  132. package/build/types/model-interface.js +0 -3
  133. package/build/types/models-universe.d.ts +0 -23
  134. package/build/types/models-universe.js +0 -3
  135. package/build/types/planet-aggregator.d.ts +0 -6
  136. package/build/types/planet-aggregator.js +0 -3
  137. package/build/types/supercomputer.d.ts +0 -4
  138. package/build/types/supercomputer.js +0 -3
  139. package/build/types/units-dealer.d.ts +0 -3
  140. package/build/types/units-dealer.js +0 -3
  141. package/build/types/units.d.ts +0 -11
  142. package/build/types/units.js +0 -37
  143. package/build/util/units-dealer.d.ts +0 -10
  144. package/build/util/units-dealer.js +0 -32
  145. package/coverage/clover.xml +0 -379
  146. package/coverage/coverage-final.json +0 -14
  147. package/coverage/lcov-report/base.css +0 -224
  148. package/coverage/lcov-report/block-navigation.js +0 -87
  149. package/coverage/lcov-report/config/config.ts.html +0 -250
  150. package/coverage/lcov-report/config/index.html +0 -146
  151. package/coverage/lcov-report/config/index.ts.html +0 -91
  152. package/coverage/lcov-report/config/strings.ts.html +0 -208
  153. package/coverage/lcov-report/favicon.png +0 -0
  154. package/coverage/lcov-report/index.html +0 -161
  155. package/coverage/lcov-report/lib/index.html +0 -161
  156. package/coverage/lcov-report/lib/models-universe.ts.html +0 -517
  157. package/coverage/lcov-report/lib/observatory.ts.html +0 -187
  158. package/coverage/lcov-report/lib/planet-aggregator.ts.html +0 -274
  159. package/coverage/lcov-report/lib/supercomputer.ts.html +0 -472
  160. package/coverage/lcov-report/models/index.html +0 -131
  161. package/coverage/lcov-report/models/index.ts.html +0 -88
  162. package/coverage/lcov-report/models/planet-aggregator.ts.html +0 -271
  163. package/coverage/lcov-report/models/time-sync.ts.html +0 -1165
  164. package/coverage/lcov-report/prettify.css +0 -1
  165. package/coverage/lcov-report/prettify.js +0 -2
  166. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  167. package/coverage/lcov-report/sorter.js +0 -196
  168. package/coverage/lcov-report/util/args.ts.html +0 -289
  169. package/coverage/lcov-report/util/errors.ts.html +0 -166
  170. package/coverage/lcov-report/util/index.html +0 -161
  171. package/coverage/lcov-report/util/units-dealer.ts.html +0 -199
  172. package/coverage/lcov-report/util/yaml.ts.html +0 -193
  173. package/coverage/lcov.info +0 -637
  174. package/examples/impls/case-studies/accenture.yml +0 -155
  175. package/examples/impls/case-studies/aggregation.yml +0 -97
  176. package/examples/impls/case-studies/aveva.yaml +0 -48
  177. package/examples/impls/case-studies/azure-yassine.yaml +0 -67
  178. package/examples/impls/case-studies/dow_msft.yml +0 -173
  179. package/examples/impls/case-studies/farm-insights.yaml +0 -35
  180. package/examples/impls/case-studies/gsf-website.yaml +0 -93
  181. package/examples/impls/case-studies/msft-eshoppen.yaml +0 -162
  182. package/examples/impls/case-studies/msft-green-ai.yaml +0 -58
  183. package/examples/impls/case-studies/ntt-data-on-premise.yaml +0 -201
  184. package/examples/impls/test/aggregation-test.yml +0 -109
  185. package/examples/impls/test/azure.yml +0 -26
  186. package/examples/impls/test/if-demo.yml +0 -61
  187. package/examples/impls/test/large-impl.yml +0 -257303
  188. package/examples/impls/test/metadata.yml +0 -21
  189. package/examples/impls/test/nesting.yml +0 -113
  190. package/examples/impls/test/sci-m.yml +0 -24
  191. package/examples/impls/test/shell.yml +0 -19
  192. package/examples/impls/test/time-sync.yml +0 -75
  193. package/examples/ompls/aggregation-test.yml +0 -340
  194. package/examples/ompls/azure.yml +0 -145
  195. package/examples/ompls/ccf.yml +0 -29
  196. package/examples/ompls/complex-pipeline.yml +0 -105
  197. package/examples/ompls/full-sci.yml +0 -64
  198. package/examples/ompls/if-demo.yml +0 -517
  199. package/examples/ompls/metadata.yml +0 -29
  200. package/examples/ompls/nesting.yml +0 -113
  201. package/examples/ompls/sci-e.yml +0 -23
  202. package/examples/ompls/sci-m.yml +0 -33
  203. package/examples/ompls/sci-o.yml +0 -29
  204. package/examples/ompls/sci.yml +0 -37
  205. package/examples/ompls/shell.yml +0 -23
  206. package/examples/ompls/time-sync.yml +0 -212
  207. package/src/config/units.yaml +0 -112
  208. package/tsconfig.build.tsbuildinfo +0 -1
@@ -1,145 +0,0 @@
1
- name: ccf-demo
2
- description: example impl invoking CCF model
3
- tags: null
4
- initialize:
5
- models:
6
- - name: azure-importer
7
- path: if-models
8
- model: AzureImporterModel
9
- kind: plugin
10
- graph:
11
- children:
12
- child:
13
- pipeline:
14
- - azure-importer
15
- config:
16
- azure-importer: null
17
- inputs:
18
- - timestamp: '2023-11-02T10:35:31.820Z'
19
- duration: 3600
20
- azure-observation-window: 5 min
21
- azure-observation-aggregation: average
22
- azure-subscription-id: 9de7e19f-8a18-4e73-9451-45fc74e7d0d3
23
- azure-resource-group: vm1_group
24
- azure-vm-name: vm1
25
- outputs:
26
- - timestamp: '2023-11-02T10:35:00.000Z'
27
- duration: 300
28
- cloud-vendor: azure
29
- cpu-util: '0.314'
30
- mem-availableGB: 0.488636416
31
- mem-usedGB: 0.5113635839999999
32
- total-memoryGB: '1'
33
- mem-util: 51.13635839999999
34
- location: uksouth
35
- cloud-instance-type: Standard_B1s
36
- - timestamp: '2023-11-02T10:40:00.000Z'
37
- duration: 300
38
- cloud-vendor: azure
39
- cpu-util: '0.314'
40
- mem-availableGB: 0.48978984960000005
41
- mem-usedGB: 0.5102101504
42
- total-memoryGB: '1'
43
- mem-util: 51.021015039999995
44
- location: uksouth
45
- cloud-instance-type: Standard_B1s
46
- - timestamp: '2023-11-02T10:45:00.000Z'
47
- duration: 300
48
- cloud-vendor: azure
49
- cpu-util: '0.301'
50
- mem-availableGB: 0.490733568
51
- mem-usedGB: 0.509266432
52
- total-memoryGB: '1'
53
- mem-util: 50.9266432
54
- location: uksouth
55
- cloud-instance-type: Standard_B1s
56
- - timestamp: '2023-11-02T10:50:00.000Z'
57
- duration: 300
58
- cloud-vendor: azure
59
- cpu-util: '0.298'
60
- mem-availableGB: 0.490733568
61
- mem-usedGB: 0.509266432
62
- total-memoryGB: '1'
63
- mem-util: 50.9266432
64
- location: uksouth
65
- cloud-instance-type: Standard_B1s
66
- - timestamp: '2023-11-02T10:55:00.000Z'
67
- duration: 300
68
- cloud-vendor: azure
69
- cpu-util: '0.301'
70
- mem-availableGB: 0.49178214400000003
71
- mem-usedGB: 0.5082178559999999
72
- total-memoryGB: '1'
73
- mem-util: 50.82178559999999
74
- location: uksouth
75
- cloud-instance-type: Standard_B1s
76
- - timestamp: '2023-11-02T11:00:00.000Z'
77
- duration: 300
78
- cloud-vendor: azure
79
- cpu-util: '0.298'
80
- mem-availableGB: 0.49178214400000003
81
- mem-usedGB: 0.5082178559999999
82
- total-memoryGB: '1'
83
- mem-util: 50.82178559999999
84
- location: uksouth
85
- cloud-instance-type: Standard_B1s
86
- - timestamp: '2023-11-02T11:05:00.000Z'
87
- duration: 300
88
- cloud-vendor: azure
89
- cpu-util: '0.304'
90
- mem-availableGB: 0.492306432
91
- mem-usedGB: 0.507693568
92
- total-memoryGB: '1'
93
- mem-util: 50.7693568
94
- location: uksouth
95
- cloud-instance-type: Standard_B1s
96
- - timestamp: '2023-11-02T11:10:00.000Z'
97
- duration: 300
98
- cloud-vendor: azure
99
- cpu-util: '0.3'
100
- mem-availableGB: 0.49283072000000006
101
- mem-usedGB: 0.50716928
102
- total-memoryGB: '1'
103
- mem-util: 50.716927999999996
104
- location: uksouth
105
- cloud-instance-type: Standard_B1s
106
- - timestamp: '2023-11-02T11:15:00.000Z'
107
- duration: 300
108
- cloud-vendor: azure
109
- cpu-util: '0.636'
110
- mem-availableGB: 0.5062524928000001
111
- mem-usedGB: 0.49374750719999994
112
- total-memoryGB: '1'
113
- mem-util: 49.374750719999994
114
- location: uksouth
115
- cloud-instance-type: Standard_B1s
116
- - timestamp: '2023-11-02T11:20:00.000Z'
117
- duration: 300
118
- cloud-vendor: azure
119
- cpu-util: '0.29500000000000004'
120
- mem-availableGB: 0.509607936
121
- mem-usedGB: 0.490392064
122
- total-memoryGB: '1'
123
- mem-util: 49.039206400000005
124
- location: uksouth
125
- cloud-instance-type: Standard_B1s
126
- - timestamp: '2023-11-02T11:25:00.000Z'
127
- duration: 300
128
- cloud-vendor: azure
129
- cpu-util: '0.309'
130
- mem-availableGB: 0.5106565120000001
131
- mem-usedGB: 0.48934348799999994
132
- total-memoryGB: '1'
133
- mem-util: 48.934348799999995
134
- location: uksouth
135
- cloud-instance-type: Standard_B1s
136
- - timestamp: '2023-11-02T11:30:00.000Z'
137
- duration: 300
138
- cloud-vendor: azure
139
- cpu-util: '0.484'
140
- mem-availableGB: 0.5106565120000001
141
- mem-usedGB: 0.48934348799999994
142
- total-memoryGB: '1'
143
- mem-util: 48.934348799999995
144
- location: uksouth
145
- cloud-instance-type: Standard_B1s
@@ -1,29 +0,0 @@
1
- name: ccf-demo
2
- description: example impl invoking CCF model
3
- tags:
4
- initialize:
5
- models:
6
- - name: ccf
7
- model: CloudCarbonMetadataModel
8
- path: if-models
9
- graph:
10
- children:
11
- child:
12
- pipeline:
13
- - ccf
14
- config:
15
- ccf:
16
- vendor: aws
17
- instance-type: m5n.large
18
- inputs:
19
- - timestamp: 2023-07-06T00:00
20
- duration: 1
21
- cpu-util: 10
22
- outputs:
23
- - timestamp: 2023-07-06T00:00
24
- duration: 1
25
- cpu-util: 10
26
- vendor: aws
27
- instance-type: m5n.large
28
- energy: 5.398804976536068e-7
29
- embodied-carbon: 0.02553890791476408
@@ -1,105 +0,0 @@
1
- name: gsf-demo-pipeline
2
- description: More complex pipeline example
3
- tags:
4
- kind: web
5
- complexity: moderate
6
- category: cloud
7
- initialize:
8
- models:
9
- - name: teads-curve
10
- kind: builtin
11
- - name: sci-m
12
- kind: builtin
13
- - name: sci-o
14
- kind: builtin
15
- - name: sci-e
16
- kind: builtin
17
- - name: eshoppen-net
18
- kind: builtin
19
- - name: eshoppen-mem
20
- kind: builtin
21
- - name: eshoppen-cpu
22
- kind: builtin
23
- - name: sampler
24
- kind: shell
25
- graph:
26
- children:
27
- child:
28
- pipeline:
29
- - eshoppen-mem
30
- - eshoppen-cpu
31
- - eshoppen-net
32
- - sci-e
33
- - sci-o
34
- - sampler
35
- config:
36
- teads-curve:
37
- thermal-design-power: 1
38
- sampler:
39
- executable: python3 /usr/local/bin/sampler
40
- inputs:
41
- - timestamp: 2023-07-06T00:00
42
- processor: Intel® Core™ i7-1185G7
43
- data-in: 1
44
- data-out: 1
45
- net-energy: 1
46
- n-hours: 1
47
- n-chips: 1
48
- tdp-mem: 1
49
- tdp-coeff: 1
50
- duration: 3600
51
- thermal-design-power: 28
52
- cpu-util: 18.392
53
- grid-carbon-intensity: 951
54
- - timestamp: 2023-08-06T00:00
55
- processor: Intel® Core™ i7-1185G7
56
- data-in: 1
57
- data-out: 1
58
- net-energy: 1
59
- n-hours: 1
60
- n-chips: 1
61
- tdp-mem: 1
62
- tdp-coeff: 1
63
- duration: 3600
64
- thermal-design-power: 20
65
- cpu-util: 16
66
- grid-carbon-intensity: 800
67
- outputs:
68
- - cpu-util: 18.392
69
- data-in: 1
70
- data-out: 1
71
- duration: 3600
72
- energy: 1
73
- energy-cpu: 0.001
74
- energy-memory: 0.001
75
- energy-network: 0.002
76
- executable: python3 /usr/local/bin/sampler
77
- grid-carbon-intensity: 951
78
- n-chips: 1
79
- n-hours: 1
80
- net-energy: 1
81
- operational-carbon: 3.8040000000000003
82
- processor: Intel® Core™ i7-1185G7
83
- tdp-coeff: 1
84
- tdp-mem: 1
85
- thermal-design-power: 1
86
- timestamp: 2023-07-06T00:00
87
- - cpu-util: 16
88
- data-in: 1
89
- data-out: 1
90
- duration: 3600
91
- energy: 1
92
- energy-cpu: 0.001
93
- energy-memory: 0.001
94
- energy-network: 0.002
95
- executable: python3 /usr/local/bin/sampler
96
- grid-carbon-intensity: 800
97
- n-chips: 1
98
- n-hours: 1
99
- net-energy: 1
100
- operational-carbon: 3.2
101
- processor: Intel® Core™ i7-1185G7
102
- tdp-coeff: 1
103
- tdp-mem: 1
104
- thermal-design-power: 1
105
- timestamp: 2023-08-06T00:00
@@ -1,64 +0,0 @@
1
- name: full-sci
2
- description: example executing a full pipeline from teads --> sci
3
- tags: null
4
- initialize:
5
- models:
6
- - name: teads-curve
7
- kind: builtin
8
- - name: sci-m
9
- kind: builtin
10
- - name: sci-o
11
- kind: builtin
12
- - name: sci-e
13
- kind: builtin
14
- - name: sci
15
- kind: builtin
16
- graph:
17
- children:
18
- child:
19
- pipeline:
20
- - teads-curve
21
- - sci-m
22
- - sci-e
23
- - sci-o
24
- - sci
25
- config:
26
- teads-curve:
27
- thermal-design-power: 55
28
- sci-m:
29
- total-embodied-emissions: 251000
30
- time-reserved: 3600
31
- expected-lifespan: 126144000
32
- resources-reserved: 1
33
- total-resources: 1
34
- sci-o:
35
- grid-carbon-intensity: 1500
36
- sci:
37
- functional-unit-duration: 1
38
- functional-unit-time: minutes
39
- functional-unit: requests
40
- inputs:
41
- - timestamp: 2023-07-06T00:00
42
- duration: 1
43
- cpu-util: 55
44
- requests: 100
45
- outputs:
46
- - timestamp: 2023-07-06T00:00
47
- duration: 1
48
- cpu-util: 55
49
- requests: 100
50
- thermal-design-power: 55
51
- total-embodied-emissions: 251000
52
- time-reserved: 3600
53
- expected-lifespan: 126144000
54
- resources-reserved: 1
55
- total-resources: 1
56
- grid-carbon-intensity: 1500
57
- functional-unit-duration: 1
58
- functional-unit-time: minutes
59
- functional-unit: requests
60
- energy-cpu: 0.000011936544080284555
61
- embodied-carbon: 7.16324200913242
62
- energy: 0.000011936544080284555
63
- operational-carbon: 0.017904816120426832
64
- sci: 4.308688095151708