From f1b4c34822bce47af13fcb30dba5283e31886e4d Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:27:14 +0100 Subject: [PATCH 1/9] feat(package): rename scirpts in package and lockfile --- package-lock.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a52e10aa..fc706357 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,8 +23,8 @@ "zod": "^3.22.4" }, "bin": { - "ie": "build/index.js", - "if-diff": "build/diff.js" + "if-diff": "build/diff.js", + "if-run": "build/index.js" }, "devDependencies": { "@babel/core": "^7.22.10", diff --git a/package.json b/package.json index 60e33dc0..0ff122d8 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "email": "info@gsf.com" }, "bin": { - "ie": "./build/index.js", + "if-run": "./build/index.js", "if-diff": "./build/diff.js" }, "bugs": { @@ -72,7 +72,7 @@ "coverage": "jest --verbose --coverage --testPathPattern=src/__tests__/unit", "fix": "gts fix", "fix:package": "fixpack", - "ie": "npx ts-node src/index.ts", + "if-run": "npx ts-node src/index.ts", "if-diff": "npx ts-node src/diff.ts", "lint": "gts lint", "pre-commit": "lint-staged", From 20161b583744f68714eb19ec786eb3acff8500a6 Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:27:49 +0100 Subject: [PATCH 2/9] feat(package): update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ff122d8..f17862f4 100644 --- a/package.json +++ b/package.json @@ -72,8 +72,8 @@ "coverage": "jest --verbose --coverage --testPathPattern=src/__tests__/unit", "fix": "gts fix", "fix:package": "fixpack", - "if-run": "npx ts-node src/index.ts", "if-diff": "npx ts-node src/diff.ts", + "if-run": "npx ts-node src/index.ts", "lint": "gts lint", "pre-commit": "lint-staged", "prepare": "husky install", From 0b4e6c9b6ccd422369f4202f28b0a334cf483453 Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:28:44 +0100 Subject: [PATCH 3/9] feat(lib): rename ie to if-run in project readme --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c34bf006..9de6c64e 100644 --- a/README.md +++ b/README.md @@ -42,17 +42,17 @@ Then create a `manifest` file that describes your application (see our docs for Then, run `if` using the following command: ```sh -ie --manifest +if-run --manifest ## or you can use aliases -ie -m +if-run -m ``` Note that above command will not print the final output. In order to print the final output to the console, run `if` using the optional stdout argument: ```sh -ie --manifest --stdout +if-run --manifest --stdout ## or using aliases -ie -m -s +if-run -m -s ``` You can also add a savepath for your output yaml in order to have the output stored in a file. Note that you also have to add configuration to your manifest to enable this, as follows: @@ -66,25 +66,25 @@ initialize: On the command line: ```sh -ie --manifest --output +if-run --manifest --output ## or using aliases -ie -m -o +if-run -m -o ``` -The `ie` CLI tool will configure and run the plugins defined in your input `yaml` (`manifest`) and return the results as an output `yaml` (`output`). +The `if-run` CLI tool will configure and run the plugins defined in your input `yaml` (`manifest`) and return the results as an output `yaml` (`output`). Use the `debug` command if you want to diagnose and fix errors in your plugin: ```sh -ie --manifest --debug +if-run --manifest --debug ``` Use the `help` command if you need guidance about the available commands ```sh -ie --help +if-run --help ## or using alias -ie -h +if-run -h ``` ## Documentation From 0286a34bb9ae2481e5fc73e39c5837ae47be588b Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:29:27 +0100 Subject: [PATCH 4/9] fix(package): update command name in refactor guide --- Refactor-migration-guide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Refactor-migration-guide.md b/Refactor-migration-guide.md index 80328fe9..95269e1a 100644 --- a/Refactor-migration-guide.md +++ b/Refactor-migration-guide.md @@ -12,13 +12,13 @@ There have been some name changes to the CLI, specifically: The command line tool has been renamed from `impact-engine` to simply `ie`. This means that to invoke the Impact Framework on the command line you simply use ``` - ie ... + if-run ... ``` - `impl` --> `manifest` We have deprecated the original `impl` and `ompl` terminology across all our repositories and on the command line. Now, to pass a manifest file to IF, you use the `--manifest` command, as follows: ```sh - ie --manifest + if-run --manifest ``` @@ -27,7 +27,7 @@ There have been some name changes to the CLI, specifically: We have deprecated the original `impl` and `ompl` terminology across all our repositories and on the command line. Now, to define a savepath for your output file, you use the `--output` command, as follows: ```sh - ie --manifest --output + if-run --manifest --output ``` ## Outputs @@ -55,13 +55,13 @@ npm i @grnsft/if Then run IF using the following command: ```sh -ie --manifest +if-run --manifest ``` This will dump the output to the console. If you want to save the output to a yaml file, provide a savepath to the `--output` command: ```sh -ie --manifest --output +if-run --manifest --output ``` From 9d5d82e5ec29cf0f795fb3dcd2e4ffd8729ea0e1 Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:30:42 +0100 Subject: [PATCH 5/9] fix(lib): update ie to if-run in integration test script --- src/__tests__/integration/scenarios/sci-e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/integration/scenarios/sci-e.ts b/src/__tests__/integration/scenarios/sci-e.ts index 9fb80834..0342240c 100644 --- a/src/__tests__/integration/scenarios/sci-e.ts +++ b/src/__tests__/integration/scenarios/sci-e.ts @@ -36,7 +36,7 @@ describe('integration/sci-e', () => { await saveYamlFileAs(file, absoluteManifestPath); // save yaml uses absolute path const response = ( await execPromise( - `npm run ie -- --manifest ${relativeManifestPath} --stdout` + `npm run if-run -- --manifest ${relativeManifestPath} --stdout` ) ).stdout; // exec promise uses relative path From a82b978f3ad4c6f0878661f8ce8f13df061649d0 Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:31:16 +0100 Subject: [PATCH 6/9] fix(lib): update ie to if-run in test script --- scripts/run-yamls.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run-yamls.sh b/scripts/run-yamls.sh index 11371af6..fbe394c6 100644 --- a/scripts/run-yamls.sh +++ b/scripts/run-yamls.sh @@ -4,5 +4,5 @@ echo 'Running all manifests' for f in ./examples/manifests/*.yml; do echo "Processing $f file..."; - npm run ie -- --manifest $f + npm run if-run -- --manifest $f done From 2c97c002001c74d3f5396c8b801da4aa1d856398 Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:32:16 +0100 Subject: [PATCH 7/9] fix(lib): update ie -> if-run in builtin readmes --- src/builtins/README.md | 2 +- src/builtins/coefficient/README.md | 2 +- src/builtins/csv-lookup/README.md | 2 +- src/builtins/divide/README.md | 2 +- src/builtins/exponent/README.md | 2 +- src/builtins/interpolation/README.md | 2 +- src/builtins/mock-observations/README.md | 2 +- src/builtins/multiply/README.md | 2 +- src/builtins/sci-embodied/README.md | 2 +- src/builtins/sci/README.md | 2 +- src/builtins/shell/README.md | 2 +- src/builtins/subtract/README.md | 2 +- src/builtins/sum/README.md | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/builtins/README.md b/src/builtins/README.md index b9906921..c37e143a 100644 --- a/src/builtins/README.md +++ b/src/builtins/README.md @@ -305,7 +305,7 @@ Then, you must select the metric you want to export to CSV. The name of that met For example, to export the `carbon` data from your tree to a CSV file: ```sh -ie --manifest example.yml --output example#carbon +if-run --manifest example.yml --output example#carbon ``` This will save a CSV file called `example.csv`. The contents will look similar to the following: diff --git a/src/builtins/coefficient/README.md b/src/builtins/coefficient/README.md index 096d20ab..bf8808e8 100644 --- a/src/builtins/coefficient/README.md +++ b/src/builtins/coefficient/README.md @@ -86,7 +86,7 @@ tree: You can run this example by saving it as `./examples/manifests/coefficient.yml` and executing the following command from the project root: ```sh -ie --manifest ./examples/manifests/coefficient.yml --output ./examples/outputs/coefficient.yml +if-run --manifest ./examples/manifests/coefficient.yml --output ./examples/outputs/coefficient.yml ``` The results will be saved to a new `yaml` file in `./examples/outputs` diff --git a/src/builtins/csv-lookup/README.md b/src/builtins/csv-lookup/README.md index 2c52969a..d1aece69 100644 --- a/src/builtins/csv-lookup/README.md +++ b/src/builtins/csv-lookup/README.md @@ -136,7 +136,7 @@ You can run this example by saving it as `./examples/manifests/csv-lookup.yml` a ```sh npm i -g @grnsft/if -ie --manifest manifests/plugins/csv-lookup.yml --output manifests/outputs/csv-lookup +if-run --manifest manifests/plugins/csv-lookup.yml --output manifests/outputs/csv-lookup ``` The results will be saved to a new `yaml` file in `manifests/outputs`. diff --git a/src/builtins/divide/README.md b/src/builtins/divide/README.md index d403d036..20ed19f5 100644 --- a/src/builtins/divide/README.md +++ b/src/builtins/divide/README.md @@ -89,7 +89,7 @@ You can run this example by saving it as `./examples/manifests/divide.yml` and e ```sh npm i -g @grnsft/if -ie --manifest ./examples/manifests/divide.yml --output ./examples/outputs/divide.yml +if-run --manifest ./examples/manifests/divide.yml --output ./examples/outputs/divide.yml ``` The results will be saved to a new `yaml` file in `./examples/outputs`. diff --git a/src/builtins/exponent/README.md b/src/builtins/exponent/README.md index 48a67965..d84020d6 100644 --- a/src/builtins/exponent/README.md +++ b/src/builtins/exponent/README.md @@ -91,7 +91,7 @@ You can run this example by saving it as `manifests/examples/test/exponent.yml` ```sh npm i -g @grnsft/if -ie --manifest manifests/examples/test/exponent.yml --output manifests/outputs/exponent.yml +if-run --manifest manifests/examples/test/exponent.yml --output manifests/outputs/exponent.yml ``` The results will be saved to a new `yaml` file in `manifests/outputs`. diff --git a/src/builtins/interpolation/README.md b/src/builtins/interpolation/README.md index cfcca2fa..670a65ef 100644 --- a/src/builtins/interpolation/README.md +++ b/src/builtins/interpolation/README.md @@ -164,5 +164,5 @@ You can execute this by passing it to `ie`. Run the impact using the following c ```sh npm i -g @grnsft/if -ie --manifest ./manifests/examples/interpolation.yml --output ./manifests/outputs/interpolation.yml +if-run --manifest ./manifests/examples/interpolation.yml --output ./manifests/outputs/interpolation.yml ``` diff --git a/src/builtins/mock-observations/README.md b/src/builtins/mock-observations/README.md index 629e27f2..1af4cd6d 100644 --- a/src/builtins/mock-observations/README.md +++ b/src/builtins/mock-observations/README.md @@ -91,7 +91,7 @@ You can run this example `manifest` by saving it as `manifests/plugins/mock-obse ```sh npm i -g @grnsft/if -ie --manifest ./examples/manifests/test/mock-observation.yml --output ./examples/outputs/mock-observation +if-run --manifest ./examples/manifests/test/mock-observation.yml --output ./examples/outputs/mock-observation ``` The results will be saved to a new `yaml` file in `./examples/outputs`. diff --git a/src/builtins/multiply/README.md b/src/builtins/multiply/README.md index d4e27674..695d8933 100644 --- a/src/builtins/multiply/README.md +++ b/src/builtins/multiply/README.md @@ -88,7 +88,7 @@ You can run this example by saving it as `./examples/manifests/test/multiply.yml ```sh npm i -g @grnsft/if -ie --manifest ./examples/manifests/test/multiply.yml --output ./examples/outputs/multiply.yml +if-run --manifest ./examples/manifests/test/multiply.yml --output ./examples/outputs/multiply.yml ``` The results will be saved to a new `yaml` file in `./examples/outputs` diff --git a/src/builtins/sci-embodied/README.md b/src/builtins/sci-embodied/README.md index 90fc01d5..70307fee 100644 --- a/src/builtins/sci-embodied/README.md +++ b/src/builtins/sci-embodied/README.md @@ -104,7 +104,7 @@ You can run this example `manifest` by executing the following command from the ```sh npm i -g @grnsft/if -ie --manifest manifests/plugins/sci-embodied.yml --output manifests/outputs/sci-embodied.yml +if-run --manifest manifests/plugins/sci-embodied.yml --output manifests/outputs/sci-embodied.yml ``` The results will be saved to a new `yaml` file in `./examples/outputs`. diff --git a/src/builtins/sci/README.md b/src/builtins/sci/README.md index 477f74dc..658209f1 100644 --- a/src/builtins/sci/README.md +++ b/src/builtins/sci/README.md @@ -83,7 +83,7 @@ You can run this example `manifest` by saving it as `./manifests/plugins/sci.yml ```sh npm i -g @grnsft/if -ie --manifest manifests/plugins/sci.yml --output manifests/outputs/sci.yml +if-run --manifest manifests/plugins/sci.yml --output manifests/outputs/sci.yml ``` The results will be saved to a new `yaml` file. diff --git a/src/builtins/shell/README.md b/src/builtins/shell/README.md index ea813878..54ccac28 100644 --- a/src/builtins/shell/README.md +++ b/src/builtins/shell/README.md @@ -124,7 +124,7 @@ You can run this example `manifest` by saving it as `manifests/plugins/shell.yml ```sh npm i -g @grnsft/if -ie --manifest manifests/plugins/shell.yml --output manifests/outputs/shell.yml +if-run --manifest manifests/plugins/shell.yml --output manifests/outputs/shell.yml ``` The results will be saved to a new `yaml` file. diff --git a/src/builtins/subtract/README.md b/src/builtins/subtract/README.md index 9279220b..bb843554 100644 --- a/src/builtins/subtract/README.md +++ b/src/builtins/subtract/README.md @@ -88,7 +88,7 @@ You can run this example by saving it as `./examples/manifests/test/subrtact.yml ```sh npm i -g @grnsft/if -ie --manifest /manifests/plugins/subtract.yml --output manifests/outputs/subtract.yml +if-run --manifest /manifests/plugins/subtract.yml --output manifests/outputs/subtract.yml ``` The results will be saved to a new `yaml` file in `manifests/outputs`. diff --git a/src/builtins/sum/README.md b/src/builtins/sum/README.md index b912c07b..d3fd892d 100644 --- a/src/builtins/sum/README.md +++ b/src/builtins/sum/README.md @@ -85,7 +85,7 @@ tree: You can run this example by saving it as `./examples/manifests/sum.yml` and executing the following command from the project root: ```sh -ie --manifest ./examples/manifests/sum.yml --output ./examples/outputs/sum.yml +if-run --manifest ./examples/manifests/sum.yml --output ./examples/outputs/sum.yml ``` The results will be saved to a new `yaml` file in `./examples/outputs`. From 5ec4d5a25739f5f7458a7b65c4ffad6c8e8d4c1a Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:25:00 +0100 Subject: [PATCH 8/9] fix(lib): small fix to contributing guide --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3974becb..841d6927 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ The following document is a rule set of guidelines for contributing. ## What and when to contribute -You can contribute anything to the IF, but we are likely to close out unsolicited PRs without merging them. Our issue board is completely open and we have tags (`help-wanted`, `good-first-issue`) to help contributors to choose tasks to work on. We recommend speaking to the core team on Github before starting working on an issue. You can do this by raising an issue or commenting on an existing issue. This helps us to direct your energy in directions that are aligned with our roadmap, prevent multiple people working on the same task, and better manage our board. This all makes it much more likely that your work will get merged. +You can contribute anything to the IF, but we are likely to close out unsolicited PRs without merging them. Our issue board is completely open and we have tags (`core-only`, `good-first-issue`) to help contributors to choose tasks to work on. If an issue is unassigned and does not have the `core-only` label, it is available to work on. We recommend speaking to the core team on Github before starting working on an issue. You can do this by commenting on an existing issue or discussion thread or starting a new one if appropriate. This helps us to direct your energy in directions that are aligned with our roadmap, prevent multiple people working on the same task, and better manage our board. This all makes it much more likely that your work will get merged. You can also contribute by participating in discussions on our mailing list at [if-community@greensoftware.foundation](https://groups.google.com/u/1/a/greensoftware.foundation/g/if-community). We send out weekly updates that includes what we've shipped, what we're working on and how you can get involved each week. From 1ddb2f2bec24d759261898843736fca1d0a70856 Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:30:33 +0100 Subject: [PATCH 9/9] fix(package): remove refs to if-plugins --- CONTRIBUTING.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 841d6927..d1ea0db5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,9 +30,9 @@ You can also contribute by participating in discussions on our mailing list at [ ## Reporting bugs -We appreciate bug reports! If you experience an issue with IF or one of our plugins, you can report it using our bug reporting template. To do this: +We appreciate bug reports! If you experience an issue with IF, you can report it using our bug reporting template. To do this: -1. Go to the [IF repository](https://github.com/Green-Software-Foundation/if) (or [plugin repository](https://github.com/Green-Software-Foundation/if-plugins) if you bug relates to a specific plugin) +1. Go to the [IF repository](https://github.com/Green-Software-Foundation/if) 2. Click on the `Issues` tab 3. Click on `Create New Issue` and select the `Bug Report` template. 4. Fill out the requested information. @@ -46,8 +46,7 @@ The assessment rubric is as follows: | | Consequence | Severity | | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -------- | | Bugs in IF core leading to incorrect calculations | unusable framework | 5 | -| Bugs in if-plugins leading to incorrect calculations | core pathways fail, IF very limited in functionality | 5 | -| Bugs in if-unofficial-pluginsd leading to incorrect calculations | Third party plugins harder to use, limits IF to standard lib | 3 | +| Bugs in builtins leading to incorrect calculations | core pathways fail, IF very limited in functionality | 5 | | Bugs in template | Harder to build plugins, ecosystem growth is impacted | 2 | | Bugs in docs | product does not match expectation, hard to debug, frustration, loss of adoption | 2 | | Security flaw: privacy related | leak user data, unlikely to achieve adoption in serious orgs | 5 |