Open
Conversation
Collaborator
sameersk2k
commented
Feb 6, 2026
- added year_range and year_set params in the both timeseries endpoints.
- added timeseries/energy endpoint for csv downloads
- both timeseries endpoints support "monthly" and "hourly" period
RLiNREL
reviewed
Feb 6, 2026
|
|
||
| if start_year > end_year: | ||
| raise ValueError(f"Invalid range: Start year ({start_year}) cannot be greater than end year ({end_year}).") | ||
|
|
Collaborator
There was a problem hiding this comment.
also, need to validate to the available range in the MODEL_CONFIG to make sure the range is not out of bound
Collaborator
Author
There was a problem hiding this comment.
the range validation after this validation is handled in timeseries_core
years = [validate_year(year, model) for year in resolved_years]
| resolved_years = list(range(start_year, end_year + 1)) | ||
| elif year_set: | ||
| resolved_years = MODEL_CONFIG[model]["years"].get(year_set, []) | ||
| if not resolved_years: |
Collaborator
There was a problem hiding this comment.
let's add a validation method in validation.py and call it here
Collaborator
Author
There was a problem hiding this comment.
will this new validation method take all years type params and return resolved_years finally?
| df_with_energy, _ = power_curve_manager.compute_energy_production_df( | ||
| df, heights, powercurve, model, relevant_columns_only=False | ||
| ) | ||
| df_with_energy = df_with_energy.rename(columns= lambda x: x.replace("_kw", "_kwh") if x.startswith('windspeed') and x.endswith('_kw') else x) |
Collaborator
There was a problem hiding this comment.
- can the renaming be taken care of in the .compute_energy_production_df()?
- should the column be 'energy_kwh' instead of 'windspeed_kwh'?
Collaborator
Author
There was a problem hiding this comment.
Yes good idea i should handle both in the powercurve manager.
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.