Skip to content

Commit

Permalink
Update CI Action to run on PRs (#151)
Browse files Browse the repository at this point in the history
* Update CI Action to run on PRs

* Add CI Badge to README.md

* Fix failing hybrid test
  • Loading branch information
camirmas authored Jul 31, 2023
1 parent 3d53f84 commit 9506a41
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Testing

on: [ push ]
on: [ push, pull_request ]

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Hybrid Optimization and Performance Platform

![CI Tests](https://github.com/NREL/HOPP/actions/workflows/ci.yml/badge.svg)

As part of NREL's [Hybrid Energy Systems Research](https://www.nrel.gov/wind/hybrid-energy-systems-research.html), this
software assesses optimal designs for the deployment of utility-scale hybrid energy plants, particularly considering wind,
solar and storage.
Expand Down
2 changes: 1 addition & 1 deletion hybrid/layout/pv_design_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def size_electrical_parameters(
inverter_power=inverter_power,
)

if n_inputs_combiner:
if n_inputs_combiner is not None and n_inputs_inverter is not None:
n_combiners = math.ceil(n_strings / n_inputs_combiner)
# Ensure there are enough inverters for the number of combiner boxes
n_inverters = max(n_inverters, math.ceil(n_combiners / n_inputs_inverter))
Expand Down
4 changes: 3 additions & 1 deletion tests/hybrid/test_hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ def test_hybrid_detailed_pv_only(site):
solar_only['pv']['tech_config']['cec_i_mp_ref'] \
* solar_only['pv']['tech_config']['cec_v_mp_ref'] \
* 1e-3,
inverter_power=solar_only['pv']['tech_config']['inv_snl_paco'] * 1e-3
inverter_power=solar_only['pv']['tech_config']['inv_snl_paco'] * 1e-3,
n_inputs_inverter=50,
n_inputs_combiner=32
)
assert n_strings == 13435
assert n_combiners == 420
Expand Down

0 comments on commit 9506a41

Please sign in to comment.