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

feat: add validation for generation values against site capacity #194

Closed
wants to merge 3 commits into from
Closed

feat: add validation for generation values against site capacity #194

wants to merge 3 commits into from

Conversation

anxkhn
Copy link
Contributor

@anxkhn anxkhn commented Sep 28, 2024

Pull Request

Description

  • Implemented logic to compare uploaded PV generation values against the site's capacity.
  • Raised HTTP 102 error if any generation value exceeds the site's capacity, with a custom error message informing the user.
  • Added site capacity check in the /sites/{site_uuid}/pv_actual route.

Fixes #191

How Has This Been Tested?

  • Yes

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@anxkhn
Copy link
Contributor Author

anxkhn commented Sep 28, 2024

Hey @peterdudfield !
Here's my PR. This is my first time contributing to @openclimatefix
Can you help set it up properly locally and update the tests so it passes?

@anxkhn anxkhn closed this by deleting the head repository Sep 28, 2024
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.

Warning" If user uploads generation data > capacity of syste,
1 participant