Skip to content

Commit 862ca01

Browse files
committed
Merge branch 'main' into if-merge
2 parents ec1693b + eef1183 commit 862ca01

File tree

188 files changed

+7703
-2139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+7703
-2139
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Run if-check on requested branch
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
run:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
13+
- name: Set up Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 18
17+
cache: 'npm'
18+
19+
- name: Install dependencies
20+
run: npm install
21+
22+
- name: Run integration tests
23+
run: npm run if-check -- -d manifests/outputs

.github/workflows/release-commit.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
PRE_RELEASE: ${{ github.event.release.prerelease}}
99

1010
jobs:
11-
release-commit-pr:
11+
unit-tests:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout code
@@ -28,9 +28,45 @@ jobs:
2828
- name: Run unit tests
2929
run: npm test
3030

31+
integration-tests:
32+
runs-on: ubuntu-latest
33+
needs: unit-tests
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
with:
38+
ref: ${{ github.event.repository.default_branch }}
39+
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: 18
44+
registry-url: https://registry.npmjs.org/
45+
46+
- name: Install dependencies
47+
run: npm ci
48+
3149
- name: Run integration tests
3250
run: npm run if-check -- -d manifests/outputs
3351

52+
publish:
53+
runs-on: ubuntu-latest
54+
needs: integration-tests
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v4
58+
with:
59+
ref: ${{ github.event.repository.default_branch }}
60+
61+
- name: Setup Node.js
62+
uses: actions/setup-node@v4
63+
with:
64+
node-version: 18
65+
registry-url: https://registry.npmjs.org/
66+
67+
- name: Install dependencies
68+
run: npm ci
69+
3470
- name: Initialize git user email
3571
run: git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}"
3672

Refactor-migration-guide.md

Lines changed: 20 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -125,24 +125,23 @@ There have also been some changes to the structure of manifest files. Some of th
125125
126126
- **Node level config**
127127
128-
We have also introduced the concept of node-level config. This is designed for pluin configuration that might vary between components in the tree. For example, for each child in the tree you might wish to use the `groupby` plugin to group the outputs according to a different set of keys.
128+
We have also introduced the concept of node-level config. This is designed for pluin configuration that might vary between components in the tree. For example, for each child in the tree you might wish to use the `regroup` feature to group the outputs according to a different set of keys.
129129
130130
```yaml
131131
tree:
132132
children:
133133
child-1:
134134
pipeline:
135-
- teads-curve
136-
- sci-e
137-
- sci-embodied
138-
- sci-o
139-
- time-sync
140-
- sci
141-
config:
142-
group-by:
143-
group:
144-
- region
145-
- cloud/instance-type
135+
compute:
136+
- teads-curve
137+
- sci-e
138+
- sci-embodied
139+
- sci-o
140+
- time-sync
141+
- sci
142+
regroup:
143+
- region
144+
- cloud/instance-type
146145
```
147146
148147
- **Defaults**
@@ -156,12 +155,13 @@ There have also been some changes to the structure of manifest files. Some of th
156155
children:
157156
child-1:
158157
pipeline:
159-
- teads-curve
160-
- sci-e
161-
- sci-embodied
162-
- sci-o
163-
- time-sync
164-
- sci
158+
compute:
159+
- teads-curve
160+
- sci-e
161+
- sci-embodied
162+
- sci-o
163+
- time-sync
164+
- sci
165165
defaults:
166166
cpu/thermal-design-power: 100
167167
grid/carbon-intensity: 800
@@ -199,9 +199,7 @@ The aggregate plugin aggregates data in two ways: first it condenses individual
199199
200200
This is a builtin feature of IF, meaning it does not have to be initialized as a plugin. Instead, you just have to include a short config block in the top of the manifest file. There are two pieces of information required:
201201
202-
- `metrics`: which metrics do you want to aggregate? Every metric you provide here must exist in the output array.
203-
204-
- `method`: the aggregation method for the specied metric
202+
- `metrics`: which metrics do you want to aggregate? Every metric you provide here must exist in the output array and be described in the `parameter-metadata` of the plugin.
205203
206204
- `type`: the options are `horizontal`, `vertical` or both. Horizontal aggregation is the type that condenses each time series into a single summary value. Vertical aggregation is aggregated across components.
207205
@@ -210,45 +208,10 @@ Here's what the config block should look like:
210208
```yaml
211209
aggregation:
212210
metrics:
213-
'carbon':
214-
method: 'sum'
211+
- carbon
215212
type: 'both'
216213
```
217214
218-
### Groupby
219-
220-
Groupby allows you to regroup your outputs according to keys you define. For example, maybe you want to group your outputs by region (show me all the outputs for applications run in `uk-south` etc). Groupby _is_ a plugin that needs to be initialized in the manifest.
221-
222-
You can initialize the plugin as follows:
223-
224-
```yaml
225-
initialize:
226-
plugins:
227-
'group-by':
228-
path: builtin
229-
method: GroupBy
230-
```
231-
232-
Then you configure groupby for each component in the node level config. In the following example we will regroup the outputs by the `region`:
233-
234-
```yaml
235-
tree:
236-
children:
237-
child-1:
238-
pipeline:
239-
- teads-curve
240-
- sci-e
241-
- sci-embodied
242-
- sci-o
243-
- time-sync
244-
- group-by
245-
- sci
246-
config:
247-
group-by:
248-
group:
249-
- region
250-
```
251-
252215
### Exhaust
253216
254217
We have introduced `exhaust` as an IF feature. This is a wrapper around export plugins and it allows community contributors to create plugins for exporting to different formats.

manifests/examples/builtins/coefficient/failure-invalid-config-input-param.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ tree:
1414
children:
1515
child:
1616
pipeline:
17-
- coefficient
17+
compute:
18+
- coefficient
1819
config:
1920
sum:
2021
inputs:

manifests/examples/builtins/coefficient/failure-output-param-is-null.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ tree:
1414
children:
1515
child:
1616
pipeline:
17-
- coefficient
17+
compute:
18+
- coefficient
1819
config:
1920
sum:
2021
inputs:

manifests/examples/builtins/coefficient/success.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ tree:
1414
children:
1515
child:
1616
pipeline:
17-
- coefficient
17+
compute:
18+
- coefficient
1819
config:
1920
sum:
2021
inputs:

manifests/examples/builtins/csv-lookup/cloud-metadata/failure-invalid-instance-type.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ tree:
1616
children:
1717
child:
1818
pipeline:
19-
- cloud-metadata
19+
compute:
20+
- cloud-metadata
2021
config:
2122
inputs:
2223
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred

manifests/examples/builtins/csv-lookup/cloud-metadata/failure-invalid-vendor.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ tree:
1616
children:
1717
child:
1818
pipeline:
19-
- cloud-metadata
19+
compute:
20+
- cloud-metadata
2021
config:
2122
inputs:
2223
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred

manifests/examples/builtins/csv-lookup/cloud-metadata/failure-missing-cloud-vendor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ tree:
1616
children:
1717
child:
1818
pipeline:
19-
- cloud-metadata
19+
compute:
20+
- cloud-metadata
2021
config:
2122
inputs:
2223
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred

manifests/examples/builtins/csv-lookup/cloud-metadata/success.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ tree:
1616
children:
1717
child:
1818
pipeline:
19-
- cloud-metadata
19+
compute:
20+
- cloud-metadata
2021
config:
2122
inputs:
2223
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred

manifests/examples/builtins/csv-lookup/region-metadata/failure-missing-column.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ tree:
1616
children:
1717
child:
1818
pipeline:
19-
- cloud-metadata
19+
compute:
20+
- cloud-metadata
2021
inputs:
2122
- timestamp: 2023-08-06T00:00
2223
duration: 3600

manifests/examples/builtins/csv-lookup/region-metadata/failure-missing-output.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ tree:
1616
children:
1717
child:
1818
pipeline:
19-
- cloud-metadata
19+
compute:
20+
- cloud-metadata
2021
inputs:
2122
- timestamp: 2023-08-06T00:00
2223
duration: 3600

manifests/examples/builtins/csv-lookup/region-metadata/success-renaming.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ tree:
1616
children:
1717
child:
1818
pipeline:
19-
- cloud-metadata
19+
compute:
20+
- cloud-metadata
2021
inputs:
2122
- timestamp: 2023-08-06T00:00
2223
duration: 3600

manifests/examples/builtins/csv-lookup/region-metadata/success.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ tree:
1616
children:
1717
child:
1818
pipeline:
19-
- cloud-metadata
19+
compute:
20+
- cloud-metadata
2021
inputs:
2122
- timestamp: 2023-08-06T00:00
2223
duration: 3600

manifests/examples/builtins/csv-lookup/tdp-finder/failure-missing-input-param.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ tree:
1515
children:
1616
child:
1717
pipeline:
18-
- tdp-finder
18+
compute:
19+
- tdp-finder
1920
config:
2021
inputs:
2122
- timestamp: 2023-07-06T00:00

manifests/examples/builtins/csv-lookup/tdp-finder/failure-unsupported-physical-processor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ tree:
1515
children:
1616
child:
1717
pipeline:
18-
- tdp-finder
18+
compute:
19+
- tdp-finder
1920
config:
2021
inputs:
2122
- timestamp: 2023-07-06T00:00

manifests/examples/builtins/csv-lookup/tdp-finder/success.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ tree:
1515
children:
1616
child:
1717
pipeline:
18-
- tdp-finder
18+
compute:
19+
- tdp-finder
1920
config:
2021
inputs:
2122
- timestamp: 2023-07-06T00:00

manifests/examples/builtins/divide/failure-denominator-equal-zero.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ tree:
2323
children:
2424
child:
2525
pipeline:
26-
- cloud-metadata
27-
- divide
26+
compute:
27+
- cloud-metadata
28+
- divide
2829
config:
2930
divide:
3031
defaults:

manifests/examples/builtins/divide/failure-invalid-config-denominator.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ tree:
2323
children:
2424
child:
2525
pipeline:
26-
- cloud-metadata
27-
- divide
26+
compute:
27+
- cloud-metadata
28+
- divide
2829
config:
2930
divide:
3031
defaults:

manifests/examples/builtins/divide/failure-missing-numerator.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ tree:
2323
children:
2424
child:
2525
pipeline:
26-
- cloud-metadata
27-
- divide
26+
compute:
27+
- cloud-metadata
28+
- divide
2829
config:
2930
divide:
3031
defaults:

manifests/examples/builtins/divide/success.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ tree:
2323
children:
2424
child:
2525
pipeline:
26-
- cloud-metadata
27-
- divide
28-
config:
29-
divide:
26+
compute:
27+
- cloud-metadata
28+
- divide
3029
defaults:
3130
cloud/vendor: aws
3231
cloud/instance-type: m5n.large

manifests/examples/builtins/exponent/success.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ tree:
1414
children:
1515
child:
1616
pipeline:
17-
- exponent
18-
config:
19-
exponent:
17+
compute:
18+
- exponent
2019
inputs:
2120
- timestamp: 2023-08-06T00:00
2221
duration: 3600

0 commit comments

Comments
 (0)