Skip to content

Commit

Permalink
Fix workflow and README names
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph McKinsey committed May 31, 2023
1 parent aa0a11b commit e086b0f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
- name: build docker container
shell: bash
run: |
docker build --progress=plain -t gadal-example:0.0.0 .
docker build --progress=plain -t oedisi-example:0.0.0 .
env:
SSH_KEY: ${{secrets.SGIDAL_CLONE_KEY}}
DOCKER_BUILDKIT: '1'
- name: run docker continaer
shell: bash
run: |
mkdir outputs_build
docker volume create --name gadal_output --opt type=none --opt device=$(pwd)/outputs_build --opt o=bind
docker run --rm --mount source=gadal_output,target=/simulation/outputs gadal-example:0.0.0
docker volume create --name oedisi_output --opt type=none --opt device=$(pwd)/outputs_build --opt o=bind
docker run --rm --mount source=oedisi_output,target=/simulation/outputs oedisi-example:0.0.0
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -33,7 +33,7 @@ jobs:
shell: bash -l {0}
run: |
pip install matplotlib pyarrow numpy matplotlib pandas
pip install git+https://github.com/openEDI/[email protected]#egg=gadal
pip install oedisi==1.0.0
python post_analysis.py outputs_build
- name: Archive logs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
- name: Run example
shell: bash -l {0}
run: |
gadal build --system scenarios/docker_system.json
gadal run
oedisi build --system scenarios/docker_system.json
oedisi run
python post_analysis.py
- name: Archive logs
uses: actions/upload-artifact@v2
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GADAL-example
# oedisi-example

This example shows how to use the GADAL api to manage simulations. We also
use it as a testing ground for the testing the combination of feeders,
Expand All @@ -10,13 +10,13 @@ state estimation, and distributed OPF.
```
pip install -r requirements.txt
```
2. Run `gadal build --system scenarios/docker_system.json` to initialize the system
2. Run `oedisi build --system scenarios/docker_system.json` to initialize the system
defined in `scenarios/test_system.json` in a `build` directory.

You can specify your own directory with `--system` and your own system json
with `--system`.

3. Run `gadal run`
3. Run `oedisi run`
4. Analyze the results using `python post_analysis.py`

This computes some percentage relative errors in magnitude (MAPE) and angle (MAE),
Expand All @@ -31,15 +31,15 @@ If the simulation fails, you may **need** to kill the `helics_broker` manually b
When debugging, you should check the `.log` files for errors. Error code `-9` usually occurs
when it is killed by the broker as opposed to failing directly.

You can use the `gadal` CLI tools to help debug specific components or timing.
You can use the `oedisi` CLI tools to help debug specific components or timing.

- `gadal run-with-pause`
- `gadal debug-component --foreground feeder`
- `oedisi run-with-pause`
- `oedisi debug-component --foreground feeder`

# Components

All the required components are defined in folders within this repo. Each component
pulls types from `gadal.data_types`.
pulls types from `oedisi.types.data_types`.

![Block diagram of simulation](sgidal-example.png)

Expand Down Expand Up @@ -85,7 +85,7 @@ information about the inputs and outputs of each component.
We created component python scripts that matched these component
descriptions and followed the GADAL API for configuration.

In order to use the data types from other federates, the `gadal.gadal_types`
In order to use the data types from other federates, the `oedisi.types`
module is critical. If additional data is needed, then we recommend
subclassing the pydantic models and adding the data in the required federates
as needed. This ensures that others should still be able to parse your types if
Expand Down Expand Up @@ -113,21 +113,21 @@ for each component with the right configuration.
# Docker Container

```
docker build -t gadal-example:0.0.0 .
docker build -t oedisi-example:0.0.0 .
```

To get a docker volume pointed at the right place locally, we have to run more commands
```
mkdir outputs_build
docker volume create --name gadal_output --opt type=none --opt device=$(PWD)/outputs_build --opt o=bind
docker volume create --name oedisi_output --opt type=none --opt device=$(PWD)/outputs_build --opt o=bind
```

If `pwd` is unavailable on your system, then you must specify the exact path. On windows, this will end up
being `/c/Users/.../outputs_builds/`. You must use forward slashes.

Then we can run the docker image:
```
docker run --rm --mount source=gadal_output,target=/simulation/outputs gadal-example:0.0.0
docker run --rm --mount source=oedisi_output,target=/simulation/outputs oedisi-example:0.0.0
```

You can omit the docker volume parts as well as `--mount` if you do not care about the exact outputs.

0 comments on commit e086b0f

Please sign in to comment.