NatLabRockies / NatLabRockies/H2Integrate

Update controller tests to not depend on `calculate_combined_outputs` function

Open
#676 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
26
Forks
44
Avg merge
3d 22h
Merged PRs (30d)
16

Description

Update the control tests to test different outputs (don't test the unmet demand, excess commodity, etc). Some control tests have many subtests on outputs that are now calculated in demand components, so a function calculate_combined_outputs was added to calculate these outputs. Tests that use calculate_combined_outputs should be updated to test other outputs from storage performance models or the controllers, not test outputs from the demand components.

This came up in PR #666

Originally posted by @elenya-grant in https://github.com/NatLabRockies/H2Integrate/pull/666#discussion_r3081032323

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the control tests and PR #666 discussion to find cases that call calculate_combined_outputs. Replace assertions on unmet demand, excess commodity, and other demand-component outputs with assertions on outputs from storage performance models or controllers. Done means those tests no longer depend on calculate_combined_outputs while still checking the relevant control behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.