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

Add edit_site method #180

Merged
merged 3 commits into from
Jul 18, 2024
Merged

Add edit_site method #180

merged 3 commits into from
Jul 18, 2024

Conversation

Bvr4
Copy link
Contributor

@Bvr4 Bvr4 commented Jul 18, 2024

Pull Request

Description

This PR refers to the issue #178 : edit site

Creation of the route and put_site_info method in main.py, that call edit_site function from pvsite_datamodel.

How Has This Been Tested?

Creation of 2 test functions:

  • test_put_site_info in test_main.py, testing the route

  • test_put_site_and_update in test_sites.py, testing that the site metadata is actually updated.

  • 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

Bvr4 added 3 commits July 12, 2024 18:04
Added put_site_info function that allow users to update metadata of a given site.
This function call edit_site from pvsite_datamodel
added put_site_info route so a user can update site informations
added test_put_site_info to test the route
added test_put_site_and_update to test that informations are actually updated.
@peterdudfield peterdudfield requested a review from zakwatts July 18, 2024 15:15
@zakwatts
Copy link
Contributor

Looks great, Thanks @Bvr4 !

@zakwatts zakwatts merged commit 63fc006 into openclimatefix:main Jul 18, 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.

2 participants