Skip to content

Commit

Permalink
Merge branch 'main' into migrate-subtract-to-builtin
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Cook <33655003+jmcook1186@users.noreply.github.com>
  • Loading branch information
jmcook1186 authored May 22, 2024
2 parents fa2bf24 + 6ff5790 commit 8363396
Show file tree
Hide file tree
Showing 57 changed files with 1,935 additions and 68 deletions.
6 changes: 6 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'*.ts': [
'gts lint',
],
'package.json': 'fixpack',
}
12 changes: 6 additions & 6 deletions Refactor-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ There have also been some changes to the structure of manifest files. Some of th
For example:
```yaml
"sci-m":
path: "@grnsft/if-plugins"
method: SciM
"sci-embodied":
path: "builtin"
method: SciEmbodied
```
- **Global config**
Expand Down Expand Up @@ -150,7 +150,7 @@ There have also been some changes to the structure of manifest files. Some of th
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand All @@ -174,7 +174,7 @@ There have also been some changes to the structure of manifest files. Some of th
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down Expand Up @@ -254,7 +254,7 @@ tree:
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- group-by
Expand Down
12 changes: 6 additions & 6 deletions manifests/bugs/aggregation-error-wrong-metric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ initialize:
"sci-e":
path: "@grnsft/if-plugins"
method: SciE
"sci-m":
path: "@grnsft/if-plugins"
method: SciM
"sci-embodied":
path: "builtin"
method: SciEmbodied
"sci-o":
path: "@grnsft/if-plugins"
method: SciO
"sci":
path: "@grnsft/if-plugins"
path: "builtin"
method: Sci
global-config:
functional-unit: "requests"
Expand All @@ -44,7 +44,7 @@ tree:
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down Expand Up @@ -87,7 +87,7 @@ tree:
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down
2 changes: 1 addition & 1 deletion manifests/bugs/azure-importer-ignoring-defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ tree:
inputs:
- timestamp: "2024-04-04T08:00:00.001Z"
duration: 3600
energy: 100
energy: 100
34 changes: 34 additions & 0 deletions manifests/bugs/mock-observations-failure-duration-is-zero.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: mock-observation-demo
description: a manifest demonstrating how to use the mock observations feature
tags:
initialize:
outputs: ['yaml']
plugins:
mock-observations:
kind: plugin
method: MockObservations
path: "@grnsft/if-plugins"
global-config:
timestamp-from: 2023-07-06T00:00
timestamp-to: 2023-07-06T00:10
duration: 0
components:
- cloud/instance-type: A1
- cloud/instance-type: B1
generators:
common:
region: uk-west
common-key: common-val
randint:
cpu/utilization:
min: 1
max: 99
memory/utilization:
min: 1
max: 99
tree:
children:
child:
pipeline:
- mock-observations
inputs:
10 changes: 5 additions & 5 deletions manifests/bugs/pipeline-ordering-error.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ initialize:
- cpu/energy
- network/energy
output-parameter: energy
"sci-m":
path: "@grnsft/if-plugins"
method: SciM
"sci-embodied":
path: "builtin"
method: SciEmbodied
"sci-o":
path: "@grnsft/if-plugins"
method: SciO
"sci":
path: "@grnsft/if-plugins"
path: "builtin"
method: Sci
global-config:
functional-unit: ""
Expand All @@ -43,7 +43,7 @@ tree:
- teads-curve
- sci-o
- sum
- sci-m
- sci-embodied
- time-sync
- sci
config:
Expand Down
23 changes: 23 additions & 0 deletions manifests/bugs/sci-m-missing-resources-total.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: sci-embodied
description: receiving incorrect error message when running sci-embodied without `resources-total` issue #716
tags:
initialize:
outputs: ['yaml']
plugins:
"sci-embodied": # a model that calculates m from te, tir, el, rr and rtor
method: SciEmbodied
path: "builtin"
tree:
children:
child:
pipeline:
- sci-embodied # duration & config -> embodied
defaults:
device/emissions-embodied: 1533.120 # gCO2eq
time-reserved: 3600 # 1hr in seconds
device/expected-lifespan: 94608000 # 3 years in seconds
resources-reserved: 1
# resources-total: 8
inputs:
- timestamp: 2023-07-06T00:00
duration: 3600
2 changes: 1 addition & 1 deletion manifests/examples/generics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ initialize:
coefficient: 2
output-parameter: energy-doubled
"multiply":
path: "@grnsft/if-plugins"
path: "builtin"
method: Multiply
global-config:
input-parameters: ["cpu/utilization", "duration"]
Expand Down
2 changes: 1 addition & 1 deletion manifests/examples/mock-cpu-util-to-carbon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ initialize:
path: 'builtin'
method: GroupBy
operational-carbon:
path: '@grnsft/if-plugins'
path: 'builtin'
method: Multiply
global-config:
input-parameters: ['cpu/energy', 'grid/carbon-intensity']
Expand Down
16 changes: 8 additions & 8 deletions manifests/examples/nesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ initialize:
- cpu/energy
- network/energy
output-parameter: energy
sci-m:
path: "@grnsft/if-plugins"
method: SciM
sci-embodied:
path: "builtin"
method: SciEmbodied
sci-o:
path: "@grnsft/if-plugins"
method: SciO
sci:
path: "@grnsft/if-plugins"
path: "builtin"
method: Sci
global-config:
functional-unit: "requests"
Expand All @@ -60,7 +60,7 @@ tree:
pipeline:
- teads-curve
- sum
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down Expand Up @@ -101,7 +101,7 @@ tree:
pipeline:
- teads-curve
- sum
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down Expand Up @@ -144,7 +144,7 @@ tree:
pipeline:
- teads-curve
- sum
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down Expand Up @@ -185,7 +185,7 @@ tree:
pipeline:
- teads-curve
- sum
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down
10 changes: 5 additions & 5 deletions manifests/examples/pipeline-teads-sci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ initialize:
- cpu/energy
- network/energy
output-parameter: energy
"sci-m":
path: "@grnsft/if-plugins"
method: SciM
"sci-embodied":
path: "builtin"
method: SciEmbodied
"sci-o":
path: "@grnsft/if-plugins"
method: SciO
"sci":
path: "@grnsft/if-plugins"
path: "builtin"
method: Sci
global-config:
functional-unit: ""
Expand All @@ -42,7 +42,7 @@ tree:
pipeline:
- teads-curve
- sum
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down
12 changes: 6 additions & 6 deletions manifests/examples/pipeline-with-aggregate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ initialize:
"sci-e":
path: "@grnsft/if-plugins"
method: SciE
"sci-m":
path: "@grnsft/if-plugins"
method: SciM
"sci-embodied":
path: "builtin"
method: SciEmbodied
"sci-o":
path: "@grnsft/if-plugins"
method: SciO
"sci":
path: "@grnsft/if-plugins"
path: "builtin"
method: Sci
global-config:
functional-unit: "requests"
Expand All @@ -44,7 +44,7 @@ tree:
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down Expand Up @@ -87,7 +87,7 @@ tree:
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down
12 changes: 6 additions & 6 deletions manifests/examples/pipeline-with-mocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ initialize:
"sci-e":
path: "@grnsft/if-plugins"
method: SciE
"sci-m":
path: "@grnsft/if-plugins"
method: SciM
"sci-embodied":
path: "builtin"
method: SciEmbodied
"sci-o":
path: "@grnsft/if-plugins"
method: SciO
"sci":
path: "@grnsft/if-plugins"
path: "builtin"
method: Sci
global-config:
functional-unit: "requests"
Expand All @@ -63,7 +63,7 @@ tree:
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down Expand Up @@ -106,7 +106,7 @@ tree:
pipeline:
- teads-curve
- sci-e
- sci-m
- sci-embodied
- sci-o
- time-sync
- sci
Expand Down
43 changes: 43 additions & 0 deletions manifests/features/aggregate-failure-inalid-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Aggregation
description: Apply both `horizontal` and `vertical` aggregations
aggregation:
metrics:
- 'test'
type: 'both'
initialize:
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
tree:
children:
application:
pipeline:
- cloud-metadata
children:
uk-west:
children:
server-1:
inputs:
- timestamp: '2024-02-26 00:00:00'
duration: 300
cloud/instance-type: m5n.large
cloud/vendor: aws
cpu/utilization: 89
- timestamp: '2024-02-26 00:05:00'
duration: 300
cloud/instance-type: m5n.large
cloud/vendor: aws
cpu/utilization: 59
server-2:
inputs:
- timestamp: '2024-02-26 00:00:00'
duration: 300
cloud/instance-type: m5n.large
cloud/vendor: aws
cpu/utilization: 24
- timestamp: '2024-02-26 00:05:00'
duration: 300
cloud/instance-type: m5n.large
cloud/vendor: aws
cpu/utilization: 27
Loading

0 comments on commit 8363396

Please sign in to comment.