@grnsft/if 0.0.2
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/.devcontainer/devcontainer.json +38 -0
- package/.editorconfig +8 -0
- package/.env.example +9 -0
- package/.eslintignore +4 -0
- package/.eslintrc.json +8 -0
- package/.github/ISSUE_TEMPLATE/agenda.md +36 -0
- package/.github/ISSUE_TEMPLATE/blank-issue.md +10 -0
- package/.github/ISSUE_TEMPLATE/feedback.md +42 -0
- package/.github/ISSUE_TEMPLATE/model-plugin.md +63 -0
- package/.github/ISSUE_TEMPLATE/user-story.md +10 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +21 -0
- package/.github/workflows/nodejs-ci.yml +34 -0
- package/.gitmodules +3 -0
- package/.prettierrc.js +3 -0
- package/CONTRIBUTING.md +194 -0
- package/LICENSE +21 -0
- package/Makefile +16 -0
- package/README.md +67 -0
- package/build/__mocks__/azure/index.d.ts +11 -0
- package/build/__mocks__/azure/index.js +132 -0
- package/build/__mocks__/boavizta/countries.json +138 -0
- package/build/__mocks__/boavizta/instance_types.json +625 -0
- package/build/__mocks__/boavizta/providers.json +1 -0
- package/build/__mocks__/fs/index.d.ts +3 -0
- package/build/__mocks__/fs/index.js +56 -0
- package/build/__mocks__/model-universe/index.d.ts +33 -0
- package/build/__mocks__/model-universe/index.js +68 -0
- package/build/__mocks__/watt-time/data.json +119 -0
- package/build/__tests__/integration/ompl/index.test.d.ts +1 -0
- package/build/__tests__/integration/ompl/index.test.js +61 -0
- package/build/__tests__/unit/lib/azure-importer/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/azure-importer/index.test.js +152 -0
- package/build/__tests__/unit/lib/boavizta/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/boavizta/index.test.js +579 -0
- package/build/__tests__/unit/lib/case-studies/aveva.test.d.ts +1 -0
- package/build/__tests__/unit/lib/case-studies/aveva.test.js +36 -0
- package/build/__tests__/unit/lib/case-studies/emem.test.d.ts +1 -0
- package/build/__tests__/unit/lib/case-studies/emem.test.js +108 -0
- package/build/__tests__/unit/lib/case-studies/eshoppen.test.d.ts +1 -0
- package/build/__tests__/unit/lib/case-studies/eshoppen.test.js +53 -0
- package/build/__tests__/unit/lib/case-studies/sci-accenture.test.d.ts +1 -0
- package/build/__tests__/unit/lib/case-studies/sci-accenture.test.js +23 -0
- package/build/__tests__/unit/lib/ccf/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/ccf/index.test.js +223 -0
- package/build/__tests__/unit/lib/cloud-instance-metadata/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/cloud-instance-metadata/index.test.js +73 -0
- package/build/__tests__/unit/lib/sci/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/sci/index.test.js +106 -0
- package/build/__tests__/unit/lib/sci-e/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/sci-e/index.test.js +30 -0
- package/build/__tests__/unit/lib/sci-m/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/sci-m/index.test.js +58 -0
- package/build/__tests__/unit/lib/sci-o/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/sci-o/index.test.js +42 -0
- package/build/__tests__/unit/lib/shell-imp/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/shell-imp/index.test.js +21 -0
- package/build/__tests__/unit/lib/tdp-finder/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/tdp-finder/index.test.js +62 -0
- package/build/__tests__/unit/lib/teads-aws/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/teads-aws/index.test.js +170 -0
- package/build/__tests__/unit/lib/teads-curve/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/teads-curve/index.test.js +146 -0
- package/build/__tests__/unit/lib/watt-time/index.test.d.ts +1 -0
- package/build/__tests__/unit/lib/watt-time/index.test.js +106 -0
- package/build/__tests__/unit/util/args.test.d.ts +1 -0
- package/build/__tests__/unit/util/args.test.js +92 -0
- package/build/__tests__/unit/util/models-universe.test.d.ts +1 -0
- package/build/__tests__/unit/util/models-universe.test.js +211 -0
- package/build/__tests__/unit/util/observatory.test.d.ts +1 -0
- package/build/__tests__/unit/util/observatory.test.js +91 -0
- package/build/__tests__/unit/util/supercomputer.test.d.ts +1 -0
- package/build/__tests__/unit/util/supercomputer.test.js +231 -0
- package/build/__tests__/unit/util/yaml.test.d.ts +1 -0
- package/build/__tests__/unit/util/yaml.test.js +59 -0
- package/build/config/config.d.ts +32 -0
- package/build/config/config.js +74 -0
- package/build/config/index.d.ts +2 -0
- package/build/config/index.js +8 -0
- package/build/config/strings.d.ts +14 -0
- package/build/config/strings.js +30 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +46 -0
- package/build/lib/azure-importer/index.d.ts +55 -0
- package/build/lib/azure-importer/index.js +314 -0
- package/build/lib/boavizta/index.d.ts +53 -0
- package/build/lib/boavizta/index.js +254 -0
- package/build/lib/case-studies/aveva-model.d.ts +29 -0
- package/build/lib/case-studies/aveva-model.js +53 -0
- package/build/lib/case-studies/emem-model.d.ts +42 -0
- package/build/lib/case-studies/emem-model.js +93 -0
- package/build/lib/case-studies/eshoppen-model.d.ts +24 -0
- package/build/lib/case-studies/eshoppen-model.js +123 -0
- package/build/lib/case-studies/index.d.ts +4 -0
- package/build/lib/case-studies/index.js +21 -0
- package/build/lib/case-studies/sci-accenture-model.d.ts +10 -0
- package/build/lib/case-studies/sci-accenture-model.js +37 -0
- package/build/lib/ccf/aws-embodied.json +5591 -0
- package/build/lib/ccf/aws-instances.json +21116 -0
- package/build/lib/ccf/aws-use.json +79 -0
- package/build/lib/ccf/azure-embodied.json +6547 -0
- package/build/lib/ccf/azure-instances.json +8332 -0
- package/build/lib/ccf/azure-use.json +58 -0
- package/build/lib/ccf/gcp-embodied.json +3049 -0
- package/build/lib/ccf/gcp-instances.json +3880 -0
- package/build/lib/ccf/gcp-use.json +58 -0
- package/build/lib/ccf/index.d.ts +63 -0
- package/build/lib/ccf/index.js +338 -0
- package/build/lib/cloud-instance-metadata/aws-instances.json +1 -0
- package/build/lib/cloud-instance-metadata/azure-instances.json +1 -0
- package/build/lib/cloud-instance-metadata/index.d.ts +15 -0
- package/build/lib/cloud-instance-metadata/index.js +104 -0
- package/build/lib/index.d.ts +15 -0
- package/build/lib/index.js +32 -0
- package/build/lib/interfaces/ccf.d.ts +19 -0
- package/build/lib/interfaces/ccf.js +3 -0
- package/build/lib/interfaces/index.d.ts +7 -0
- package/build/lib/interfaces/index.js +18 -0
- package/build/lib/sci/index.d.ts +13 -0
- package/build/lib/sci/index.js +131 -0
- package/build/lib/sci-e/index.d.ts +38 -0
- package/build/lib/sci-e/index.js +85 -0
- package/build/lib/sci-m/index.d.ts +10 -0
- package/build/lib/sci-m/index.js +124 -0
- package/build/lib/sci-o/index.d.ts +17 -0
- package/build/lib/sci-o/index.js +52 -0
- package/build/lib/shell-imp/index.d.ts +32 -0
- package/build/lib/shell-imp/index.js +82 -0
- package/build/lib/tdp-finder/index.d.ts +19 -0
- package/build/lib/tdp-finder/index.js +98 -0
- package/build/lib/teads-aws/aws-embodied.json +1 -0
- package/build/lib/teads-aws/aws-instances.json +1 -0
- package/build/lib/teads-aws/index.d.ts +58 -0
- package/build/lib/teads-aws/index.js +208 -0
- package/build/lib/teads-curve/index.d.ts +52 -0
- package/build/lib/teads-curve/index.js +158 -0
- package/build/lib/watt-time/index.d.ts +18 -0
- package/build/lib/watt-time/index.js +204 -0
- package/build/types/azure-importer.d.ts +29 -0
- package/build/types/azure-importer.js +3 -0
- package/build/types/boavizta.d.ts +7 -0
- package/build/types/boavizta.js +3 -0
- package/build/types/common.d.ts +7 -0
- package/build/types/common.js +9 -0
- package/build/types/impl.d.ts +40 -0
- package/build/types/impl.js +3 -0
- package/build/types/models-universe.d.ts +24 -0
- package/build/types/models-universe.js +3 -0
- package/build/types/process-args.d.ts +7 -0
- package/build/types/process-args.js +3 -0
- package/build/types/supercomputer.d.ts +4 -0
- package/build/types/supercomputer.js +3 -0
- package/build/util/args.d.ts +8 -0
- package/build/util/args.js +48 -0
- package/build/util/errors.d.ts +6 -0
- package/build/util/errors.js +22 -0
- package/build/util/helpers.d.ts +4 -0
- package/build/util/helpers.js +18 -0
- package/build/util/models-universe.d.ts +28 -0
- package/build/util/models-universe.js +95 -0
- package/build/util/observatory.d.ts +20 -0
- package/build/util/observatory.js +31 -0
- package/build/util/supercomputer.d.ts +30 -0
- package/build/util/supercomputer.js +109 -0
- package/build/util/validations.d.ts +25 -0
- package/build/util/validations.js +52 -0
- package/build/util/yaml.d.ts +13 -0
- package/build/util/yaml.js +36 -0
- package/coverage/clover.xml +1172 -0
- package/coverage/coverage-final.json +27 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/config/config.ts.html +310 -0
- package/coverage/lcov-report/config/index.html +146 -0
- package/coverage/lcov-report/config/index.ts.html +91 -0
- package/coverage/lcov-report/config/strings.ts.html +118 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +341 -0
- package/coverage/lcov-report/lib/boavizta/index.html +116 -0
- package/coverage/lcov-report/lib/boavizta/index.ts.html +1171 -0
- package/coverage/lcov-report/lib/case-studies/aveva-model.ts.html +277 -0
- package/coverage/lcov-report/lib/case-studies/emem-model.ts.html +439 -0
- package/coverage/lcov-report/lib/case-studies/eshoppen-model.ts.html +550 -0
- package/coverage/lcov-report/lib/case-studies/index.html +176 -0
- package/coverage/lcov-report/lib/case-studies/index.ts.html +97 -0
- package/coverage/lcov-report/lib/case-studies/sci-accenture-model.ts.html +232 -0
- package/coverage/lcov-report/lib/ccf/index.html +116 -0
- package/coverage/lcov-report/lib/ccf/index.ts.html +1339 -0
- package/coverage/lcov-report/lib/cloud-instance-metadata/index.html +116 -0
- package/coverage/lcov-report/lib/cloud-instance-metadata/index.ts.html +370 -0
- package/coverage/lcov-report/lib/index.html +116 -0
- package/coverage/lcov-report/lib/index.ts.html +121 -0
- package/coverage/lcov-report/lib/sci/index.html +116 -0
- package/coverage/lcov-report/lib/sci/index.ts.html +571 -0
- package/coverage/lcov-report/lib/sci-e/index.html +116 -0
- package/coverage/lcov-report/lib/sci-e/index.ts.html +403 -0
- package/coverage/lcov-report/lib/sci-m/index.html +116 -0
- package/coverage/lcov-report/lib/sci-m/index.ts.html +487 -0
- package/coverage/lcov-report/lib/sci-o/index.html +116 -0
- package/coverage/lcov-report/lib/sci-o/index.ts.html +265 -0
- package/coverage/lcov-report/lib/shell-imp/index.html +116 -0
- package/coverage/lcov-report/lib/shell-imp/index.ts.html +376 -0
- package/coverage/lcov-report/lib/teads-aws/index.html +116 -0
- package/coverage/lcov-report/lib/teads-aws/index.ts.html +823 -0
- package/coverage/lcov-report/lib/teads-curve/index.html +116 -0
- package/coverage/lcov-report/lib/teads-curve/index.ts.html +625 -0
- package/coverage/lcov-report/lib/watt-time/index.html +116 -0
- package/coverage/lcov-report/lib/watt-time/index.ts.html +829 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/types/common.ts.html +109 -0
- package/coverage/lcov-report/types/index.html +116 -0
- package/coverage/lcov-report/util/args.ts.html +244 -0
- package/coverage/lcov-report/util/index.html +176 -0
- package/coverage/lcov-report/util/models-universe.ts.html +679 -0
- package/coverage/lcov-report/util/observatory.ts.html +229 -0
- package/coverage/lcov-report/util/supercomputer.ts.html +466 -0
- package/coverage/lcov-report/util/yaml.ts.html +193 -0
- package/coverage/lcov.info +2094 -0
- package/docs/implementations/tdp-finder.md +36 -0
- package/examples/impls/case-studies/accenture.yml +155 -0
- package/examples/impls/case-studies/aveva.yaml +48 -0
- package/examples/impls/case-studies/azure-yassine.yaml +67 -0
- package/examples/impls/case-studies/boavizta.yml +26 -0
- package/examples/impls/case-studies/dow_msft.yml +173 -0
- package/examples/impls/case-studies/farm-insights.yaml +35 -0
- package/examples/impls/case-studies/gsf-website.yaml +93 -0
- package/examples/impls/case-studies/msft-eshoppen.yaml +162 -0
- package/examples/impls/case-studies/msft-green-ai.yaml +58 -0
- package/examples/impls/case-studies/ntt-data-on-premise.yaml +201 -0
- package/examples/impls/tdp-finder-test.yml +19 -0
- package/examples/impls/test/azure.yml +26 -0
- package/examples/impls/test/ccf.yml +19 -0
- package/examples/impls/test/complex-pipeline.yml +67 -0
- package/examples/impls/test/if-demo.yml +51 -0
- package/examples/impls/test/metadata.yml +20 -0
- package/examples/impls/test/nesting.yml +65 -0
- package/examples/impls/test/sci-e.yml +21 -0
- package/examples/impls/test/sci-m.yml +24 -0
- package/examples/impls/test/sci-o.yml +28 -0
- package/examples/impls/test/sci.yml +27 -0
- package/examples/impls/test/shell.yml +18 -0
- package/examples/impls/test/toto.yaml +22 -0
- package/examples/ompls/azure.yml +145 -0
- package/examples/ompls/ccf.yml +27 -0
- package/examples/ompls/complex-pipeline.yml +105 -0
- package/examples/ompls/full-sci.yml +64 -0
- package/examples/ompls/if-demo.yml +493 -0
- package/examples/ompls/metadata.yml +29 -0
- package/examples/ompls/nesting.yml +107 -0
- package/examples/ompls/sci-e.yml +23 -0
- package/examples/ompls/sci-m.yml +33 -0
- package/examples/ompls/sci-o.yml +29 -0
- package/examples/ompls/sci.yml +36 -0
- package/examples/ompls/shell.yml +23 -0
- package/jest.config.js +14 -0
- package/package.json +71 -0
- package/scripts/impact-test.sh +12 -0
- package/src/__mocks__/boavizta/countries.json +138 -0
- package/src/__mocks__/boavizta/instance_types.json +625 -0
- package/src/__mocks__/boavizta/providers.json +1 -0
- package/src/__mocks__/watt-time/data.json +119 -0
- package/src/config/units.yaml +125 -0
- package/src/lib/ccf/aws-embodied.json +5591 -0
- package/src/lib/ccf/aws-instances.json +21116 -0
- package/src/lib/ccf/aws-use.json +79 -0
- package/src/lib/ccf/azure-embodied.json +6547 -0
- package/src/lib/ccf/azure-instances.json +8332 -0
- package/src/lib/ccf/azure-use.json +58 -0
- package/src/lib/ccf/gcp-embodied.json +3049 -0
- package/src/lib/ccf/gcp-instances.json +3880 -0
- package/src/lib/ccf/gcp-use.json +58 -0
- package/src/lib/cloud-instance-metadata/aws-instances.json +1 -0
- package/src/lib/cloud-instance-metadata/azure-instances.json +1 -0
- package/src/lib/shell-imp/sampler +30 -0
- package/src/lib/tdp-finder/README.md +7 -0
- package/src/lib/tdp-finder/boavizta_data.csv +1768 -0
- package/src/lib/tdp-finder/data.csv +4460 -0
- package/src/lib/tdp-finder/data2.csv +2162 -0
- package/src/lib/teads-aws/aws-embodied.json +1 -0
- package/src/lib/teads-aws/aws-instances.json +1 -0
- package/tsconfig.test.json +39 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/yarn-error.log +5854 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: sci-o-demo
|
|
2
|
+
description: null
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
models:
|
|
6
|
+
- name: sci-e
|
|
7
|
+
kind: builtin
|
|
8
|
+
- name: sci-o
|
|
9
|
+
kind: builtin
|
|
10
|
+
graph:
|
|
11
|
+
children:
|
|
12
|
+
child:
|
|
13
|
+
pipeline:
|
|
14
|
+
- sci-e
|
|
15
|
+
- sci-o
|
|
16
|
+
config:
|
|
17
|
+
sci-e: null
|
|
18
|
+
inputs:
|
|
19
|
+
- timestamp: 2023-08-06T00:00
|
|
20
|
+
duration: 3600
|
|
21
|
+
energy-cpu: 0.001
|
|
22
|
+
grid-carbon-intensity: 800
|
|
23
|
+
outputs:
|
|
24
|
+
- timestamp: 2023-08-06T00:00
|
|
25
|
+
duration: 3600
|
|
26
|
+
energy-cpu: 0.001
|
|
27
|
+
grid-carbon-intensity: 800
|
|
28
|
+
energy: 0.001
|
|
29
|
+
operational-carbon: 0.8
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: sci-demo
|
|
2
|
+
description: example invoking sci model
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
models:
|
|
6
|
+
- name: sci
|
|
7
|
+
kind: builtin
|
|
8
|
+
path: ''
|
|
9
|
+
graph:
|
|
10
|
+
children:
|
|
11
|
+
child:
|
|
12
|
+
pipeline:
|
|
13
|
+
- sci
|
|
14
|
+
config:
|
|
15
|
+
sci:
|
|
16
|
+
functional-unit-duration: 1
|
|
17
|
+
functional-unit-time: minutes
|
|
18
|
+
functional-unit: requests
|
|
19
|
+
inputs:
|
|
20
|
+
- timestamp: 2023-07-06T00:00
|
|
21
|
+
duration: 3600
|
|
22
|
+
energy: 5
|
|
23
|
+
operational-carbon: 5
|
|
24
|
+
embodied-carbon: 0.02
|
|
25
|
+
requests: 100
|
|
26
|
+
outputs:
|
|
27
|
+
- timestamp: 2023-07-06T00:00
|
|
28
|
+
duration: 3600
|
|
29
|
+
energy: 5
|
|
30
|
+
operational-carbon: 5
|
|
31
|
+
embodied-carbon: 0.02
|
|
32
|
+
requests: 100
|
|
33
|
+
functional-unit-duration: 1
|
|
34
|
+
functional-unit-time: minutes
|
|
35
|
+
functional-unit: requests
|
|
36
|
+
sci: 0.0008366666666666665
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: ccf-demo
|
|
2
|
+
description: example impl invoking CCF model
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
models:
|
|
6
|
+
- name: sampler
|
|
7
|
+
kind: shell
|
|
8
|
+
graph:
|
|
9
|
+
children:
|
|
10
|
+
child:
|
|
11
|
+
pipeline:
|
|
12
|
+
- sampler
|
|
13
|
+
config:
|
|
14
|
+
sampler:
|
|
15
|
+
executable: python3 /usr/local/bin/sampler
|
|
16
|
+
inputs:
|
|
17
|
+
- timestamp: '2023-11-02T10:35:31.820Z'
|
|
18
|
+
duration: 3600
|
|
19
|
+
outputs:
|
|
20
|
+
- duration: 3600
|
|
21
|
+
energy: 1
|
|
22
|
+
executable: python3 /usr/local/bin/sampler
|
|
23
|
+
timestamp: '2023-11-02T10:35:31.820Z'
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
preset: 'ts-jest',
|
|
4
|
+
testEnvironment: 'node',
|
|
5
|
+
transform: {
|
|
6
|
+
'^.+\\.ts?$': [
|
|
7
|
+
'ts-jest',
|
|
8
|
+
{
|
|
9
|
+
tsconfig: 'tsconfig.test.json',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
modulePathIgnorePatterns: ['./build'],
|
|
14
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grnsft/if",
|
|
3
|
+
"description": "Impact Framework",
|
|
4
|
+
"version": "v0.0.2",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"bin": {
|
|
9
|
+
"impact-engine": "./build/index.js"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Green Software Foundation",
|
|
13
|
+
"email": "info@gsf.com"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/Green-Software-Foundation/if/issues/new?assignees=&labels=feedback&projects=&template=feedback.md&title=Feedback+-+"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@azure/arm-compute": "^21.2.0",
|
|
20
|
+
"@azure/arm-monitor": "^7.0.0",
|
|
21
|
+
"@azure/identity": "^4.0.0",
|
|
22
|
+
"@cloud-carbon-footprint/aws": "^0.15.0",
|
|
23
|
+
"@cloud-carbon-footprint/core": "^0.17.3",
|
|
24
|
+
"axios": "^1.4.0",
|
|
25
|
+
"dayjs": "^1.11.9",
|
|
26
|
+
"dotenv": "^16.3.1",
|
|
27
|
+
"js-yaml": "^4.1.0",
|
|
28
|
+
"node-fetch": "^3.3.1",
|
|
29
|
+
"ts-sync-request": "^1.4.1",
|
|
30
|
+
"typescript": "^5.1.6",
|
|
31
|
+
"typescript-cubic-spline": "^1.0.1",
|
|
32
|
+
"zod": "^3.22.4"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@babel/core": "7.22.10",
|
|
36
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
37
|
+
"@jest/globals": "^29.6.1",
|
|
38
|
+
"@types/jest": "^29.5.7",
|
|
39
|
+
"@types/js-yaml": "^4.0.5",
|
|
40
|
+
"@types/node": "^20.8.9",
|
|
41
|
+
"fixpack": "^4.0.0",
|
|
42
|
+
"gts": "^5.0.0",
|
|
43
|
+
"jest": "^29.6.1",
|
|
44
|
+
"jest-mock-axios": "^4.7.2",
|
|
45
|
+
"ts-command-line-args": "^2.5.1",
|
|
46
|
+
"ts-jest": "^29.1.1"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": "18",
|
|
50
|
+
"yarn": "1.22.19"
|
|
51
|
+
},
|
|
52
|
+
"homepage": "https://greensoftware.foundation",
|
|
53
|
+
"keywords": [],
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"main": "build/index.js",
|
|
56
|
+
"repository": {
|
|
57
|
+
"url": "https://github.com/Green-Software-Foundation/if"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsc",
|
|
61
|
+
"coverage": "jest --verbose --coverage",
|
|
62
|
+
"fix": "gts fix",
|
|
63
|
+
"fix:package": "fixpack",
|
|
64
|
+
"impact-engine": "npx ts-node impact-engine.ts",
|
|
65
|
+
"lint": "gts lint",
|
|
66
|
+
"prepare": "yarn build",
|
|
67
|
+
"test": "jest --verbose"
|
|
68
|
+
},
|
|
69
|
+
"stability": "stable",
|
|
70
|
+
"types": "src/index.d.ts"
|
|
71
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "Starting impact tests"
|
|
4
|
+
prefix="examples/impls/test/";
|
|
5
|
+
for file in examples/impls/test/*;
|
|
6
|
+
do
|
|
7
|
+
echo ""
|
|
8
|
+
echo executing $file, outfile is ${file#"$prefix"}
|
|
9
|
+
echo ""
|
|
10
|
+
npx ts-node impact-engine.ts --impl $file --ompl examples/ompls/${file#"$prefix"}
|
|
11
|
+
done
|
|
12
|
+
exit 0
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"0-Global": "WOR",
|
|
3
|
+
"1-Europe": "EEE",
|
|
4
|
+
"Albania": "ALB",
|
|
5
|
+
"Algeria": "DZA",
|
|
6
|
+
"Angola": "AGO",
|
|
7
|
+
"Argentina": "ARG",
|
|
8
|
+
"Armenia": "ARM",
|
|
9
|
+
"Australia": "AUS",
|
|
10
|
+
"Austria": "AUT",
|
|
11
|
+
"Azerbaijan": "AZE",
|
|
12
|
+
"Bahrain": "BHR",
|
|
13
|
+
"Bangladesh": "BGD",
|
|
14
|
+
"Belarus": "BLR",
|
|
15
|
+
"Belgium": "BEL",
|
|
16
|
+
"Benin": "BEN",
|
|
17
|
+
"Bolivia": "BOL",
|
|
18
|
+
"Bosnia and Herzegovina": "BIH",
|
|
19
|
+
"Botswana": "BWA",
|
|
20
|
+
"Brazil": "BRA",
|
|
21
|
+
"Brunei": "BRN",
|
|
22
|
+
"Bulgaria": "BGR",
|
|
23
|
+
"Cambodia": "KHM",
|
|
24
|
+
"Cameroon": "CMR",
|
|
25
|
+
"Canada": "CAN",
|
|
26
|
+
"Chile": "CHL",
|
|
27
|
+
"China": "CHN",
|
|
28
|
+
"Colombia": "COL",
|
|
29
|
+
"Congo": "COG",
|
|
30
|
+
"Costa Rica": "CRI",
|
|
31
|
+
"Croatia": "HRV",
|
|
32
|
+
"Cuba": "CUB",
|
|
33
|
+
"Cyprus": "CYP",
|
|
34
|
+
"Czech Republic": "CZE",
|
|
35
|
+
"Denmark": "DNK",
|
|
36
|
+
"Dominican Republic": "DOM",
|
|
37
|
+
"DR Congo": "COD",
|
|
38
|
+
"Ecuador": "ECU",
|
|
39
|
+
"Egypt": "EGY",
|
|
40
|
+
"El Salvador": "SLV",
|
|
41
|
+
"Eritrea": "ERI",
|
|
42
|
+
"Estonia": "EST",
|
|
43
|
+
"Ethiopia": "ETH",
|
|
44
|
+
"Finland": "FIN",
|
|
45
|
+
"France": "FRA",
|
|
46
|
+
"Gabon": "GAB",
|
|
47
|
+
"Georgia": "GEO",
|
|
48
|
+
"Germany": "DEU",
|
|
49
|
+
"Ghana": "GHA",
|
|
50
|
+
"Greece": "GRC",
|
|
51
|
+
"Guatemala": "GTM",
|
|
52
|
+
"Haiti": "HTI",
|
|
53
|
+
"Honduras": "HND",
|
|
54
|
+
"Hungary": "HUN",
|
|
55
|
+
"Iceland": "ISL",
|
|
56
|
+
"India": "IND",
|
|
57
|
+
"Indonesia": "IDN",
|
|
58
|
+
"Iran": "IRN",
|
|
59
|
+
"Iraq": "IRQ",
|
|
60
|
+
"Ireland": "IRL",
|
|
61
|
+
"Israel": "ISR",
|
|
62
|
+
"Italy": "ITA",
|
|
63
|
+
"Ivory Coast": "CIV",
|
|
64
|
+
"Jamaica": "JAM",
|
|
65
|
+
"Japan": "JPN",
|
|
66
|
+
"Jordan": "JOR",
|
|
67
|
+
"Kazakhstan": "KAZ",
|
|
68
|
+
"Kenya": "KEN",
|
|
69
|
+
"Kuwait": "KWT",
|
|
70
|
+
"Kyrgyzstan": "KGZ",
|
|
71
|
+
"Latvia": "LVA",
|
|
72
|
+
"Lebanon": "LBN",
|
|
73
|
+
"Libyan Arab Jamahiriya": "LBY",
|
|
74
|
+
"Lithuania": "LTU",
|
|
75
|
+
"Luxembourg": "LUX",
|
|
76
|
+
"Malaysia": "MYS",
|
|
77
|
+
"Malta": "MLT",
|
|
78
|
+
"Mexico": "MEX",
|
|
79
|
+
"Moldova": "MDA",
|
|
80
|
+
"Mongolia": "MNG",
|
|
81
|
+
"Morocco": "MAR",
|
|
82
|
+
"Mozambique": "MOZ",
|
|
83
|
+
"Myanmar": "MMR",
|
|
84
|
+
"Namibia": "NAM",
|
|
85
|
+
"Nepal": "NPL",
|
|
86
|
+
"Netherlands": "NLD",
|
|
87
|
+
"New Zealand": "NZL",
|
|
88
|
+
"Nicaragua": "NIC",
|
|
89
|
+
"Nigeria": "NGA",
|
|
90
|
+
"North Korea": "PRK",
|
|
91
|
+
"North Macedonia": "MKD",
|
|
92
|
+
"Norway": "NOR",
|
|
93
|
+
"Oman": "OMN",
|
|
94
|
+
"Pakistan": "PAK",
|
|
95
|
+
"Panama": "PAN",
|
|
96
|
+
"Paraguay": "PRY",
|
|
97
|
+
"Peru": "PER",
|
|
98
|
+
"Philippines": "PHL",
|
|
99
|
+
"Poland": "POL",
|
|
100
|
+
"Portugal": "PRT",
|
|
101
|
+
"Qatar": "QAT",
|
|
102
|
+
"Romania": "ROU",
|
|
103
|
+
"Russian Federation": "RUS",
|
|
104
|
+
"Saudi Arabia": "SAU",
|
|
105
|
+
"Senegal": "SEN",
|
|
106
|
+
"Serbia": "SCG",
|
|
107
|
+
"Singapore": "SGP",
|
|
108
|
+
"Slovakia": "SVK",
|
|
109
|
+
"Slovenia": "SVN",
|
|
110
|
+
"South Africa": "ZAF",
|
|
111
|
+
"South Korea": "KOR",
|
|
112
|
+
"Spain": "ESP",
|
|
113
|
+
"Sri Lanka": "LKA",
|
|
114
|
+
"Sudan": "SDN",
|
|
115
|
+
"Sweden": "SWE",
|
|
116
|
+
"Switzerland": "CHE",
|
|
117
|
+
"Syrian Arab Republic": "SYR",
|
|
118
|
+
"Taiwan": "TWN",
|
|
119
|
+
"Tajikistan": "TJK",
|
|
120
|
+
"Tanzania": "TZA",
|
|
121
|
+
"Thailand": "THA",
|
|
122
|
+
"Togo": "TGO",
|
|
123
|
+
"Trinidad and Tobago": "TTO",
|
|
124
|
+
"Tunisia": "TUN",
|
|
125
|
+
"Turkey": "TUR",
|
|
126
|
+
"Turkmenistan": "TKM",
|
|
127
|
+
"Ukraine": "UKR",
|
|
128
|
+
"United Arab Emirates": "ARE",
|
|
129
|
+
"United Kingdom": "GBR",
|
|
130
|
+
"United States of America": "USA",
|
|
131
|
+
"Uruguay": "URY",
|
|
132
|
+
"Uzbekistan": "UZB",
|
|
133
|
+
"Venezuela": "VEN",
|
|
134
|
+
"Vietnam": "VNM",
|
|
135
|
+
"Yemen": "YEM",
|
|
136
|
+
"Zambia": "ZMB",
|
|
137
|
+
"Zimbabwe": "ZWE"
|
|
138
|
+
}
|