Skip to content

Commit

Permalink
Merge branch 'main' into if-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
manushak committed Aug 8, 2024
2 parents ec1693b + eef1183 commit 862ca01
Show file tree
Hide file tree
Showing 188 changed files with 7,703 additions and 2,139 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/dispatch-integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run if-check on requested branch

on:
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Run integration tests
run: npm run if-check -- -d manifests/outputs
38 changes: 37 additions & 1 deletion .github/workflows/release-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
PRE_RELEASE: ${{ github.event.release.prerelease}}

jobs:
release-commit-pr:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -28,9 +28,45 @@ jobs:
- name: Run unit tests
run: npm test

integration-tests:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm ci

- name: Run integration tests
run: npm run if-check -- -d manifests/outputs

publish:
runs-on: ubuntu-latest
needs: integration-tests
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm ci

- name: Initialize git user email
run: git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}"

Expand Down
77 changes: 20 additions & 57 deletions Refactor-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,23 @@ There have also been some changes to the structure of manifest files. Some of th
- **Node level config**
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.
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.
```yaml
tree:
children:
child-1:
pipeline:
- teads-curve
- sci-e
- sci-embodied
- sci-o
- time-sync
- sci
config:
group-by:
group:
- region
- cloud/instance-type
compute:
- teads-curve
- sci-e
- sci-embodied
- sci-o
- time-sync
- sci
regroup:
- region
- cloud/instance-type
```
- **Defaults**
Expand All @@ -156,12 +155,13 @@ There have also been some changes to the structure of manifest files. Some of th
children:
child-1:
pipeline:
- teads-curve
- sci-e
- sci-embodied
- sci-o
- time-sync
- sci
compute:
- teads-curve
- sci-e
- sci-embodied
- sci-o
- time-sync
- sci
defaults:
cpu/thermal-design-power: 100
grid/carbon-intensity: 800
Expand Down Expand Up @@ -199,9 +199,7 @@ The aggregate plugin aggregates data in two ways: first it condenses individual
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:
- `metrics`: which metrics do you want to aggregate? Every metric you provide here must exist in the output array.
- `method`: the aggregation method for the specied metric
- `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.
- `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.
Expand All @@ -210,45 +208,10 @@ Here's what the config block should look like:
```yaml
aggregation:
metrics:
'carbon':
method: 'sum'
- carbon
type: 'both'
```
### Groupby
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.
You can initialize the plugin as follows:
```yaml
initialize:
plugins:
'group-by':
path: builtin
method: GroupBy
```
Then you configure groupby for each component in the node level config. In the following example we will regroup the outputs by the `region`:
```yaml
tree:
children:
child-1:
pipeline:
- teads-curve
- sci-e
- sci-embodied
- sci-o
- time-sync
- group-by
- sci
config:
group-by:
group:
- region
```
### Exhaust
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ tree:
children:
child:
pipeline:
- coefficient
compute:
- coefficient
config:
sum:
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ tree:
children:
child:
pipeline:
- coefficient
compute:
- coefficient
config:
sum:
inputs:
Expand Down
3 changes: 2 additions & 1 deletion manifests/examples/builtins/coefficient/success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ tree:
children:
child:
pipeline:
- coefficient
compute:
- coefficient
config:
sum:
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tree:
children:
child:
pipeline:
- cloud-metadata
compute:
- cloud-metadata
config:
inputs:
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tree:
children:
child:
pipeline:
- cloud-metadata
compute:
- cloud-metadata
config:
inputs:
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tree:
children:
child:
pipeline:
- cloud-metadata
compute:
- cloud-metadata
config:
inputs:
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tree:
children:
child:
pipeline:
- cloud-metadata
compute:
- cloud-metadata
config:
inputs:
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tree:
children:
child:
pipeline:
- cloud-metadata
compute:
- cloud-metadata
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tree:
children:
child:
pipeline:
- cloud-metadata
compute:
- cloud-metadata
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tree:
children:
child:
pipeline:
- cloud-metadata
compute:
- cloud-metadata
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tree:
children:
child:
pipeline:
- cloud-metadata
compute:
- cloud-metadata
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ tree:
children:
child:
pipeline:
- tdp-finder
compute:
- tdp-finder
config:
inputs:
- timestamp: 2023-07-06T00:00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ tree:
children:
child:
pipeline:
- tdp-finder
compute:
- tdp-finder
config:
inputs:
- timestamp: 2023-07-06T00:00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ tree:
children:
child:
pipeline:
- tdp-finder
compute:
- tdp-finder
config:
inputs:
- timestamp: 2023-07-06T00:00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ tree:
children:
child:
pipeline:
- cloud-metadata
- divide
compute:
- cloud-metadata
- divide
config:
divide:
defaults:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ tree:
children:
child:
pipeline:
- cloud-metadata
- divide
compute:
- cloud-metadata
- divide
config:
divide:
defaults:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ tree:
children:
child:
pipeline:
- cloud-metadata
- divide
compute:
- cloud-metadata
- divide
config:
divide:
defaults:
Expand Down
7 changes: 3 additions & 4 deletions manifests/examples/builtins/divide/success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ tree:
children:
child:
pipeline:
- cloud-metadata
- divide
config:
divide:
compute:
- cloud-metadata
- divide
defaults:
cloud/vendor: aws
cloud/instance-type: m5n.large
Expand Down
5 changes: 2 additions & 3 deletions manifests/examples/builtins/exponent/success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ tree:
children:
child:
pipeline:
- exponent
config:
exponent:
compute:
- exponent
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
Expand Down
Loading

0 comments on commit 862ca01

Please sign in to comment.