-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 client table #158
Add client table #158
Conversation
Add clientSQL in splmodels, with client_name Mapped relationships between Client and Site
added create_client and edit_client functions, and related tests. edited PVSiteEditMetadata pydantic model, so edit_site function can update the client_uuid. edited create_site function, so it can set the client_uuid.
Moved the client functions from user_and_site.py to client.py
Added get_client_by_name function, and related tests. This function can create a new client if it doesn't exist.
Hi @Bvr4 Thanks so much for this. You ok to adjust the alembic migration, its just becasue another one has sneaked in this before this. You can either update the hash in the migrations, or just re make it. I think other than, that, its ready to go |
OK, I'll take a look at it next week. |
Thanks @Bvr4 |
I edited the revises and down_revision hashes in the alembic migration. I guess it will do the trick. |
Pull Request
Description
This PR refers to the issue #148 Client table.
Added client table with client_name. Mapped the table with sites.
Made alembic migration.
Added read functions : get_sites_by_blient_name and get_client_by_name (with the option of creating the client if it doesn't exist.
Added write functions : create_client, edit_client, assign_site_to_client.
Fixes #
How Has This Been Tested?
I created the tests associated with each function, via pytest.
For that, I made small modifications to conftest.py, like the creation of a client fixture.
If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?
Checklist: