Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bespoke to read list for resource input #461

Merged
merged 13 commits into from
Sep 12, 2024
Merged

Conversation

ppinchuk
Copy link
Collaborator

@ppinchuk ppinchuk commented Aug 13, 2024

Allow bespoke class to ingest list as resource file, so that you can use

"res_fpath": [
    "/datasets/WIND/conus/v1.0.0/wtk_conus_*.h5",
    "/datasets/WIND/HRRR/hrrr_conus_*.h5",
]

in your bespoke config. Note that vanilla reV instead requires you to list the files out individually. This is because vanilla generation allows brackets {} in the file path that would get filled in by the analysis_years input, so it would be ambiguous which years to use for which file path if the input was:

"resource_file": [
    "/datasets/WIND/conus/v1.0.0/wtk_conus_{}.h5",
    "/datasets/WIND/HRRR/hrrr_conus_{}.h5",
]

(i.e. does 2007 below with WTK or HRRR? What about 2015?, etc).

This PR includes tests for list input, but this use pattern was also tested in production for FY24 SS with WTK+BCHRRR runs.

@ppinchuk ppinchuk added the feature New feature or request label Aug 13, 2024
@ppinchuk ppinchuk self-assigned this Aug 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.68%. Comparing base (f4b0b40) to head (81befce).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
+ Coverage   87.64%   87.68%   +0.03%     
==========================================
  Files         122      122              
  Lines       18155    18156       +1     
==========================================
+ Hits        15912    15920       +8     
+ Misses       2243     2236       -7     
Flag Coverage Δ
unittests 87.68% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ppinchuk ppinchuk linked an issue Aug 16, 2024 that may be closed by this pull request
@ppinchuk ppinchuk marked this pull request as ready for review August 28, 2024 00:38
@ppinchuk ppinchuk changed the title [WIP] Allow bespoke to read list for resource input Allow bespoke to read list for resource input Aug 28, 2024
@ppinchuk ppinchuk requested a review from grantbuster August 28, 2024 00:44
@ppinchuk
Copy link
Collaborator Author

@grantbuster This PR moves to using MultiYearWindResource exclusively in bespoke. I haven't run across any issues in doing so in the tests or production. Any edge case you could think of where we would definitely want to use the basic WindResource file handler?

@ppinchuk ppinchuk merged commit 7d4a339 into main Sep 12, 2024
11 checks passed
@ppinchuk ppinchuk deleted the pp/resource_as_list branch September 12, 2024 04:10
github-actions bot pushed a commit that referenced this pull request Sep 12, 2024
Allow bespoke to read list for resource input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pySAM link appears incorrect?
2 participants