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

Issue/create new site group #84

Merged
merged 7 commits into from
Oct 13, 2023

Conversation

rachel-labri-tipton
Copy link
Collaborator

@rachel-labri-tipton rachel-labri-tipton commented Oct 12, 2023

Pull Request

Description

Add section to OCF Dashboard to create a new user group.

An error message is given if the site group name is left blank or if the group already exists.

Screenshot 2023-10-12 at 17 56 57 Screenshot 2023-10-12 at 17 58 11

Once a new group is made, it shows some basic site group information. This could be changed.

Screenshot 2023-10-12 at 17 59 35

How Has This Been Tested?

Wrote a test for function that creates a new site group
Ran the code locally

  • 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

@rachel-labri-tipton rachel-labri-tipton changed the title Issue/create site / user group Issue/create new site group Oct 12, 2023
src/get_data.py Outdated


# create a new site group
def create_new_site_group(session: Session, site_group_name: str) -> SiteGroupSQL:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you use https://github.com/openclimatefix/pv-site-datamodel/blob/main/pvsite_datamodel/write/user_and_site.py#L29 instead. Then its not duplicated. So you just import this in sites_toolbox.py instead

@rachel-labri-tipton rachel-labri-tipton merged commit 457a1a8 into main Oct 13, 2023
2 checks passed
@peterdudfield peterdudfield deleted the issue/create-user-and-user-group branch October 13, 2023 09:18
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