Introduce WindFarmParameters and make types more consistent#14
Conversation
… made the corresponding nodes more consistent [skip ci]
There was a problem hiding this comment.
Pull request overview
This PR introduces WindFarmParameters to centralize wind-farm sampling parameters similarly to PVParameters, updates the wind sampling constructor to consume the new parameter type, and adds validation/tests/docs for the new API.
Changes:
- Added
WindFarmParameters,to_dict(::WindFarmParameters), and lat/lon validation for parameter types. - Updated
WindPowersampling constructor and tests to useWindFarmParametersandDateTime. - Updated exports, public docs, release notes, and formatting in related tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/datastructures.jl |
Adds wind parameter type, validation, conversion helper, and refactors sampling docs/signature. |
src/EnergyModelsLanguageInterfaces.jl |
Exports the new parameter type and reorganizes exports. |
docs/src/library/public.md |
Documents the new parameter type/helper and updated WindPower constructor signature. |
test/test_windpower.jl |
Adds constructor and validation tests for WindFarmParameters. |
test/test_PV.jl |
Adds invalid latitude/longitude tests for PVParameters. |
test/utils.jl |
Updates wind test helper to use the new constructor and applies formatting changes. |
test/test_checks.jl |
Applies formatting-only updates to test dictionaries. |
NEWS.md |
Adds release note entry for WindFarmParameters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
JulStraus
left a comment
There was a problem hiding this comment.
Minor changes to the docstrings for the Parameters. In addition, I am uncertain whether we should use the finite tests. Honestly speaking, I do not know how non finite numbers could be provided except for someone providing a value of NaN or Inf.
In this case, I would just let them run into problems with nondescriptive error messages as it is just plain stupid. ;)
Zetison
left a comment
There was a problem hiding this comment.
I have added your suggestions
Introduces WindFarmParameters more in line with PVParameters and also made the corresponding nodes more consistent.