From e086b0ff783c88198d41c0bf8eb0a00b292287e3 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Wed, 31 May 2023 11:21:40 -0600 Subject: [PATCH] Fix workflow and README names --- .github/workflows/docker-test.yml | 8 ++++---- .github/workflows/test-api.yml | 4 ++-- README.md | 22 +++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 6d85056..d834fa5 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -14,7 +14,7 @@ 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' @@ -22,8 +22,8 @@ jobs: 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: @@ -33,7 +33,7 @@ jobs: shell: bash -l {0} run: | pip install matplotlib pyarrow numpy matplotlib pandas - pip install git+https://github.com/openEDI/GADAL@v0.2.4#egg=gadal + pip install oedisi==1.0.0 python post_analysis.py outputs_build - name: Archive logs diff --git a/.github/workflows/test-api.yml b/.github/workflows/test-api.yml index 61d4a10..c3641a8 100644 --- a/.github/workflows/test-api.yml +++ b/.github/workflows/test-api.yml @@ -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 diff --git a/README.md b/README.md index df75307..3bcbc77 100644 --- a/README.md +++ b/README.md @@ -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, @@ -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), @@ -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) @@ -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 @@ -113,13 +113,13 @@ 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 @@ -127,7 +127,7 @@ 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.