@grnsft/if 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +4 -5
- package/README.md +14 -33
- package/Refactor-migration-guide.md +5 -6
- package/build/builtins/coefficient/index.d.ts +1 -2
- package/build/builtins/coefficient/index.js +18 -4
- package/build/builtins/copy-param/index.d.ts +2 -0
- package/build/builtins/copy-param/index.js +68 -0
- package/build/builtins/csv-lookup/index.d.ts +1 -1
- package/build/builtins/csv-lookup/index.js +44 -37
- package/build/builtins/divide/index.d.ts +1 -1
- package/build/builtins/divide/index.js +22 -11
- package/build/builtins/exponent/index.d.ts +1 -2
- package/build/builtins/exponent/index.js +9 -23
- package/build/builtins/export-csv-raw.d.ts +4 -2
- package/build/builtins/export-csv-raw.js +7 -7
- package/build/builtins/export-csv.js +8 -11
- package/build/builtins/export-log.js +1 -1
- package/build/builtins/export-yaml.js +6 -6
- package/build/builtins/group-by.d.ts +1 -1
- package/build/builtins/group-by.js +5 -5
- package/build/builtins/index.d.ts +1 -0
- package/build/builtins/index.js +4 -2
- package/build/builtins/interpolation/index.d.ts +1 -1
- package/build/builtins/interpolation/index.js +10 -8
- package/build/builtins/mock-observations/helpers/common-generator.d.ts +2 -2
- package/build/builtins/mock-observations/helpers/common-generator.js +10 -13
- package/build/builtins/mock-observations/helpers/rand-int-generator.d.ts +2 -2
- package/build/builtins/mock-observations/helpers/rand-int-generator.js +14 -24
- package/build/builtins/mock-observations/index.d.ts +1 -2
- package/build/builtins/mock-observations/index.js +2 -4
- package/build/builtins/multiply/index.d.ts +1 -2
- package/build/builtins/multiply/index.js +10 -16
- package/build/builtins/regex/index.d.ts +1 -2
- package/build/builtins/regex/index.js +8 -12
- package/build/builtins/sci/index.d.ts +1 -2
- package/build/builtins/sci/index.js +23 -22
- package/build/builtins/sci-embodied/index.d.ts +1 -1
- package/build/builtins/sci-embodied/index.js +16 -17
- package/build/builtins/shell/index.d.ts +1 -2
- package/build/builtins/shell/index.js +4 -4
- package/build/builtins/subtract/index.d.ts +1 -2
- package/build/builtins/subtract/index.js +7 -23
- package/build/builtins/sum/index.d.ts +1 -2
- package/build/builtins/sum/index.js +14 -11
- package/build/builtins/time-sync.d.ts +1 -2
- package/build/builtins/time-sync.js +62 -67
- package/build/check.d.ts +2 -0
- package/build/check.js +95 -0
- package/build/config/config.d.ts +13 -1
- package/build/config/config.js +61 -1
- package/build/config/params.js +1 -6
- package/build/config/strings.d.ts +45 -5
- package/build/config/strings.js +50 -9
- package/build/diff.js +2 -2
- package/build/env.d.ts +2 -0
- package/build/env.js +38 -0
- package/build/lib/aggregate.js +1 -1
- package/build/lib/compute.js +1 -1
- package/build/lib/exhaust.js +4 -4
- package/build/lib/initialize.js +20 -24
- package/build/lib/load.js +4 -4
- package/build/types/compute.d.ts +1 -1
- package/build/types/compute.js +1 -1
- package/build/types/if-env.d.ts +8 -0
- package/build/types/if-env.js +3 -0
- package/build/types/interface.d.ts +1 -19
- package/build/types/interface.js +1 -1
- package/build/types/npm.d.ts +9 -0
- package/build/types/npm.js +3 -0
- package/build/types/process-args.d.ts +9 -0
- package/build/types/process-args.js +1 -1
- package/build/util/aggregation-helper.d.ts +1 -1
- package/build/util/aggregation-helper.js +5 -5
- package/build/util/args.d.ts +23 -1
- package/build/util/args.js +91 -14
- package/build/util/debug-logger.js +8 -7
- package/build/util/fs.d.ts +20 -0
- package/build/util/fs.js +94 -0
- package/build/util/helpers.d.ts +25 -5
- package/build/util/helpers.js +111 -15
- package/build/util/npm.d.ts +28 -0
- package/build/util/npm.js +152 -0
- package/build/util/plugin-storage.js +4 -4
- package/build/util/validations.js +4 -4
- package/jest.config.js +1 -1
- package/manifests/{plugins → examples/builtins/csv-lookup}/cloud-metadata/failure-invalid-instance-type.yaml +9 -3
- package/manifests/examples/builtins/csv-lookup/cloud-metadata/failure-invalid-vendor.yaml +27 -0
- package/manifests/{plugins → examples/builtins/csv-lookup}/cloud-metadata/failure-missing-cloud-vendor.yml +9 -3
- package/manifests/{plugins → examples/builtins/csv-lookup}/cloud-metadata/success.yml +8 -2
- package/manifests/{plugins/csv-lookup → examples/builtins/csv-lookup/region-metadata}/failure-missing-column.yml +1 -2
- package/manifests/{plugins/csv-lookup → examples/builtins/csv-lookup/region-metadata}/failure-missing-output.yml +1 -2
- package/manifests/{plugins/csv-lookup → examples/builtins/csv-lookup/region-metadata}/success-renaming.yml +1 -2
- package/manifests/{plugins/csv-lookup → examples/builtins/csv-lookup/region-metadata}/success.yml +2 -3
- package/manifests/examples/builtins/csv-lookup/tdp-finder/failure-missing-input-param.yml +23 -0
- package/manifests/examples/builtins/csv-lookup/tdp-finder/failure-unsupported-physical-processor.yml +24 -0
- package/manifests/examples/builtins/csv-lookup/tdp-finder/success.yml +24 -0
- package/manifests/{plugins → examples/builtins}/divide/failure-denominator-equal-zero.yml +8 -9
- package/manifests/{plugins → examples/builtins}/divide/failure-invalid-config-denominator.yml +8 -9
- package/manifests/{plugins → examples/builtins}/divide/failure-missing-numerator.yml +8 -9
- package/manifests/{plugins → examples/builtins}/divide/success.yml +9 -10
- package/manifests/examples/builtins/exponent/success.yml +25 -0
- package/manifests/{plugins → examples/builtins}/groupby/success.yml +1 -1
- package/manifests/examples/builtins/interpolation/success.yml +23 -0
- package/manifests/{plugins → examples/builtins}/sci/failure-missing-input-param.yml +2 -6
- package/manifests/{plugins → examples/builtins}/sci/success.yml +0 -3
- package/manifests/examples/builtins/subtract/success.yml +24 -0
- package/manifests/{plugins → examples/builtins}/sum/success.yml +1 -1
- package/manifests/examples/{generics.yml → pipelines/generics.yml} +49 -13
- package/manifests/examples/{nesting.yml → pipelines/nesting.yml} +82 -35
- package/manifests/examples/{pipeline-teads-sci.yml → pipelines/pipeline-teads-sci.yml} +54 -18
- package/manifests/examples/{pipeline-with-aggregate.yml → pipelines/pipeline-with-aggregate.yml} +67 -25
- package/manifests/examples/{pipeline-with-mocks.yml → pipelines/pipeline-with-mocks.yml} +65 -22
- package/manifests/examples/pipelines/zeros.yml +130 -0
- package/manifests/outputs/bugs/aggregation-error-wrong-metric.yaml +243 -0
- package/manifests/outputs/bugs/initialize-error-no-config.yaml +78 -0
- package/manifests/outputs/bugs/initialize-error-no-path.yaml +91 -0
- package/manifests/outputs/bugs/initialize-error-no-plugins.yaml +74 -0
- package/manifests/outputs/bugs/input-error-missing-duration.yaml +84 -0
- package/manifests/outputs/bugs/mock-observations-failure-duration-is-zero.yaml +81 -0
- package/manifests/outputs/bugs/pipeline-error-naming-mismatch.yaml +91 -0
- package/manifests/outputs/bugs/pipeline-error-uninitialized-plugin.yaml +92 -0
- package/manifests/outputs/bugs/pipeline-ordering-error.yaml +155 -0
- package/manifests/outputs/bugs/sci-embodied-missing-resources-total.yaml +73 -0
- package/manifests/outputs/divide.yaml +93 -0
- package/manifests/outputs/features/aggregate-failure-invalid-metrics.yaml +101 -0
- package/manifests/outputs/features/aggregate-failure-missing-metric-in-inputs.yaml +100 -0
- package/manifests/outputs/features/aggregate-horizontal.yaml +128 -0
- package/manifests/outputs/features/aggregate-vertical.yaml +151 -0
- package/manifests/outputs/features/aggregate.yaml +155 -0
- package/manifests/outputs/pipelines/cloud-metadata-divide.yaml +95 -0
- package/manifests/outputs/pipelines/mock-obs-group-by-cloud-meta.yaml +645 -0
- package/manifests/outputs/pipelines/mock-obs-groupby.yaml +178 -0
- package/manifests/outputs/pipelines/mock-obs-time-sync.yaml +350 -0
- package/manifests/outputs/plugins/coefficient/failure-invalid-config-input-param.yaml +73 -0
- package/manifests/outputs/plugins/coefficient/failure-output-param-is-null.yaml +73 -0
- package/manifests/outputs/plugins/coefficient/success.yaml +75 -0
- package/manifests/outputs/plugins/csv-lookup/cloud-metadata/failure-invalid-instance-type.yaml +27 -0
- package/manifests/{plugins → outputs/plugins/csv-lookup}/cloud-metadata/failure-invalid-vendor.yaml +8 -2
- package/manifests/outputs/plugins/csv-lookup/cloud-metadata/failure-missing-cloud-vendor.yaml +77 -0
- package/manifests/outputs/plugins/csv-lookup/cloud-metadata/success.yaml +82 -0
- package/manifests/outputs/plugins/csv-lookup/region-metadata/failure-missing-column.yaml +76 -0
- package/manifests/outputs/plugins/csv-lookup/region-metadata/failure-missing-output.yaml +75 -0
- package/manifests/outputs/plugins/csv-lookup/region-metadata/success-renaming.yaml +80 -0
- package/manifests/outputs/plugins/csv-lookup/region-metadata/success.yaml +92 -0
- package/manifests/outputs/plugins/csv-lookup/tdp-finder/failure-missing-input-param.yaml +74 -0
- package/manifests/outputs/plugins/csv-lookup/tdp-finder/failure-unsupported-physical-processor.yaml +75 -0
- package/manifests/outputs/plugins/csv-lookup/tdp-finder/success.yaml +76 -0
- package/manifests/outputs/plugins/divide/failure-invalid-config-denominator.yaml +73 -0
- package/manifests/outputs/plugins/divide/failure-missing-numerator.yaml +77 -0
- package/manifests/outputs/plugins/divide/success-denominator-equal-zero.yaml +95 -0
- package/manifests/outputs/plugins/divide/success.yaml +95 -0
- package/manifests/outputs/plugins/exponent/success.yaml +77 -0
- package/manifests/outputs/plugins/groupby/failure-invalid-config-group.yaml +96 -0
- package/manifests/outputs/plugins/groupby/failure-missing-cloud-instance-type.yaml +95 -0
- package/manifests/outputs/plugins/groupby/success.yaml +101 -0
- package/manifests/outputs/plugins/interpolation/interpolation.yaml +83 -0
- package/manifests/outputs/plugins/interpolation/success.yaml +83 -0
- package/manifests/outputs/plugins/mock-observations/failure-invalid-config-cpu-range.yaml +86 -0
- package/manifests/outputs/plugins/mock-observations/failure-invalid-memory-utilization-range.yaml +84 -0
- package/manifests/outputs/plugins/mock-observations/failure-missing-timestamp-from-param.yaml +83 -0
- package/manifests/outputs/plugins/mock-observations/success.yaml +220 -0
- package/manifests/outputs/plugins/multiply/failure-input-parameter-is-missing.yaml +75 -0
- package/manifests/outputs/plugins/multiply/success-with-multiple-inputs.yaml +96 -0
- package/manifests/outputs/plugins/multiply/success.yaml +78 -0
- package/manifests/outputs/plugins/regex/failure-missing-input-param.yaml +75 -0
- package/manifests/outputs/plugins/regex/failure-not-matching-with-regex.yaml +76 -0
- package/manifests/outputs/plugins/regex/success.yaml +81 -0
- package/manifests/outputs/plugins/sci/failure-invalid-config-value.yaml +72 -0
- package/manifests/outputs/plugins/sci/failure-missing-input-param.yaml +72 -0
- package/manifests/outputs/plugins/sci/success.yml.yaml +80 -0
- package/manifests/outputs/plugins/sci-embodied/failure-invalid-default-emission-value.yaml +75 -0
- package/manifests/outputs/plugins/sci-embodied/failure-missing-expected-lifespan.yaml +71 -0
- package/manifests/outputs/plugins/sci-embodied/success.yaml +78 -0
- package/manifests/outputs/plugins/shell/failure-invalid-command.yaml +70 -0
- package/manifests/outputs/plugins/shell/success.yaml +68 -0
- package/manifests/outputs/plugins/subtract/success.yaml +78 -0
- package/manifests/outputs/plugins/sum/failure-missing-input-param.yaml +75 -0
- package/manifests/outputs/plugins/sum/failure-missing-output-param.yaml +78 -0
- package/manifests/outputs/plugins/sum/success.yaml +78 -0
- package/manifests/outputs/plugins/time-sync/failure-config-start-later-end.yaml +82 -0
- package/manifests/outputs/plugins/time-sync/failure-missing-global-config.yaml +78 -0
- package/manifests/outputs/plugins/time-sync/success.yaml +119 -0
- package/package.json +10 -4
- package/src/__mocks__/mock-manifest.yaml +72 -0
- package/src/builtins/README.md +1 -1
- package/src/builtins/coefficient/README.md +19 -1
- package/src/builtins/copy-param/README.md +104 -0
- package/src/builtins/csv-lookup/README.md +39 -1
- package/src/builtins/divide/README.md +29 -3
- package/src/builtins/exponent/README.md +21 -1
- package/src/builtins/interpolation/README.md +29 -1
- package/src/builtins/mock-observations/README.md +1 -1
- package/src/builtins/multiply/README.md +16 -1
- package/src/builtins/regex/README.md +32 -2
- package/src/builtins/sci/README.md +24 -1
- package/src/builtins/sci-embodied/README.md +15 -1
- package/src/builtins/shell/README.md +12 -1
- package/src/builtins/subtract/README.md +12 -1
- package/src/builtins/sum/README.md +28 -1
- package/src/config/env-template.yml +24 -0
- package/build/builtins/coefficient/types.d.ts +0 -5
- package/build/builtins/coefficient/types.js +0 -3
- package/build/builtins/exponent/types.d.ts +0 -5
- package/build/builtins/exponent/types.js +0 -3
- package/build/builtins/interpolation/types.d.ts +0 -5
- package/build/builtins/interpolation/types.js +0 -10
- package/build/builtins/mock-observations/types.d.ts +0 -13
- package/build/builtins/mock-observations/types.js +0 -3
- package/build/builtins/multiply/types.d.ts +0 -4
- package/build/builtins/multiply/types.js +0 -3
- package/build/builtins/subtract/types.d.ts +0 -4
- package/build/builtins/subtract/types.js +0 -3
- package/build/builtins/sum/types.d.ts +0 -4
- package/build/builtins/sum/types.js +0 -3
- package/build/types/common.d.ts +0 -4
- package/build/types/common.js +0 -3
- package/build/types/group-by.d.ts +0 -3
- package/build/types/group-by.js +0 -3
- package/build/types/helpers.d.ts +0 -4
- package/build/types/helpers.js +0 -3
- package/build/util/errors.d.ts +0 -6
- package/build/util/errors.js +0 -33
- package/manifests/bugs/aggregation-error-wrong-metric.yml +0 -128
- package/manifests/bugs/azure-importer-ignoring-defaults.yml +0 -61
- package/manifests/bugs/azure-importer-incorrect-calculation.yml +0 -56
- package/manifests/bugs/initialize-error-no-config.yml +0 -27
- package/manifests/bugs/initialize-error-no-path.yml +0 -28
- package/manifests/bugs/initialize-error-no-plugins.yml +0 -23
- package/manifests/bugs/input-error-missing-duration.yml +0 -21
- package/manifests/bugs/mock-observations-failure-duration-is-zero.yml +0 -34
- package/manifests/bugs/pipeline-error-naming-mismatch.yml +0 -28
- package/manifests/bugs/pipeline-error-uninitialized-plugin.yml +0 -29
- package/manifests/bugs/pipeline-ordering-error.yml +0 -82
- package/manifests/bugs/sci-embodied-missing-resources-total.yml +0 -23
- package/manifests/examples/basic.yml +0 -28
- package/manifests/examples/mock-cpu-util-to-carbon.yml +0 -70
- package/manifests/features/aggregate-failure-inalid-metrics.yml +0 -43
- package/manifests/features/aggregate-failure-missing-metric-in-inputs.yml +0 -43
- package/manifests/features/aggregate-horizontal.yml +0 -44
- package/manifests/features/aggregate-vertical.yml +0 -44
- package/manifests/features/aggregate.yml +0 -44
- package/manifests/integrations/cloud-metadata-divide-boavizta.yml +0 -38
- package/manifests/integrations/mock-obs-group-by-cloud-meta.yml +0 -51
- package/manifests/integrations/mock-obs-groupby.yml +0 -39
- package/manifests/integrations/mock-obs-time-sync.yml +0 -65
- package/manifests/plugins/tdp-finder/failure-missing-input-param.yml +0 -18
- package/manifests/plugins/tdp-finder/failure-unsupported-physical-processor.yml +0 -19
- package/manifests/plugins/tdp-finder/success.yml +0 -19
- /package/manifests/{plugins → examples/builtins}/coefficient/failure-invalid-config-input-param.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/coefficient/failure-output-param-is-null.yaml +0 -0
- /package/manifests/{plugins → examples/builtins}/coefficient/success.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/groupby/failure-invalid-config-group.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/groupby/failure-missing-cloud-instance-type.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/interpolation/interpolation.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/mock-observations/failure-invalid-config-cpu-range.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/mock-observations/failure-invalid-memory-utilization-range.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/mock-observations/failure-missing-timestamp-from-param.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/mock-observations/success.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/multiply/failure-input-parameter-is-missing.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/multiply/success-with-multiple-inputs.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/multiply/success.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/regex/failure-missing-input-param.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/regex/failure-not-matching-with-regex.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/regex/success.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/sci/failure-invalid-config-value.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/sci-embodied/failure-invalid-default-emission-value.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/sci-embodied/failure-missing-expected-lifespan.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/sci-embodied/success.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/shell/failure-invalid-command.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/shell/success.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/sum/failure-missing-input-param.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/sum/failure-missing-output-param.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/time-sync/failure-config-start-later-end.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/time-sync/failure-missing-global-config.yml +0 -0
- /package/manifests/{plugins → examples/builtins}/time-sync/success.yml +0 -0
- /package/manifests/examples/{instance-metadata.yml → pipelines/instance-metadata.yml} +0 -0
- /package/manifests/examples/{sci.yml → pipelines/sci.yml} +0 -0
- /package/manifests/examples/{teads-curve.yml → pipelines/teads-curve.yml} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: sum
|
|
2
|
+
description: failure with `inputs[0]` misses one of `global-config.input-parameters`
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
outputs:
|
|
6
|
+
- yaml
|
|
7
|
+
plugins:
|
|
8
|
+
sum:
|
|
9
|
+
method: Sum
|
|
10
|
+
path: builtin
|
|
11
|
+
global-config:
|
|
12
|
+
input-parameters:
|
|
13
|
+
- cpu/energy
|
|
14
|
+
- network/energy
|
|
15
|
+
output-parameter: energy
|
|
16
|
+
execution:
|
|
17
|
+
status: fail
|
|
18
|
+
command: >-
|
|
19
|
+
/Users/mariamkhalatova/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
|
|
20
|
+
/Users/mariamkhalatova/Projects/UK/if/src/index.ts -m
|
|
21
|
+
manifests/outputs/plugins/sum/failure-missing-input-param.yml -o
|
|
22
|
+
manifests/outputs/plugins/sum/failure-missing-input-param
|
|
23
|
+
environment:
|
|
24
|
+
if-version: 0.4.0
|
|
25
|
+
os: macOS
|
|
26
|
+
os-version: '13.2'
|
|
27
|
+
node-version: 18.14.2
|
|
28
|
+
date-time: 2024-07-02T20:55:20.733Z (UTC)
|
|
29
|
+
dependencies:
|
|
30
|
+
- '@babel/core@7.22.10'
|
|
31
|
+
- '@babel/preset-typescript@7.23.3'
|
|
32
|
+
- '@commitlint/cli@18.6.0'
|
|
33
|
+
- '@commitlint/config-conventional@18.6.0'
|
|
34
|
+
- '@grnsft/if-core@0.0.10'
|
|
35
|
+
|
|
36
|
+
- '@jest/globals@29.7.0'
|
|
37
|
+
- '@types/jest@29.5.8'
|
|
38
|
+
- '@types/js-yaml@4.0.9'
|
|
39
|
+
- '@types/luxon@3.4.2'
|
|
40
|
+
- '@types/node@20.9.0'
|
|
41
|
+
- axios-mock-adapter@1.22.0
|
|
42
|
+
- axios@1.7.2
|
|
43
|
+
- cross-env@7.0.3
|
|
44
|
+
- csv-parse@5.5.6
|
|
45
|
+
- csv-stringify@6.4.6
|
|
46
|
+
- fixpack@4.0.0
|
|
47
|
+
- gts@5.2.0
|
|
48
|
+
- husky@8.0.3
|
|
49
|
+
- jest@29.7.0
|
|
50
|
+
- js-yaml@4.1.0
|
|
51
|
+
- lint-staged@15.2.2
|
|
52
|
+
- luxon@3.4.4
|
|
53
|
+
- release-it@16.3.0
|
|
54
|
+
- rimraf@5.0.5
|
|
55
|
+
- ts-command-line-args@2.5.1
|
|
56
|
+
- ts-jest@29.1.1
|
|
57
|
+
- typescript-cubic-spline@1.0.1
|
|
58
|
+
- typescript@5.2.2
|
|
59
|
+
- winston@3.11.0
|
|
60
|
+
- zod@3.22.4
|
|
61
|
+
error: >-
|
|
62
|
+
InputValidationError: "cpu/energy" parameter is required. Error code:
|
|
63
|
+
invalid_type.
|
|
64
|
+
tree:
|
|
65
|
+
children:
|
|
66
|
+
child:
|
|
67
|
+
pipeline:
|
|
68
|
+
- sum
|
|
69
|
+
config:
|
|
70
|
+
sum: null
|
|
71
|
+
inputs:
|
|
72
|
+
- timestamp: 2023-08-06T00:00
|
|
73
|
+
duration: 3600
|
|
74
|
+
cpu: 0.001
|
|
75
|
+
network/energy: 0.001
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: sum
|
|
2
|
+
description: missing `output-parameter` in global-config
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
outputs:
|
|
6
|
+
- yaml
|
|
7
|
+
plugins:
|
|
8
|
+
sum:
|
|
9
|
+
method: Sum
|
|
10
|
+
path: builtin
|
|
11
|
+
global-config:
|
|
12
|
+
input-parameters:
|
|
13
|
+
- cpu/energy
|
|
14
|
+
- network/energy
|
|
15
|
+
execution:
|
|
16
|
+
status: fail
|
|
17
|
+
command: >-
|
|
18
|
+
/Users/mariamkhalatova/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
|
|
19
|
+
/Users/mariamkhalatova/Projects/UK/if/src/index.ts -m
|
|
20
|
+
manifests/outputs/plugins/sum/failure-missing-output-param.yml -o
|
|
21
|
+
manifests/outputs/plugins/sum/failure-missing-output-param
|
|
22
|
+
environment:
|
|
23
|
+
if-version: 0.4.0
|
|
24
|
+
os: macOS
|
|
25
|
+
os-version: '13.2'
|
|
26
|
+
node-version: 18.14.2
|
|
27
|
+
date-time: 2024-07-02T20:54:23.422Z (UTC)
|
|
28
|
+
dependencies:
|
|
29
|
+
- '@babel/core@7.22.10'
|
|
30
|
+
- '@babel/preset-typescript@7.23.3'
|
|
31
|
+
- '@commitlint/cli@18.6.0'
|
|
32
|
+
- '@commitlint/config-conventional@18.6.0'
|
|
33
|
+
- '@grnsft/if-core@0.0.10'
|
|
34
|
+
|
|
35
|
+
- '@jest/globals@29.7.0'
|
|
36
|
+
- '@types/jest@29.5.8'
|
|
37
|
+
- '@types/js-yaml@4.0.9'
|
|
38
|
+
- '@types/luxon@3.4.2'
|
|
39
|
+
- '@types/node@20.9.0'
|
|
40
|
+
- axios-mock-adapter@1.22.0
|
|
41
|
+
- axios@1.7.2
|
|
42
|
+
- cross-env@7.0.3
|
|
43
|
+
- csv-parse@5.5.6
|
|
44
|
+
- csv-stringify@6.4.6
|
|
45
|
+
- fixpack@4.0.0
|
|
46
|
+
- gts@5.2.0
|
|
47
|
+
- husky@8.0.3
|
|
48
|
+
- jest@29.7.0
|
|
49
|
+
- js-yaml@4.1.0
|
|
50
|
+
- lint-staged@15.2.2
|
|
51
|
+
- luxon@3.4.4
|
|
52
|
+
- release-it@16.3.0
|
|
53
|
+
- rimraf@5.0.5
|
|
54
|
+
- ts-command-line-args@2.5.1
|
|
55
|
+
- ts-jest@29.1.1
|
|
56
|
+
- typescript-cubic-spline@1.0.1
|
|
57
|
+
- typescript@5.2.2
|
|
58
|
+
- winston@3.11.0
|
|
59
|
+
- zod@3.22.4
|
|
60
|
+
error: >-
|
|
61
|
+
InputValidationError: "output-parameter" parameter is required. Error code:
|
|
62
|
+
invalid_type.
|
|
63
|
+
tree:
|
|
64
|
+
children:
|
|
65
|
+
child:
|
|
66
|
+
pipeline:
|
|
67
|
+
- sum
|
|
68
|
+
config:
|
|
69
|
+
sum: null
|
|
70
|
+
inputs:
|
|
71
|
+
- timestamp: 2023-08-06T00:00
|
|
72
|
+
duration: 3600
|
|
73
|
+
cpu/energy: 0.001
|
|
74
|
+
network/energy: 0.001
|
|
75
|
+
- timestamp: 2023-08-06T00:00
|
|
76
|
+
duration: 3600
|
|
77
|
+
cpu/energy: 0.001
|
|
78
|
+
network/energy: e
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: sum
|
|
2
|
+
description: successful path
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
sum:
|
|
7
|
+
path: builtin
|
|
8
|
+
method: Sum
|
|
9
|
+
global-config:
|
|
10
|
+
input-parameters:
|
|
11
|
+
- cpu/energy
|
|
12
|
+
- network/energy
|
|
13
|
+
output-parameter: energy
|
|
14
|
+
outputs:
|
|
15
|
+
- yaml
|
|
16
|
+
execution:
|
|
17
|
+
command: >-
|
|
18
|
+
/Users/mariamkhalatova/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
|
|
19
|
+
/Users/mariamkhalatova/Projects/UK/if/src/index.ts -m
|
|
20
|
+
manifests/outputs/plugins/sum/success.yml -o
|
|
21
|
+
manifests/outputs/plugins/sum/success
|
|
22
|
+
environment:
|
|
23
|
+
if-version: 0.4.0
|
|
24
|
+
os: macOS
|
|
25
|
+
os-version: '13.2'
|
|
26
|
+
node-version: 18.14.2
|
|
27
|
+
date-time: 2024-07-02T20:53:35.496Z (UTC)
|
|
28
|
+
dependencies:
|
|
29
|
+
- '@babel/core@7.22.10'
|
|
30
|
+
- '@babel/preset-typescript@7.23.3'
|
|
31
|
+
- '@commitlint/cli@18.6.0'
|
|
32
|
+
- '@commitlint/config-conventional@18.6.0'
|
|
33
|
+
- '@grnsft/if-core@0.0.10'
|
|
34
|
+
|
|
35
|
+
- '@jest/globals@29.7.0'
|
|
36
|
+
- '@types/jest@29.5.8'
|
|
37
|
+
- '@types/js-yaml@4.0.9'
|
|
38
|
+
- '@types/luxon@3.4.2'
|
|
39
|
+
- '@types/node@20.9.0'
|
|
40
|
+
- axios-mock-adapter@1.22.0
|
|
41
|
+
- axios@1.7.2
|
|
42
|
+
- cross-env@7.0.3
|
|
43
|
+
- csv-parse@5.5.6
|
|
44
|
+
- csv-stringify@6.4.6
|
|
45
|
+
- fixpack@4.0.0
|
|
46
|
+
- gts@5.2.0
|
|
47
|
+
- husky@8.0.3
|
|
48
|
+
- jest@29.7.0
|
|
49
|
+
- js-yaml@4.1.0
|
|
50
|
+
- lint-staged@15.2.2
|
|
51
|
+
- luxon@3.4.4
|
|
52
|
+
- release-it@16.3.0
|
|
53
|
+
- rimraf@5.0.5
|
|
54
|
+
- ts-command-line-args@2.5.1
|
|
55
|
+
- ts-jest@29.1.1
|
|
56
|
+
- typescript-cubic-spline@1.0.1
|
|
57
|
+
- typescript@5.2.2
|
|
58
|
+
- winston@3.11.0
|
|
59
|
+
- zod@3.22.4
|
|
60
|
+
status: success
|
|
61
|
+
tree:
|
|
62
|
+
children:
|
|
63
|
+
child:
|
|
64
|
+
pipeline:
|
|
65
|
+
- sum
|
|
66
|
+
config:
|
|
67
|
+
sum: null
|
|
68
|
+
inputs:
|
|
69
|
+
- timestamp: 2023-08-06T00:00
|
|
70
|
+
duration: 3600
|
|
71
|
+
cpu/energy: 0.001
|
|
72
|
+
network/energy: 0.001
|
|
73
|
+
outputs:
|
|
74
|
+
- timestamp: 2023-08-06T00:00
|
|
75
|
+
duration: 3600
|
|
76
|
+
cpu/energy: 0.001
|
|
77
|
+
network/energy: 0.001
|
|
78
|
+
energy: 0.002
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: time-sync
|
|
2
|
+
description: >-
|
|
3
|
+
failure with `global-config.start-time` being later than
|
|
4
|
+
`global-config.end-time`
|
|
5
|
+
tags: null
|
|
6
|
+
initialize:
|
|
7
|
+
outputs:
|
|
8
|
+
- yaml
|
|
9
|
+
plugins:
|
|
10
|
+
time-sync:
|
|
11
|
+
method: TimeSync
|
|
12
|
+
path: builtin
|
|
13
|
+
global-config:
|
|
14
|
+
start-time: '2023-12-12T00:01:00.000Z'
|
|
15
|
+
end-time: '2023-12-12T00:00:00.000Z'
|
|
16
|
+
interval: 5
|
|
17
|
+
allow-padding: true
|
|
18
|
+
execution:
|
|
19
|
+
status: fail
|
|
20
|
+
command: >-
|
|
21
|
+
/Users/mariamkhalatova/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
|
|
22
|
+
/Users/mariamkhalatova/Projects/UK/if/src/index.ts -m
|
|
23
|
+
manifests/outputs/plugins/time-sync/failure-config-start-later-end.yml -o
|
|
24
|
+
manifests/outputs/plugins/time-sync/failure-config-start-later-end
|
|
25
|
+
environment:
|
|
26
|
+
if-version: 0.4.0
|
|
27
|
+
os: macOS
|
|
28
|
+
os-version: '13.2'
|
|
29
|
+
node-version: 18.14.2
|
|
30
|
+
date-time: 2024-07-02T21:13:59.114Z (UTC)
|
|
31
|
+
dependencies:
|
|
32
|
+
- '@babel/core@7.22.10'
|
|
33
|
+
- '@babel/preset-typescript@7.23.3'
|
|
34
|
+
- '@commitlint/cli@18.6.0'
|
|
35
|
+
- '@commitlint/config-conventional@18.6.0'
|
|
36
|
+
- '@grnsft/if-core@0.0.10'
|
|
37
|
+
|
|
38
|
+
- '@jest/globals@29.7.0'
|
|
39
|
+
- '@types/jest@29.5.8'
|
|
40
|
+
- '@types/js-yaml@4.0.9'
|
|
41
|
+
- '@types/luxon@3.4.2'
|
|
42
|
+
- '@types/node@20.9.0'
|
|
43
|
+
- axios-mock-adapter@1.22.0
|
|
44
|
+
- axios@1.7.2
|
|
45
|
+
- cross-env@7.0.3
|
|
46
|
+
- csv-parse@5.5.6
|
|
47
|
+
- csv-stringify@6.4.6
|
|
48
|
+
- fixpack@4.0.0
|
|
49
|
+
- gts@5.2.0
|
|
50
|
+
- husky@8.0.3
|
|
51
|
+
- jest@29.7.0
|
|
52
|
+
- js-yaml@4.1.0
|
|
53
|
+
- lint-staged@15.2.2
|
|
54
|
+
- luxon@3.4.4
|
|
55
|
+
- release-it@16.3.0
|
|
56
|
+
- rimraf@5.0.5
|
|
57
|
+
- ts-command-line-args@2.5.1
|
|
58
|
+
- ts-jest@29.1.1
|
|
59
|
+
- typescript-cubic-spline@1.0.1
|
|
60
|
+
- typescript@5.2.2
|
|
61
|
+
- winston@3.11.0
|
|
62
|
+
- zod@3.22.4
|
|
63
|
+
error: 'InputValidationError: `start-time` should be lower than `end-time`'
|
|
64
|
+
tree:
|
|
65
|
+
children:
|
|
66
|
+
child:
|
|
67
|
+
pipeline:
|
|
68
|
+
- time-sync
|
|
69
|
+
config: null
|
|
70
|
+
inputs:
|
|
71
|
+
- timestamp: '2023-12-12T00:00:00.000Z'
|
|
72
|
+
duration: 1
|
|
73
|
+
energy-cpu: 0.001
|
|
74
|
+
- timestamp: '2023-12-12T00:00:01.000Z'
|
|
75
|
+
duration: 5
|
|
76
|
+
energy-cpu: 0.001
|
|
77
|
+
- timestamp: '2023-12-12T00:00:06.000Z'
|
|
78
|
+
duration: 7
|
|
79
|
+
energy-cpu: 0.001
|
|
80
|
+
- timestamp: '2023-12-12T00:00:13.000Z'
|
|
81
|
+
duration: 30
|
|
82
|
+
energy-cpu: 0.001
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: time-sync
|
|
2
|
+
description: missing global config
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
outputs:
|
|
6
|
+
- yaml
|
|
7
|
+
plugins:
|
|
8
|
+
time-sync:
|
|
9
|
+
method: TimeSync
|
|
10
|
+
path: builtin
|
|
11
|
+
global-config: null
|
|
12
|
+
execution:
|
|
13
|
+
status: fail
|
|
14
|
+
command: >-
|
|
15
|
+
/Users/mariamkhalatova/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
|
|
16
|
+
/Users/mariamkhalatova/Projects/UK/if/src/index.ts -m
|
|
17
|
+
manifests/outputs/plugins/time-sync/failure-missing-global-config.yml -o
|
|
18
|
+
manifests/outputs/plugins/time-sync/failure-missing-global-config
|
|
19
|
+
environment:
|
|
20
|
+
if-version: 0.4.0
|
|
21
|
+
os: macOS
|
|
22
|
+
os-version: '13.2'
|
|
23
|
+
node-version: 18.14.2
|
|
24
|
+
date-time: 2024-07-02T21:13:12.360Z (UTC)
|
|
25
|
+
dependencies:
|
|
26
|
+
- '@babel/core@7.22.10'
|
|
27
|
+
- '@babel/preset-typescript@7.23.3'
|
|
28
|
+
- '@commitlint/cli@18.6.0'
|
|
29
|
+
- '@commitlint/config-conventional@18.6.0'
|
|
30
|
+
- '@grnsft/if-core@0.0.10'
|
|
31
|
+
|
|
32
|
+
- '@jest/globals@29.7.0'
|
|
33
|
+
- '@types/jest@29.5.8'
|
|
34
|
+
- '@types/js-yaml@4.0.9'
|
|
35
|
+
- '@types/luxon@3.4.2'
|
|
36
|
+
- '@types/node@20.9.0'
|
|
37
|
+
- axios-mock-adapter@1.22.0
|
|
38
|
+
- axios@1.7.2
|
|
39
|
+
- cross-env@7.0.3
|
|
40
|
+
- csv-parse@5.5.6
|
|
41
|
+
- csv-stringify@6.4.6
|
|
42
|
+
- fixpack@4.0.0
|
|
43
|
+
- gts@5.2.0
|
|
44
|
+
- husky@8.0.3
|
|
45
|
+
- jest@29.7.0
|
|
46
|
+
- js-yaml@4.1.0
|
|
47
|
+
- lint-staged@15.2.2
|
|
48
|
+
- luxon@3.4.4
|
|
49
|
+
- release-it@16.3.0
|
|
50
|
+
- rimraf@5.0.5
|
|
51
|
+
- ts-command-line-args@2.5.1
|
|
52
|
+
- ts-jest@29.1.1
|
|
53
|
+
- typescript-cubic-spline@1.0.1
|
|
54
|
+
- typescript@5.2.2
|
|
55
|
+
- winston@3.11.0
|
|
56
|
+
- zod@3.22.4
|
|
57
|
+
error: >-
|
|
58
|
+
ManifestValidationError: "initialize.plugins.time-sync.global-config"
|
|
59
|
+
parameter is expected object, received null. Error code: invalid_type.
|
|
60
|
+
tree:
|
|
61
|
+
children:
|
|
62
|
+
child:
|
|
63
|
+
pipeline:
|
|
64
|
+
- time-sync
|
|
65
|
+
config: null
|
|
66
|
+
inputs:
|
|
67
|
+
- timestamp: '2023-12-12T00:00:00.000Z'
|
|
68
|
+
duration: 3
|
|
69
|
+
energy-cpu: 0.001
|
|
70
|
+
- timestamp: '2023-12-12T00:00:01.000Z'
|
|
71
|
+
duration: 5
|
|
72
|
+
energy-cpu: 0.001
|
|
73
|
+
- timestamp: '2023-12-12T00:00:06.000Z'
|
|
74
|
+
duration: 7
|
|
75
|
+
energy-cpu: 0.001
|
|
76
|
+
- timestamp: '2023-12-12T00:00:13.000Z'
|
|
77
|
+
duration: 30
|
|
78
|
+
energy-cpu: 0.001
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
name: time-sync
|
|
2
|
+
description: successful path
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
time-sync:
|
|
7
|
+
path: builtin
|
|
8
|
+
method: TimeSync
|
|
9
|
+
global-config:
|
|
10
|
+
start-time: '2023-12-12T00:00:00.000Z'
|
|
11
|
+
end-time: '2023-12-12T00:01:00.000Z'
|
|
12
|
+
interval: 5
|
|
13
|
+
allow-padding: true
|
|
14
|
+
outputs:
|
|
15
|
+
- yaml
|
|
16
|
+
execution:
|
|
17
|
+
command: >-
|
|
18
|
+
/Users/mariamkhalatova/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
|
|
19
|
+
/Users/mariamkhalatova/Projects/UK/if/src/index.ts -m
|
|
20
|
+
manifests/outputs/plugins/time-sync/success.yml -o
|
|
21
|
+
manifests/outputs/plugins/time-sync/success -s
|
|
22
|
+
environment:
|
|
23
|
+
if-version: 0.4.0
|
|
24
|
+
os: macOS
|
|
25
|
+
os-version: '13.2'
|
|
26
|
+
node-version: 18.14.2
|
|
27
|
+
date-time: 2024-07-02T21:12:32.629Z (UTC)
|
|
28
|
+
dependencies:
|
|
29
|
+
- '@babel/core@7.22.10'
|
|
30
|
+
- '@babel/preset-typescript@7.23.3'
|
|
31
|
+
- '@commitlint/cli@18.6.0'
|
|
32
|
+
- '@commitlint/config-conventional@18.6.0'
|
|
33
|
+
- '@grnsft/if-core@0.0.10'
|
|
34
|
+
|
|
35
|
+
- '@jest/globals@29.7.0'
|
|
36
|
+
- '@types/jest@29.5.8'
|
|
37
|
+
- '@types/js-yaml@4.0.9'
|
|
38
|
+
- '@types/luxon@3.4.2'
|
|
39
|
+
- '@types/node@20.9.0'
|
|
40
|
+
- axios-mock-adapter@1.22.0
|
|
41
|
+
- axios@1.7.2
|
|
42
|
+
- cross-env@7.0.3
|
|
43
|
+
- csv-parse@5.5.6
|
|
44
|
+
- csv-stringify@6.4.6
|
|
45
|
+
- fixpack@4.0.0
|
|
46
|
+
- gts@5.2.0
|
|
47
|
+
- husky@8.0.3
|
|
48
|
+
- jest@29.7.0
|
|
49
|
+
- js-yaml@4.1.0
|
|
50
|
+
- lint-staged@15.2.2
|
|
51
|
+
- luxon@3.4.4
|
|
52
|
+
- release-it@16.3.0
|
|
53
|
+
- rimraf@5.0.5
|
|
54
|
+
- ts-command-line-args@2.5.1
|
|
55
|
+
- ts-jest@29.1.1
|
|
56
|
+
- typescript-cubic-spline@1.0.1
|
|
57
|
+
- typescript@5.2.2
|
|
58
|
+
- winston@3.11.0
|
|
59
|
+
- zod@3.22.4
|
|
60
|
+
status: success
|
|
61
|
+
tree:
|
|
62
|
+
children:
|
|
63
|
+
child:
|
|
64
|
+
pipeline:
|
|
65
|
+
- time-sync
|
|
66
|
+
config: null
|
|
67
|
+
inputs:
|
|
68
|
+
- timestamp: '2023-12-12T00:00:00.000Z'
|
|
69
|
+
duration: 1
|
|
70
|
+
energy-cpu: 0.001
|
|
71
|
+
- timestamp: '2023-12-12T00:00:01.000Z'
|
|
72
|
+
duration: 5
|
|
73
|
+
energy-cpu: 0.001
|
|
74
|
+
- timestamp: '2023-12-12T00:00:06.000Z'
|
|
75
|
+
duration: 7
|
|
76
|
+
energy-cpu: 0.001
|
|
77
|
+
- timestamp: '2023-12-12T00:00:13.000Z'
|
|
78
|
+
duration: 30
|
|
79
|
+
energy-cpu: 0.001
|
|
80
|
+
outputs:
|
|
81
|
+
- timestamp: '2023-12-12T00:00:00.000Z'
|
|
82
|
+
duration: 5
|
|
83
|
+
energy-cpu: 0.0018000000000000004
|
|
84
|
+
- timestamp: '2023-12-12T00:00:05.000Z'
|
|
85
|
+
duration: 5
|
|
86
|
+
energy-cpu: 0.0007714285714285716
|
|
87
|
+
- timestamp: '2023-12-12T00:00:10.000Z'
|
|
88
|
+
duration: 5
|
|
89
|
+
energy-cpu: 0.0004952380952380952
|
|
90
|
+
- timestamp: '2023-12-12T00:00:15.000Z'
|
|
91
|
+
duration: 5
|
|
92
|
+
energy-cpu: 0.0001666666666666667
|
|
93
|
+
- timestamp: '2023-12-12T00:00:20.000Z'
|
|
94
|
+
duration: 5
|
|
95
|
+
energy-cpu: 0.0001666666666666667
|
|
96
|
+
- timestamp: '2023-12-12T00:00:25.000Z'
|
|
97
|
+
duration: 5
|
|
98
|
+
energy-cpu: 0.0001666666666666667
|
|
99
|
+
- timestamp: '2023-12-12T00:00:30.000Z'
|
|
100
|
+
duration: 5
|
|
101
|
+
energy-cpu: 0.0001666666666666667
|
|
102
|
+
- timestamp: '2023-12-12T00:00:35.000Z'
|
|
103
|
+
duration: 5
|
|
104
|
+
energy-cpu: 0.0001666666666666667
|
|
105
|
+
- timestamp: '2023-12-12T00:00:40.000Z'
|
|
106
|
+
duration: 5
|
|
107
|
+
energy-cpu: 0.0001
|
|
108
|
+
- timestamp: '2023-12-12T00:00:45.000Z'
|
|
109
|
+
duration: 5
|
|
110
|
+
energy-cpu: 0
|
|
111
|
+
- timestamp: '2023-12-12T00:00:50.000Z'
|
|
112
|
+
duration: 5
|
|
113
|
+
energy-cpu: 0
|
|
114
|
+
- timestamp: '2023-12-12T00:00:55.000Z'
|
|
115
|
+
duration: 5
|
|
116
|
+
energy-cpu: 0
|
|
117
|
+
- timestamp: '2023-12-12T00:01:00.000Z'
|
|
118
|
+
duration: 1
|
|
119
|
+
energy-cpu: 0
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grnsft/if",
|
|
3
3
|
"description": "Impact Framework",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Green Software Foundation",
|
|
7
7
|
"email": "info@gsf.com"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"
|
|
11
|
-
"if-
|
|
10
|
+
"if-diff": "./build/diff.js",
|
|
11
|
+
"if-run": "./build/index.js",
|
|
12
|
+
"if-env": "./build/env.js",
|
|
13
|
+
"if-check": "./build/check.js"
|
|
12
14
|
},
|
|
13
15
|
"bugs": {
|
|
14
16
|
"url": "https://github.com/Green-Software-Foundation/if/issues/new?assignees=&labels=feedback&projects=&template=feedback.md&title=Feedback+-+"
|
|
@@ -16,6 +18,7 @@
|
|
|
16
18
|
"dependencies": {
|
|
17
19
|
"@commitlint/cli": "^18.6.0",
|
|
18
20
|
"@commitlint/config-conventional": "^18.6.0",
|
|
21
|
+
"@grnsft/if-core": "^0.0.10",
|
|
19
22
|
"axios": "^1.7.2",
|
|
20
23
|
"csv-parse": "^5.5.6",
|
|
21
24
|
"csv-stringify": "^6.4.6",
|
|
@@ -36,6 +39,7 @@
|
|
|
36
39
|
"@types/luxon": "^3.4.2",
|
|
37
40
|
"@types/node": "^20.8.9",
|
|
38
41
|
"axios-mock-adapter": "^1.22.0",
|
|
42
|
+
"cross-env": "7.0.3",
|
|
39
43
|
"fixpack": "^4.0.0",
|
|
40
44
|
"gts": "^5.0.0",
|
|
41
45
|
"husky": "^8.0.0",
|
|
@@ -72,8 +76,10 @@
|
|
|
72
76
|
"coverage": "jest --verbose --coverage --testPathPattern=src/__tests__/unit",
|
|
73
77
|
"fix": "gts fix",
|
|
74
78
|
"fix:package": "fixpack",
|
|
75
|
-
"
|
|
79
|
+
"if-check": "cross-env CURRENT_DIR=$(node -p \"process.env.INIT_CWD\") npx ts-node src/check.ts",
|
|
76
80
|
"if-diff": "npx ts-node src/diff.ts",
|
|
81
|
+
"if-env": "cross-env CURRENT_DIR=$(node -p \"process.env.INIT_CWD\") npx ts-node src/env.ts",
|
|
82
|
+
"if-run": "npx ts-node src/index.ts",
|
|
77
83
|
"lint": "gts lint",
|
|
78
84
|
"pre-commit": "lint-staged",
|
|
79
85
|
"prepare": "husky install",
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: template manifest
|
|
2
|
+
description: auto-generated template
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
memory-energy-from-memory-util:
|
|
7
|
+
path: builtin
|
|
8
|
+
method: Coefficient
|
|
9
|
+
global-config:
|
|
10
|
+
input-parameter: memory/utilization
|
|
11
|
+
coefficient: 0.0001
|
|
12
|
+
output-parameter: memory/energy
|
|
13
|
+
outputs:
|
|
14
|
+
- yaml
|
|
15
|
+
execution:
|
|
16
|
+
command: >-
|
|
17
|
+
/Users/manushak/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
|
|
18
|
+
/Users/manushak/Documents/Projects/Green-Software/if/src/index.ts -m
|
|
19
|
+
./src/env-template.yml -o ./manifests/outputs/template
|
|
20
|
+
environment:
|
|
21
|
+
if-version: 0.4.0
|
|
22
|
+
os: macOS
|
|
23
|
+
os-version: 13.6.6
|
|
24
|
+
node-version: 20.12.2
|
|
25
|
+
date-time: 2024-06-18T08:39:55.771Z (UTC)
|
|
26
|
+
dependencies:
|
|
27
|
+
- "@babel/core@7.22.10"
|
|
28
|
+
- "@babel/preset-typescript@7.23.3"
|
|
29
|
+
- "@commitlint/cli@18.6.0"
|
|
30
|
+
- "@commitlint/config-conventional@18.6.0"
|
|
31
|
+
- "@grnsft/if-core@0.0.3"
|
|
32
|
+
- "@jest/globals@29.7.0"
|
|
33
|
+
- "@types/jest@29.5.8"
|
|
34
|
+
- "@types/js-yaml@4.0.9"
|
|
35
|
+
- "@types/luxon@3.4.2"
|
|
36
|
+
- "@types/node@20.9.0"
|
|
37
|
+
- axios-mock-adapter@1.22.0
|
|
38
|
+
- axios@1.7.2
|
|
39
|
+
- cross-env@7.0.3
|
|
40
|
+
- csv-parse@5.5.6
|
|
41
|
+
- csv-stringify@6.4.6
|
|
42
|
+
- fixpack@4.0.0
|
|
43
|
+
- gts@5.2.0
|
|
44
|
+
- husky@8.0.3
|
|
45
|
+
- jest@29.7.0
|
|
46
|
+
- js-yaml@4.1.0
|
|
47
|
+
- lint-staged@15.2.2
|
|
48
|
+
- luxon@3.4.4
|
|
49
|
+
- release-it@16.3.0
|
|
50
|
+
- rimraf@5.0.5
|
|
51
|
+
- ts-command-line-args@2.5.1
|
|
52
|
+
- ts-jest@29.1.1
|
|
53
|
+
- typescript-cubic-spline@1.0.1
|
|
54
|
+
- typescript@5.2.2
|
|
55
|
+
- winston@3.11.0
|
|
56
|
+
- zod@3.22.4
|
|
57
|
+
status: success
|
|
58
|
+
tree:
|
|
59
|
+
children:
|
|
60
|
+
child:
|
|
61
|
+
pipeline:
|
|
62
|
+
- memory-energy-from-memory-util
|
|
63
|
+
config: null
|
|
64
|
+
inputs:
|
|
65
|
+
- timestamp: 2023-12-12T00:00:00.000Z
|
|
66
|
+
duration: 3600
|
|
67
|
+
memory/utilization: 10
|
|
68
|
+
outputs:
|
|
69
|
+
- timestamp: 2023-12-12T00:00:00.000Z
|
|
70
|
+
duration: 3600
|
|
71
|
+
memory/utilization: 10
|
|
72
|
+
memory/energy: 0.001
|
package/src/builtins/README.md
CHANGED
|
@@ -305,7 +305,7 @@ Then, you must select the metric you want to export to CSV. The name of that met
|
|
|
305
305
|
For example, to export the `carbon` data from your tree to a CSV file:
|
|
306
306
|
|
|
307
307
|
```sh
|
|
308
|
-
|
|
308
|
+
if-run --manifest example.yml --output example#carbon
|
|
309
309
|
```
|
|
310
310
|
|
|
311
311
|
This will save a CSV file called `example.csv`. The contents will look similar to the following:
|
|
@@ -86,7 +86,25 @@ tree:
|
|
|
86
86
|
You can run this example by saving it as `./examples/manifests/coefficient.yml` and executing the following command from the project root:
|
|
87
87
|
|
|
88
88
|
```sh
|
|
89
|
-
|
|
89
|
+
if-run --manifest ./examples/manifests/coefficient.yml --output ./examples/outputs/coefficient.yml
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
The results will be saved to a new `yaml` file in `./examples/outputs`
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## Errors
|
|
96
|
+
|
|
97
|
+
`Coefficient` exposes one of the IF error classes.
|
|
98
|
+
|
|
99
|
+
### GlobalConfigError
|
|
100
|
+
|
|
101
|
+
You will receive an error starting `GlobalConfigError: ` if you have not provided the expected configuration data in the plugin's `initialize` block.
|
|
102
|
+
|
|
103
|
+
The required parameters are:
|
|
104
|
+
- `input-parameter`: this must be a string
|
|
105
|
+
- `coefficient`: this must be a number
|
|
106
|
+
- `output-parameter`: this must be a string
|
|
107
|
+
|
|
108
|
+
You can fix this error by checking you are providing valid values for each parameter in the config.
|
|
109
|
+
|
|
110
|
+
For more information on our error classes, please visit [our docs](https://if.greensoftware.foundation/reference/errors
|