-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design a generic exponent
plugin
#673
Closed
3 of 10 tasks
Tracked by
#656
zanete opened this issue
Apr 29, 2024
· 3 comments
· Fixed by Green-Software-Foundation/if-plugins#91
Closed
3 of 10 tasks
Tracked by
#656
Design a generic exponent
plugin
#673
zanete opened this issue
Apr 29, 2024
· 3 comments
· Fixed by Green-Software-Foundation/if-plugins#91
Milestone
Comments
3 tasks
@zanete @pazbardanl please take a look at the ticket - I consider this ready to work on |
@jmcook1186 I feel my comment on the #672 here is also relevant on this issue. |
assigning to @manushak again - we need a final approval on this PR |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: