Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ie to if-run #833

Merged
merged 7 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "[email protected]"
},
"bin": {
"ie": "./build/index.js",
"if-run": "./build/index.js",
"if-diff": "./build/diff.js"
},
"bugs": {
Expand Down Expand Up @@ -72,8 +72,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`.