Skip to content

Functionalize resource module and add tests#221

Draft
paulf81 wants to merge 40 commits intoNatLabRockies:developfrom
paulf81:feature/modularize_resource
Draft

Functionalize resource module and add tests#221
paulf81 wants to merge 40 commits intoNatLabRockies:developfrom
paulf81:feature/modularize_resource

Conversation

@paulf81
Copy link
Collaborator

@paulf81 paulf81 commented Mar 2, 2026

This draft PR is a first step towards addressed #210 . Rather then doing that all in one PR, thought a nicer thing is a PR that simply reorganizes what is already there in hercules/resource/wind_solar_resource_downloader.py into smaller functions and add tests for those functions. Currently, the main means of checking the resourece modules are the examples in examples/inputs, but if we chunk smaller operations into smaller functions, then all but the download itself can be tested with synthetic data. This can all be done without any changes that say effect the files in examples/inputs.

Note: this will look like more changes than it is until #216 is merged

Steps:

  • Break large functions in hercules/resource/wind_solar_resource_downloader.py into smaller functions, and those that can be applied to several relocate to a new file hercules/resource/resource_utilities.py
  • Iterate to happy we've hit a small enough level (can also consider rewriting some aspects but thought keeping scope to simply re-arranging a nice start)
  • Add tests for functions in hercules/resource/resource_utilities.py that do not download data
  • If necessary (probably not) update docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants