Skip to content

Commit

Permalink
Added support for states = 'all' in HydrFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
SarathUW committed Dec 11, 2024
1 parent ee20e01 commit 055da40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/pywris/pywris.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def filter(hf, on, by, range=None, values=None):
return filtered_hf

## Things to DO:
## 1. Add representation to individual classes of State, Reservoir and District.
## 2. Adjust indentation and padding in HydroFrame representation
## 3. Renaming of columns in reservoir_gdf
## 4. Pytests
## 1. Add representation to individual classes of State, Reservoir and District. (done)
## 2. Adjust indentation and padding in HydroFrame representation (done)
## 3. Renaming of columns in reservoir_gdf (done)
## 4. Pytests

5 changes: 4 additions & 1 deletion src/pywris/surface_water/storage/reservoir.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ def get_reservoir_info(reservoir_name_str, selection_all=False):
JSON response containing detailed information about the reservoirs.
"""
url = requests_config["reservoir"]["get_reservoir_info"]["url"]
payload = deepcopy(requests_config["reservoir"]["get_reservoir_info"]["payload"])
if selection_all:
payload = deepcopy(requests_config["reservoir"]["get_reservoir_info"]["payload_all_reservoirs"])
else:
payload = deepcopy(requests_config["reservoir"]["get_reservoir_info"]["payload"])
payload = payload.format(reservoir_name_str)
method = requests_config["reservoir"]["get_reservoir_info"]["method"]
# Send request and get response
Expand Down

0 comments on commit 055da40

Please sign in to comment.