Conversation
Enovotny
requested changes
Jul 30, 2025
| print("Initializing CWMS API session for locations operations test...") | ||
|
|
||
|
|
||
| def test_store_location(): |
Collaborator
There was a problem hiding this comment.
instead of a test which is already taken care of in the locations test. can you try this code in the beginning. Treyson is using it for timeseries. It will do a spin up and tear down. feel free to put in your own location information... can also add timeseries for the timeseries group..
# Setup and teardown fixture for test location
@pytest.fixture(scope="module", autouse=True)
def setup_data():
loc_id = "pytest_loc"
location_data = {
"name": loc_id,
"latitude": 38.0,
"longitude": -121.0,
"public-name": "pytest location",
"long-name": "Pytest Location for Timeseries Testing",
"elevation": 10.0,
"unit": "m",
}
# Store location before tests
cwms.store_location(location_data)
yield
# Delete location after tests
cwms.delete_location(loc_id)
Collaborator
Author
There was a problem hiding this comment.
Sounds good, I updated the ts and loc groups to use the module
|
Enovotny
approved these changes
Aug 5, 2025
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.



Adds location and timeseries group examples and tests.
Updates location group functions to add df to json function and allow cascade delete.
Bump version to 0.8.1