Add NREL-118 reader for inflows and capacity factors#24
Merged
FelixCAAuer merged 1 commit intomainfrom Nov 19, 2025
Merged
Conversation
Add safety catch in compare excels if color property of cell is None
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new NREL-118 data reader module and fixes a None-safety issue in the Excel comparison utility. The new nrel118-reader.py module provides functions to read power inflow and VRES profile data from NREL-118 source files and convert them to the LEGO data format. The ExcelReader fix prevents AttributeError exceptions when comparing Excel files with cells that have None color properties.
- Adds reader functions for NREL-118 power inflows and VRES profiles
- Implements safety checks for None color properties in Excel cell comparison
- Includes data validation and clipping options for VRES profiles
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| nrel118-reader.py | New module with two reader functions to convert NREL-118 hydro inflow and VRES profile data to LEGO format |
| ExcelReader.py | Adds None checks to prevent AttributeError when comparing Excel cell colors |
Comments suppressed due to low confidence (2)
nrel118-reader.py:1
- The condition on line 508 will raise AttributeError if target_cell.font.color is None, since getattr cannot be called on None. The condition should be: (target_cell.font.color is not None and v2 != getattr(target_cell.font.color, k2)).
import os
nrel118-reader.py:1
- The condition on line 521 will raise AttributeError if target_cell.fill.color is None, since getattr cannot be called on None. The condition should be: (target_cell.fill.color is not None and v2 != getattr(target_cell.fill.color, k2)).
import os
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add safety catch in compare excels if color property of cell is None