Skip to content

first pass battery documentation #15

first pass battery documentation

first pass battery documentation #15

name: Check Examples APIs
on: [push, pull_request]
jobs:
examples-check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest] #, macos-latest, windows-latest]
fail-fast: False
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[develop]"
pip install git+https://github.com/NREL/electrolyzer.git
pip install https://github.com/NREL/SEAS/blob/main/SEAS.tar.gz?raw=true
pip install git+https://github.com/NREL/floris.git@v4
- name: Run example 06_amr_wind_standin_and_battery
# Run all examples and test that they finish successfully. Do not evaluate the results.
# Copy the examples to a new directory outside of the repo to ensure that there is no
# reliance on the repo directory structure.
run: |
#mkdir -p temp1/temp2/temp3
#cp -rv example_case_folders/06_amr_wind_standin_and_battery/ temp1/temp2/temp3/.
# cd temp1/temp2/temp3/06_amr_wind_standin_and_battery/
cd example_case_folders/06_amr_wind_standin_and_battery/
error_found=0 # 0 is false
error_results="Error in example:"
# Try running the bash script
if ! bash batch_script.sh; then
error_results="${error_results}"$'\n'" - run_example.sh"
error_found=1
fi
if [[ ! $error_found ]]; then
echo "${error_results}"
fi
exit $error_found