What
A feature (could be a new command) that checks a manifest and reports the number of unique parameters existing across all the plugins in a manifest and the proportion of them that have explicitly declared parameter metadata. If the coverage is not 100% it reports which parameters require metadata.
The feature could work as a new CLI command, if-metadata-check thattakes a manifest as it's sole argument, e,.g.
if-metadata-check -m <manifest .yml>
The output could look as follows:
metadata coverage: 95%
parameters without metadata:
- carbon
- energy
Why
It is best practise to cover all parameters with metadata in the manifest. However, with large manifests it can be difficult to manually identify parameters whose metadata is missing.
Context
This helps people with complex manifests conform to best practises
Prerequisites/resources
n/a
SoW (scope of work)
Acceptance criteria
Scenario 1
Given the CLI has been shipped with the desired functionality
When I run if-metadata-check -m manifest.yml with the following manifest:
name: sum
description: successful path
tags:
initialize:
plugins:
sum:
method: Sum
path: "builtin"
config:
input-parameters: ["cpu/energy", "network/energy"]
output-parameter: "energy"
tree:
children:
child:
pipeline:
compute:
- sum
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
cpu/energy: 0.001
network/energy: 0.001
Then I receive the following result:
metadata coverage: 0%
parameters without metadata:
- cpu/energy
- network/energy
- energy
Scenario 2
Given the CLI has been shipped with the desired functionality
When I run if-metadata-check -m manifest.yml with the following manifest:
name: sum
description: successful path
tags:
initialize:
plugins:
sum:
method: Sum
path: "builtin"
config:
input-parameters: ["cpu/energy", "network/energy"]
output-parameter: "energy"
parameter-metadata:
inputs:
cpu/energy:
unit: kWh
description: energy used by CPU
aggregation-method:
time: sum
component: sum
tree:
children:
child:
pipeline:
compute:
- sum
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
cpu/energy: 0.001
network/energy: 0.001
Then I receive the following result:
metadata coverage: 33%
parameters without metadata:
- network/energy
- energy
What
A feature (could be a new command) that checks a manifest and reports the number of unique parameters existing across all the plugins in a manifest and the proportion of them that have explicitly declared parameter metadata. If the coverage is not 100% it reports which parameters require metadata.
The feature could work as a new CLI command,
if-metadata-checkthattakes a manifest as it's sole argument, e,.g.The output could look as follows:
Why
It is best practise to cover all parameters with metadata in the manifest. However, with large manifests it can be difficult to manually identify parameters whose metadata is missing.
Context
This helps people with complex manifests conform to best practises
Prerequisites/resources
n/a
SoW (scope of work)
if-metadata-checkto CLIAcceptance criteria
Scenario 1
Given the CLI has been shipped with the desired functionality
When I run
if-metadata-check -m manifest.ymlwith the following manifest:Then I receive the following result:
Scenario 2
Given the CLI has been shipped with the desired functionality
When I run
if-metadata-check -m manifest.ymlwith the following manifest:Then I receive the following result: