You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What
Create a new generic exponent plugin in 'if-plugins`
Why
We want to support as many pipelines as possible using generic plugins that can be adapted to many use cases. We currently have sum, multiply, coefficient. We also need to support exponent (i.e. raising the value of a given parameter by a power).
As a user I want to be able to execute any arbitrary logic using if plugins.
Prerequisites/resources
None
SoW (scope of work)
plugin code is added to if-plugins repo
documentation updated to if-plugins repo
documentation is added to if.greensoftware.foundation
unit tests added, giving 100% coverage and passing
manifests are added to if repo demonstrating usage
Plugin details
Inputs:
input-parameter: the input parameter whose value will be used as the base. It must exist in the input data.
exponent: the power that the value of input-parameter should be raised to
output-parameter: a string to be used as the name of the output value
e.g. to grab the value of cpu-energy from each element in the input data array and raise it to the third power, and add it to the output data as cpu-energy-cubed you would set:
outputs
The plugin should add a new field to the output data whose name is equal to output-parameter and whose value is equal to input-parameter ** exponent.
The sum and coefficient plugin code can be used as a template to accelerate the development of this plugin.
Acceptance criteria
A plugin called exponent exists in the if-plugins repository Given (Setup): the exponent plugin exists When (Action): a user has downloaded and installed if and if-plugins Then (Assertion): the user should be able to include exponent in a pipeline and raise the value of any parameter that exists in their input data to a given power.
Unit tests exists with 100% coverage over exponent Given (Setup): a user has downloaded and installed if-plugins When (Action): a user runs npx jest --coverage Then (Assertion): the coverage report should show that exponent is 100% covered and passing
Documentation exists in plugin readme Given (Setup): the user visits the if-plugins repository When the user navigates to src/lib/exponent Then the user sees a README containing documentation describing the exponent plugin, copying the format from the other plugin readmes.
Documentation exists in if.greensoftware.foundation Given: the user is on if.greensoftware.foundation When (Action): they navigate to reference/plugins and find the exponent plugin section Then (Assertion): they see a link to the plugin readme for the exponent plugin
Example manifests exists Given: the user has downloaded and installed if When (Action): the user navigates to if/manifests/plugins Then (Assertion): they see manifests that include the subtract plugin
The text was updated successfully, but these errors were encountered:
Sub of: #656
What
Create a new generic
exponent
plugin in 'if-plugins`Why
We want to support as many pipelines as possible using generic plugins that can be adapted to many use cases. We currently have
sum
,multiply
,coefficient
. We also need to supportexponent
(i.e. raising the value of a given parameter by a power).As a user I want to be able to execute any arbitrary logic using
if
plugins.Prerequisites/resources
None
SoW (scope of work)
if-plugins
repoif-plugins
repoif.greensoftware.foundation
if
repo demonstrating usagePlugin details
input-parameter
: the input parameter whose value will be used as the base. It must exist in the input data.exponent
: the power that the value ofinput-parameter
should be raised tooutput-parameter
: a string to be used as the name of the output valuee.g. to grab the value of
cpu-energy
from each element in the input data array and raise it to the third power, and add it to the output data ascpu-energy-cubed
you would set:The plugin should add a new field to the output data whose name is equal to
output-parameter
and whose value is equal toinput-parameter ** exponent
.The
sum
andcoefficient
plugin code can be used as a template to accelerate the development of this plugin.Acceptance criteria
A plugin called
exponent
exists in theif-plugins
repositoryGiven (Setup): the
exponent
plugin existsWhen (Action): a user has downloaded and installed
if
andif-plugins
Then (Assertion): the user should be able to include
exponent
in a pipeline and raise the value of any parameter that exists in their input data to a given power.Unit tests exists with 100% coverage over
exponent
Given (Setup): a user has downloaded and installed
if-plugins
When (Action): a user runs
npx jest --coverage
Then (Assertion): the coverage report should show that
exponent
is 100% covered and passingDocumentation exists in plugin readme
Given (Setup): the user visits the
if-plugins
repositoryWhen the user navigates to
src/lib/exponent
Then the user sees a README containing documentation describing the
exponent
plugin, copying the format from the other plugin readmes.Documentation exists in if.greensoftware.foundation
Given: the user is on if.greensoftware.foundation
When (Action): they navigate to
reference/plugins
and find theexponent
plugin sectionThen (Assertion): they see a link to the plugin readme for the exponent plugin
Example manifests exists
Given: the user has downloaded and installed
if
When (Action): the user navigates to
if/manifests/plugins
Then (Assertion): they see manifests that include the
subtract
pluginThe text was updated successfully, but these errors were encountered: