diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3974becb0..d1ea0db53 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,15 +24,15 @@ 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. ## 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 | diff --git a/README.md b/README.md index c34bf0069..9de6c64e7 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 diff --git a/Refactor-migration-guide.md b/Refactor-migration-guide.md index 80328fe9e..95269e1a5 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 ``` diff --git a/package-lock.json b/package-lock.json index 885d05d11..8d3fc6f29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,8 +24,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 1846ec684..c79c5861a 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": { @@ -73,8 +73,8 @@ "coverage": "jest --verbose --coverage --testPathPattern=src/__tests__/unit", "fix": "gts fix", "fix:package": "fixpack", - "ie": "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", diff --git a/scripts/run-yamls.sh b/scripts/run-yamls.sh index 11371af66..fbe394c6b 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 diff --git a/src/__tests__/integration/scenarios/sci-e.ts b/src/__tests__/integration/scenarios/sci-e.ts index 9fb808341..0342240c2 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 diff --git a/src/builtins/README.md b/src/builtins/README.md index b9906921d..c37e143a1 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 096d20ab5..bf8808e8c 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 2c52969ae..d1aece699 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 d403d0361..20ed19f55 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 48a67965a..d84020d63 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 cfcca2fa1..670a65ef2 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 629e27f2d..1af4cd6d6 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 d4e27674c..695d89331 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 90fc01d58..70307fee1 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 477f74dc0..658209f1a 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 ea813878b..54ccac285 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 9279220b8..bb8435548 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 b912c07b3..d3fd892da 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`.