Skip to content

Commit

Permalink
chore(src): fetch changes from main
Browse files Browse the repository at this point in the history
  • Loading branch information
narekhovhannisyan committed Jun 14, 2024
2 parents 3000cc9 + d8a49b2 commit b8e299b
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 39 deletions.
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 |
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path-to-your-manifest-file>
if-run --manifest <path-to-your-manifest-file>
## or you can use aliases
ie -m <path-to-your-manifest-file>
if-run -m <path-to-your-manifest-file>
```

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 <path-to-your-manifest-file> --stdout
if-run --manifest <path-to-your-manifest-file> --stdout
## or using aliases
ie -m <path-to-your-manifest-file> -s
if-run -m <path-to-your-manifest-file> -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:
Expand All @@ -66,25 +66,25 @@ initialize:
On the command line:

```sh
ie --manifest <path-to-your-manifest-file> --output <your-savepath>
if-run --manifest <path-to-your-manifest-file> --output <your-savepath>
## or using aliases
ie -m <path-to-your-manifest-file> -o <your-savepath>
if-run -m <path-to-your-manifest-file> -o <your-savepath>
```

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 <path-to-your-manifest-file> --debug
if-run --manifest <path-to-your-manifest-file> --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
Expand Down
10 changes: 5 additions & 5 deletions Refactor-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path-to-manifest>
if-run --manifest <path-to-manifest>
```


Expand All @@ -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 <path-to-manifest> --output <savepath>
if-run --manifest <path-to-manifest> --output <savepath>
```

## Outputs
Expand Down Expand Up @@ -55,13 +55,13 @@ npm i @grnsft/if
Then run IF using the following command:

```sh
ie --manifest <path-to-manifest>
if-run --manifest <path-to-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 <path-to-manifest> --output <savepath>
if-run --manifest <path-to-manifest> --output <savepath>
```


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"email": "info@gsf.com"
},
"bin": {
"ie": "./build/index.js",
"if-run": "./build/index.js",
"if-diff": "./build/diff.js"
},
"bugs": {
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-yamls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/__tests__/integration/scenarios/sci-e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/builtins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/builtins/coefficient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
2 changes: 1 addition & 1 deletion src/builtins/csv-lookup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/builtins/divide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/builtins/exponent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/builtins/interpolation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion src/builtins/mock-observations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/builtins/multiply/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
2 changes: 1 addition & 1 deletion src/builtins/sci-embodied/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/builtins/sci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/builtins/shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/builtins/subtract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/builtins/sum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit b8e299b

Please sign in to comment.