cwms-python 1.0.9__tar.gz → 1.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {cwms_python-1.0.9 → cwms_python-1.0.10}/PKG-INFO +4 -1
  2. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/locations/gate_changes.py +3 -3
  3. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/locations/lookups.py +8 -6
  4. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/outlets/outlets.py +1 -1
  5. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/projects/projects.py +4 -4
  6. {cwms_python-1.0.9 → cwms_python-1.0.10}/pyproject.toml +10 -1
  7. {cwms_python-1.0.9 → cwms_python-1.0.10}/LICENSE +0 -0
  8. {cwms_python-1.0.9 → cwms_python-1.0.10}/README.md +0 -0
  9. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/__init__.py +0 -0
  10. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/api.py +0 -0
  11. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/catalog/blobs.py +0 -0
  12. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/catalog/catalog.py +0 -0
  13. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/catalog/clobs.py +0 -0
  14. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/cwms_types.py +0 -0
  15. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/forecast/forecast_instance.py +0 -0
  16. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/forecast/forecast_spec.py +0 -0
  17. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/levels/location_levels.py +0 -0
  18. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/levels/specified_levels.py +0 -0
  19. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/locations/location_groups.py +0 -0
  20. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/locations/physical_locations.py +0 -0
  21. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/measurements/measurements.py +0 -0
  22. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/outlets/virtual_outlets.py +0 -0
  23. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/projects/project_lock_rights.py +0 -0
  24. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/projects/project_locks.py +0 -0
  25. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/projects/water_supply/accounting.py +0 -0
  26. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/properties/properties.py +0 -0
  27. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/ratings/ratings.py +0 -0
  28. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/ratings/ratings_spec.py +0 -0
  29. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/ratings/ratings_template.py +0 -0
  30. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/standard_text/standard_text.py +0 -0
  31. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/timeseries/timeseries.py +0 -0
  32. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/timeseries/timeseries_bin.py +0 -0
  33. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/timeseries/timeseries_group.py +0 -0
  34. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/timeseries/timeseries_identifier.py +0 -0
  35. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/timeseries/timeseries_profile.py +0 -0
  36. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/timeseries/timeseries_profile_instance.py +0 -0
  37. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/timeseries/timeseries_profile_parser.py +0 -0
  38. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/timeseries/timeseries_txt.py +0 -0
  39. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/turbines/turbines.py +0 -0
  40. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/users/users.py +0 -0
  41. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/utils/__init__.py +0 -0
  42. {cwms_python-1.0.9 → cwms_python-1.0.10}/cwms/utils/checks.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cwms-python
3
- Version: 1.0.9
3
+ Version: 1.0.10
4
4
  Summary: Corps water management systems (CWMS) REST API for Data Retrieval of USACE water data
5
5
  License: LICENSE
6
6
  License-File: LICENSE
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
19
20
  Requires-Dist: numpy (>=1.23.5,<3) ; python_version >= "3.9" and python_version < "3.13"
20
21
  Requires-Dist: numpy (>=2.1.0,<3) ; python_version == "3.13"
21
22
  Requires-Dist: numpy (>=2.3.3,<3) ; python_version >= "3.14"
@@ -23,6 +24,8 @@ Requires-Dist: pandas (>=2.3.3,<3.0.0)
23
24
  Requires-Dist: requests (>=2.32.4,<3.0.0) ; python_version == "3.9"
24
25
  Requires-Dist: requests (>=2.33.0,<3.0.0) ; python_version >= "3.10"
25
26
  Requires-Dist: requests-toolbelt (>=1.0.0,<2.0.0)
27
+ Requires-Dist: urllib3 (>=2.6.3,<2.7) ; python_version == "3.9"
28
+ Requires-Dist: urllib3 (>=2.7.0,<3.0.0) ; python_version >= "3.10"
26
29
  Project-URL: Repository, https://github.com/HydrologicEngineeringCenter/cwms-python
27
30
  Description-Content-Type: text/markdown
28
31
 
@@ -62,7 +62,7 @@ def get_all_gate_changes(
62
62
  "unit-system": unit_system,
63
63
  "page-size": page_size,
64
64
  }
65
- response = api.get(endpoint, params=params)
65
+ response = api.get(endpoint, params=params, api_version=1)
66
66
  return Data(response)
67
67
 
68
68
 
@@ -144,7 +144,7 @@ def store_gate_change(
144
144
  params = {
145
145
  "fail-if-exists": fail_if_exists,
146
146
  }
147
- return api.post(endpoint, data=gate_change_data, params=params)
147
+ return api.post(endpoint, data=gate_change_data, params=params, api_version=1)
148
148
 
149
149
 
150
150
  def delete_gate_change(
@@ -182,4 +182,4 @@ def delete_gate_change(
182
182
  "override-protection": override_protection,
183
183
  }
184
184
 
185
- return api.delete(endpoint, params=params)
185
+ return api.delete(endpoint, params=params, api_version=1)
@@ -123,14 +123,14 @@ def update_lookup(data: JSON, category: str, prefix: str) -> None:
123
123
  api.patch(endpoint, data, params, api_version=1)
124
124
 
125
125
 
126
- def delete_lookup(name: str, category: str, prefix: str, office_id: str) -> None:
126
+ def delete_lookup(
127
+ display_value: str, category: str, prefix: str, office_id: str
128
+ ) -> None:
127
129
  """
128
130
  Deletes a specified lookup entry.
129
131
 
130
132
  Parameters
131
133
  ----------
132
- name : str
133
- Specifies the location type to delete.
134
134
  category : str
135
135
  Specifies the category id of the lookup type to be deleted.
136
136
  prefix : str
@@ -153,9 +153,11 @@ def delete_lookup(name: str, category: str, prefix: str, office_id: str) -> None
153
153
  ServerError
154
154
  If a 500 range error code response is returned from the server.
155
155
  """
156
- if not all([name, category, prefix, office_id]):
157
- raise ValueError("Name, Category, Prefix, and Office ID must be specified")
156
+ if not all([display_value, category, prefix, office_id]):
157
+ raise ValueError(
158
+ "Display Value, Category, Prefix, and Office ID must be specified"
159
+ )
158
160
 
159
- endpoint = f"{ENDPOINT}/{name}"
161
+ endpoint = f"{ENDPOINT}/{display_value}"
160
162
  params = {"category": category, "prefix": prefix, "office": office_id}
161
163
  api.delete(endpoint, params, api_version=1)
@@ -192,4 +192,4 @@ def store_outlet(data: JSON, fail_if_exists: Optional[bool] = True) -> None:
192
192
 
193
193
  endpoint = "projects/outlets"
194
194
  params = {"fail-if-exists": fail_if_exists}
195
- api.post(endpoint, data, params)
195
+ api.post(endpoint, data, params, api_version=1)
@@ -87,7 +87,7 @@ def get_projects(
87
87
  "page": page,
88
88
  "page-size": page_size,
89
89
  }
90
- response = api.get(endpoint, params)
90
+ response = api.get(endpoint, params, api_version=1)
91
91
  return Data(response)
92
92
 
93
93
 
@@ -208,7 +208,7 @@ def rename_project(office_id: str, old_name: str, new_name: str) -> None:
208
208
 
209
209
  endpoint = f"projects/{old_name}"
210
210
  params = {"office": office_id, "name": new_name}
211
- api.patch(endpoint=endpoint, params=params)
211
+ api.patch(endpoint=endpoint, params=params, api_version=1)
212
212
 
213
213
 
214
214
  def store_project(data: JSON, fail_if_exists: Optional[bool] = True) -> None:
@@ -243,7 +243,7 @@ def store_project(data: JSON, fail_if_exists: Optional[bool] = True) -> None:
243
243
 
244
244
  endpoint = "projects"
245
245
  params = {"fail-if-exists": fail_if_exists}
246
- api.post(endpoint, data, params)
246
+ api.post(endpoint, data, params, api_version=1)
247
247
 
248
248
 
249
249
  def status_update(
@@ -306,4 +306,4 @@ def status_update(
306
306
  "begin": (begin.isoformat() if begin else None),
307
307
  "end": (end.isoformat() if end else None),
308
308
  }
309
- api.post(endpoint, None, params)
309
+ api.post(endpoint, None, params, api_version=1)
@@ -3,7 +3,7 @@ name = "cwms-python"
3
3
  repository = "https://github.com/HydrologicEngineeringCenter/cwms-python"
4
4
 
5
5
  # Managed by Release Please; runtime versions come from package metadata.
6
- version = "1.0.9"
6
+ version = "1.0.10"
7
7
 
8
8
  packages = [
9
9
  { include = "cwms" },
@@ -28,6 +28,11 @@ requests = [
28
28
  {version = "^2.32.4", python = ">=3.9,<3.10"},
29
29
  {version = "^2.33.0", python = ">=3.10"},
30
30
  ]
31
+ # Keep the Python 3.9 fallback while requiring patched releases on newer Python.
32
+ urllib3 = [
33
+ {version = ">=2.6.3,<2.7", python = ">=3.9,<3.10"},
34
+ {version = "^2.7.0", python = ">=3.10"},
35
+ ]
31
36
 
32
37
  [tool.poetry.group.dev.dependencies]
33
38
  black = [
@@ -46,6 +51,10 @@ pytest-cov = "^4.1.0"
46
51
  pandas-stubs = "^2.2.1.240316"
47
52
  types-requests = "^2.31.0.20240311"
48
53
  yamlfix = "^1.16.0"
54
+ setuptools = [
55
+ {version = ">=82.0.1,<83", python = ">=3.9,<3.10"},
56
+ {version = ">=83.0.0", python = ">=3.10"},
57
+ ]
49
58
 
50
59
  [build-system]
51
60
  requires = ["poetry-core"]
File without changes
File without changes
File without changes