-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from openEDI/jm/new_feeder
Update feeder along with gadal -> oedisi
- Loading branch information
Showing
28 changed files
with
2,239 additions
and
962 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,16 @@ jobs: | |
- name: build docker container | ||
shell: bash | ||
run: | | ||
echo "$SSH_KEY" > gadal_docker_key | ||
docker build --secret id=gadal_github_key,src=gadal_docker_key --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: | ||
|
@@ -34,9 +33,7 @@ jobs: | |
shell: bash -l {0} | ||
run: | | ||
pip install matplotlib pyarrow numpy matplotlib pandas | ||
eval `ssh-agent -s` | ||
ssh-add - <<< '${{ secrets.SGIDAL_CLONE_KEY }}' | ||
pip install git+ssh://[email protected]/openEDI/[email protected] | ||
pip install oedisi==1.0.0 | ||
python post_analysis.py outputs_build | ||
- name: Archive logs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,14 +24,11 @@ jobs: | |
shell: bash -l {0} | ||
run: | | ||
pip install -r requirements.txt | ||
eval `ssh-agent -s` | ||
ssh-add - <<< '${{ secrets.SGIDAL_CLONE_KEY }}' | ||
pip install git+ssh://[email protected]/openEDI/[email protected] | ||
- name: Run example | ||
shell: bash -l {0} | ||
run: | | ||
python test_full_systems.py | ||
helics run --path=build/test_system_runner.json | ||
oedisi build --system scenarios/docker_system.json | ||
oedisi run | ||
python post_analysis.py | ||
- name: Archive logs | ||
uses: actions/upload-artifact@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: TestLocalFeeder | ||
|
||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ['3.10'] | ||
#include: | ||
#- os: ubuntu-latest | ||
#python-version: 3.10 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install python dependencies | ||
shell: bash -l {0} | ||
run: | | ||
pip install -r requirements.txt | ||
pip install plotille pytest | ||
- name: Run pytest on LocalFeeder | ||
shell: bash -l {0} | ||
run: | | ||
cd LocalFeeder | ||
pytest -s . | ||
env: | ||
PYTEST_ADDOPTS: "--color=yes" | ||
PYTHONIOENCODING: UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.9.3 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.981 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [pydantic] # add if use pydantic | ||
- repo: https://github.com/pycqa/pydocstyle | ||
rev: 6.3.0 | ||
hooks: | ||
- id: pydocstyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,23 +3,21 @@ FROM python:3.10.6-slim-bullseye | |
RUN apt-get update && apt-get install -y git ssh | ||
|
||
RUN mkdir -p /root/.ssh | ||
ENV GIT_SSH_COMMAND="ssh -i /run/secrets/gadal_github_key" | ||
RUN ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
RUN --mount=type=secret,id=gadal_github_key pip install git+ssh://[email protected]/openEDI/[email protected] | ||
|
||
WORKDIR /simulation | ||
|
||
COPY test_full_systems.py . | ||
COPY scenarios/docker_system.json docker_system.json | ||
COPY components.json . | ||
COPY LocalFeeder LocalFeeder | ||
COPY README.md . | ||
COPY measuring_federate measuring_federate | ||
COPY wls_federate wls_federate | ||
COPY recorder recorder | ||
|
||
RUN mkdir -p outputs build | ||
RUN python test_full_systems.py --system docker_system.json | ||
|
||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
ENTRYPOINT ["helics", "run", "--path=build/test_system_runner.json"] | ||
|
||
RUN oedisi build --system docker_system.json | ||
ENTRYPOINT ["oedisi", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
base_*.csv | ||
base_*.npz | ||
opendss | ||
profiles | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
|
Oops, something went wrong.