ras-commander 0.59.0__tar.gz → 0.61.0__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 (40) hide show
  1. {ras_commander-0.59.0/ras_commander.egg-info → ras_commander-0.61.0}/PKG-INFO +41 -8
  2. {ras_commander-0.59.0 → ras_commander-0.61.0}/README.md +40 -7
  3. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/Decorators.py +13 -7
  4. {ras_commander-0.59.0 → ras_commander-0.61.0/ras_commander.egg-info}/PKG-INFO +41 -8
  5. {ras_commander-0.59.0 → ras_commander-0.61.0}/setup.py +1 -1
  6. {ras_commander-0.59.0 → ras_commander-0.61.0}/LICENSE +0 -0
  7. {ras_commander-0.59.0 → ras_commander-0.61.0}/pyproject.toml +0 -0
  8. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfBase.py +0 -0
  9. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfBndry.py +0 -0
  10. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfFluvialPluvial.py +0 -0
  11. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfInfiltration.py +0 -0
  12. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfMesh.py +0 -0
  13. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfPipe.py +0 -0
  14. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfPlan.py +0 -0
  15. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfPlot.py +0 -0
  16. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfPump.py +0 -0
  17. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfResultsMesh.py +0 -0
  18. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfResultsPlan.py +0 -0
  19. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfResultsPlot.py +0 -0
  20. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfResultsXsec.py +0 -0
  21. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfStruc.py +0 -0
  22. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfUtils.py +0 -0
  23. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/HdfXsec.py +0 -0
  24. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/LoggingConfig.py +0 -0
  25. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasCmdr.py +0 -0
  26. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasExamples.py +0 -0
  27. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasGeo.py +0 -0
  28. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasGpt.py +0 -0
  29. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasMapper.py +0 -0
  30. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasPlan.py +0 -0
  31. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasPrj.py +0 -0
  32. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasToGo.py +0 -0
  33. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasUnsteady.py +0 -0
  34. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/RasUtils.py +0 -0
  35. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander/__init__.py +0 -0
  36. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander.egg-info/SOURCES.txt +0 -0
  37. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander.egg-info/dependency_links.txt +0 -0
  38. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander.egg-info/requires.txt +0 -0
  39. {ras_commander-0.59.0 → ras_commander-0.61.0}/ras_commander.egg-info/top_level.txt +0 -0
  40. {ras_commander-0.59.0 → ras_commander-0.61.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ras-commander
3
- Version: 0.59.0
3
+ Version: 0.61.0
4
4
  Summary: A Python library for automating HEC-RAS 6.x operations
5
5
  Home-page: https://github.com/gpt-cmdr/ras-commander
6
6
  Author: William M. Katzenmeyer, P.E., C.F.M.
@@ -119,11 +119,43 @@ It is highly suggested to fork this repository before going this route, and usin
119
119
  from ras_commander import init_ras_project, RasCmdr, RasPlan
120
120
  ```
121
121
 
122
- ### Initialize a project
122
+ ### Initialize a project (single project)
123
123
  ```
124
124
  init_ras_project(r"/path/to/project", "6.5")
125
125
  ```
126
126
 
127
+ ### Initialize a project (multiple projects)
128
+ ```
129
+ your_ras_project = RasPrj()
130
+ init_ras_project(r"/path/to/project", "6.5", ras_object=your_ras_project)
131
+ ```
132
+
133
+ ## Accessing Plan, Unsteady and Boundary Conditions Dataframes
134
+ Using the default 'ras" object, othewise substitute your_ras_project for muli-project scripts
135
+ ```
136
+ print("\nPlan Files DataFrame:")
137
+ ras.plan_df
138
+
139
+ print("\nFlow Files DataFrame:")
140
+ ras.flow_df
141
+
142
+ print("\nUnsteady Flow Files DataFrame:")
143
+ ras.unsteady_df
144
+
145
+ print("\nGeometry Files DataFrame:")
146
+ ras.geom_df
147
+
148
+ print("\nHDF Entries DataFrame:")
149
+ ras.get_hdf_entries()
150
+
151
+ print("\nBoundary Conditions DataFrame:")
152
+ ras.boundaries_df
153
+
154
+ ```
155
+
156
+
157
+
158
+
127
159
  ### Execute a single plan
128
160
  ```
129
161
  RasCmdr.compute_plan("01", dest_folder=r"/path/to/results", overwrite_dest=True)
@@ -185,8 +217,10 @@ RAS Commander allows working with multiple HEC-RAS projects simultaneously:
185
217
 
186
218
  ```python
187
219
  # Initialize multiple projects
188
- project1 = init_ras_project(path1, "6.6")
189
- project2 = init_ras_project(path2, "6.6")
220
+ project1 = RasPrj()
221
+ init_ras_project(path1, "6.6", ras_object=project1)
222
+ project2 = RasPrj()
223
+ init_ras_project(path2, "6.6", ras_object=project2)
190
224
 
191
225
  # Perform operations on each project
192
226
  RasCmdr.compute_plan("01", ras_object=project1, dest_folder=folder1)
@@ -202,7 +236,7 @@ print(f"Project 2: {project2.project_name}")
202
236
 
203
237
  This is useful for comparing different river systems, running scenario analyses across multiple watersheds, or managing a suite of related models.
204
238
 
205
- #### Key Components
239
+ #### Core HEC-RAS Automation Classes
206
240
 
207
241
  - `RasPrj`: Manages HEC-RAS projects, handling initialization and data loading
208
242
  - `RasCmdr`: Handles execution of HEC-RAS simulations
@@ -212,7 +246,7 @@ This is useful for comparing different river systems, running scenario analyses
212
246
  - `RasUtils`: Contains utility functions for file operations and data management
213
247
  - `RasExamples`: Manages and loads HEC-RAS example projects
214
248
 
215
- #### New Components:
249
+ #### HDF Data Access Classes
216
250
  - `HdfBase`: Core functionality for HDF file operations
217
251
  - `HdfBndry`: Enhanced boundary condition handling
218
252
  - `HdfMesh`: Comprehensive mesh data management
@@ -224,8 +258,7 @@ This is useful for comparing different river systems, running scenario analyses
224
258
  - `HdfPipe`: Pipe network analysis tools
225
259
  - `HdfPump`: Pump station analysis capabilities
226
260
  - `HdfFluvialPluvial`: Fluvial-pluvial boundary analysis
227
- - `RasMapper`: RASMapper interface
228
- - `RasToGo`: Go-Consequences integration
261
+ - `RasMapper`: RASMapper Functions
229
262
  - `HdfPlot` & `HdfResultsPlot`: Specialized plotting utilities
230
263
 
231
264
  ### Project Organization Diagram
@@ -87,11 +87,43 @@ It is highly suggested to fork this repository before going this route, and usin
87
87
  from ras_commander import init_ras_project, RasCmdr, RasPlan
88
88
  ```
89
89
 
90
- ### Initialize a project
90
+ ### Initialize a project (single project)
91
91
  ```
92
92
  init_ras_project(r"/path/to/project", "6.5")
93
93
  ```
94
94
 
95
+ ### Initialize a project (multiple projects)
96
+ ```
97
+ your_ras_project = RasPrj()
98
+ init_ras_project(r"/path/to/project", "6.5", ras_object=your_ras_project)
99
+ ```
100
+
101
+ ## Accessing Plan, Unsteady and Boundary Conditions Dataframes
102
+ Using the default 'ras" object, othewise substitute your_ras_project for muli-project scripts
103
+ ```
104
+ print("\nPlan Files DataFrame:")
105
+ ras.plan_df
106
+
107
+ print("\nFlow Files DataFrame:")
108
+ ras.flow_df
109
+
110
+ print("\nUnsteady Flow Files DataFrame:")
111
+ ras.unsteady_df
112
+
113
+ print("\nGeometry Files DataFrame:")
114
+ ras.geom_df
115
+
116
+ print("\nHDF Entries DataFrame:")
117
+ ras.get_hdf_entries()
118
+
119
+ print("\nBoundary Conditions DataFrame:")
120
+ ras.boundaries_df
121
+
122
+ ```
123
+
124
+
125
+
126
+
95
127
  ### Execute a single plan
96
128
  ```
97
129
  RasCmdr.compute_plan("01", dest_folder=r"/path/to/results", overwrite_dest=True)
@@ -153,8 +185,10 @@ RAS Commander allows working with multiple HEC-RAS projects simultaneously:
153
185
 
154
186
  ```python
155
187
  # Initialize multiple projects
156
- project1 = init_ras_project(path1, "6.6")
157
- project2 = init_ras_project(path2, "6.6")
188
+ project1 = RasPrj()
189
+ init_ras_project(path1, "6.6", ras_object=project1)
190
+ project2 = RasPrj()
191
+ init_ras_project(path2, "6.6", ras_object=project2)
158
192
 
159
193
  # Perform operations on each project
160
194
  RasCmdr.compute_plan("01", ras_object=project1, dest_folder=folder1)
@@ -170,7 +204,7 @@ print(f"Project 2: {project2.project_name}")
170
204
 
171
205
  This is useful for comparing different river systems, running scenario analyses across multiple watersheds, or managing a suite of related models.
172
206
 
173
- #### Key Components
207
+ #### Core HEC-RAS Automation Classes
174
208
 
175
209
  - `RasPrj`: Manages HEC-RAS projects, handling initialization and data loading
176
210
  - `RasCmdr`: Handles execution of HEC-RAS simulations
@@ -180,7 +214,7 @@ This is useful for comparing different river systems, running scenario analyses
180
214
  - `RasUtils`: Contains utility functions for file operations and data management
181
215
  - `RasExamples`: Manages and loads HEC-RAS example projects
182
216
 
183
- #### New Components:
217
+ #### HDF Data Access Classes
184
218
  - `HdfBase`: Core functionality for HDF file operations
185
219
  - `HdfBndry`: Enhanced boundary condition handling
186
220
  - `HdfMesh`: Comprehensive mesh data management
@@ -192,8 +226,7 @@ This is useful for comparing different river systems, running scenario analyses
192
226
  - `HdfPipe`: Pipe network analysis tools
193
227
  - `HdfPump`: Pump station analysis capabilities
194
228
  - `HdfFluvialPluvial`: Fluvial-pluvial boundary analysis
195
- - `RasMapper`: RASMapper interface
196
- - `RasToGo`: Go-Consequences integration
229
+ - `RasMapper`: RASMapper Functions
197
230
  - `HdfPlot` & `HdfResultsPlot`: Specialized plotting utilities
198
231
 
199
232
  ### Project Organization Diagram
@@ -85,20 +85,24 @@ def standardize_input(file_type: str = 'plan_hdf'):
85
85
  if Path(hdf_input).is_file():
86
86
  hdf_path = Path(hdf_input)
87
87
  # Check if it's a number (with or without 'p' prefix)
88
- elif hdf_input.isdigit() or (len(hdf_input) == 3 and hdf_input[0] == 'p' and hdf_input[1:].isdigit()):
88
+ elif hdf_input.isdigit() or (len(hdf_input) > 1 and hdf_input[0] == 'p' and hdf_input[1:].isdigit()):
89
89
  try:
90
90
  ras_obj.check_initialized()
91
91
  except Exception as e:
92
92
  raise ValueError(f"RAS object is not initialized: {str(e)}")
93
93
 
94
- number = hdf_input if hdf_input.isdigit() else hdf_input[1:]
94
+ # Extract the numeric part and convert to integer for comparison
95
+ number_str = hdf_input if hdf_input.isdigit() else hdf_input[1:]
96
+ number_int = int(number_str)
95
97
 
96
98
  if file_type == 'plan_hdf':
97
- plan_info = ras_obj.plan_df[ras_obj.plan_df['plan_number'] == number]
99
+ # Convert plan_number column to integers for comparison
100
+ plan_info = ras_obj.plan_df[ras_obj.plan_df['plan_number'].astype(int) == number_int]
98
101
  if not plan_info.empty:
99
102
  hdf_path = Path(plan_info.iloc[0]['HDF_Results_Path'])
100
103
  elif file_type == 'geom_hdf':
101
- geom_info = ras_obj.geom_df[ras_obj.geom_df['geom_number'] == number]
104
+ # Convert geom_number column to integers for comparison
105
+ geom_info = ras_obj.geom_df[ras_obj.geom_df['geom_number'].astype(int) == number_int]
102
106
  if not geom_info.empty:
103
107
  hdf_path = Path(geom_info.iloc[0]['HDF_Path'])
104
108
  else:
@@ -110,14 +114,16 @@ def standardize_input(file_type: str = 'plan_hdf'):
110
114
  except Exception as e:
111
115
  raise ValueError(f"RAS object is not initialized: {str(e)}")
112
116
 
113
- number = f"{hdf_input:02d}"
117
+ number_int = hdf_input
114
118
 
115
119
  if file_type == 'plan_hdf':
116
- plan_info = ras_obj.plan_df[ras_obj.plan_df['plan_number'] == number]
120
+ # Convert plan_number column to integers for comparison
121
+ plan_info = ras_obj.plan_df[ras_obj.plan_df['plan_number'].astype(int) == number_int]
117
122
  if not plan_info.empty:
118
123
  hdf_path = Path(plan_info.iloc[0]['HDF_Results_Path'])
119
124
  elif file_type == 'geom_hdf':
120
- geom_info = ras_obj.geom_df[ras_obj.geom_df['geom_number'] == number]
125
+ # Convert geom_number column to integers for comparison
126
+ geom_info = ras_obj.geom_df[ras_obj.geom_df['geom_number'].astype(int) == number_int]
121
127
  if not geom_info.empty:
122
128
  hdf_path = Path(geom_info.iloc[0]['HDF_Path'])
123
129
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ras-commander
3
- Version: 0.59.0
3
+ Version: 0.61.0
4
4
  Summary: A Python library for automating HEC-RAS 6.x operations
5
5
  Home-page: https://github.com/gpt-cmdr/ras-commander
6
6
  Author: William M. Katzenmeyer, P.E., C.F.M.
@@ -119,11 +119,43 @@ It is highly suggested to fork this repository before going this route, and usin
119
119
  from ras_commander import init_ras_project, RasCmdr, RasPlan
120
120
  ```
121
121
 
122
- ### Initialize a project
122
+ ### Initialize a project (single project)
123
123
  ```
124
124
  init_ras_project(r"/path/to/project", "6.5")
125
125
  ```
126
126
 
127
+ ### Initialize a project (multiple projects)
128
+ ```
129
+ your_ras_project = RasPrj()
130
+ init_ras_project(r"/path/to/project", "6.5", ras_object=your_ras_project)
131
+ ```
132
+
133
+ ## Accessing Plan, Unsteady and Boundary Conditions Dataframes
134
+ Using the default 'ras" object, othewise substitute your_ras_project for muli-project scripts
135
+ ```
136
+ print("\nPlan Files DataFrame:")
137
+ ras.plan_df
138
+
139
+ print("\nFlow Files DataFrame:")
140
+ ras.flow_df
141
+
142
+ print("\nUnsteady Flow Files DataFrame:")
143
+ ras.unsteady_df
144
+
145
+ print("\nGeometry Files DataFrame:")
146
+ ras.geom_df
147
+
148
+ print("\nHDF Entries DataFrame:")
149
+ ras.get_hdf_entries()
150
+
151
+ print("\nBoundary Conditions DataFrame:")
152
+ ras.boundaries_df
153
+
154
+ ```
155
+
156
+
157
+
158
+
127
159
  ### Execute a single plan
128
160
  ```
129
161
  RasCmdr.compute_plan("01", dest_folder=r"/path/to/results", overwrite_dest=True)
@@ -185,8 +217,10 @@ RAS Commander allows working with multiple HEC-RAS projects simultaneously:
185
217
 
186
218
  ```python
187
219
  # Initialize multiple projects
188
- project1 = init_ras_project(path1, "6.6")
189
- project2 = init_ras_project(path2, "6.6")
220
+ project1 = RasPrj()
221
+ init_ras_project(path1, "6.6", ras_object=project1)
222
+ project2 = RasPrj()
223
+ init_ras_project(path2, "6.6", ras_object=project2)
190
224
 
191
225
  # Perform operations on each project
192
226
  RasCmdr.compute_plan("01", ras_object=project1, dest_folder=folder1)
@@ -202,7 +236,7 @@ print(f"Project 2: {project2.project_name}")
202
236
 
203
237
  This is useful for comparing different river systems, running scenario analyses across multiple watersheds, or managing a suite of related models.
204
238
 
205
- #### Key Components
239
+ #### Core HEC-RAS Automation Classes
206
240
 
207
241
  - `RasPrj`: Manages HEC-RAS projects, handling initialization and data loading
208
242
  - `RasCmdr`: Handles execution of HEC-RAS simulations
@@ -212,7 +246,7 @@ This is useful for comparing different river systems, running scenario analyses
212
246
  - `RasUtils`: Contains utility functions for file operations and data management
213
247
  - `RasExamples`: Manages and loads HEC-RAS example projects
214
248
 
215
- #### New Components:
249
+ #### HDF Data Access Classes
216
250
  - `HdfBase`: Core functionality for HDF file operations
217
251
  - `HdfBndry`: Enhanced boundary condition handling
218
252
  - `HdfMesh`: Comprehensive mesh data management
@@ -224,8 +258,7 @@ This is useful for comparing different river systems, running scenario analyses
224
258
  - `HdfPipe`: Pipe network analysis tools
225
259
  - `HdfPump`: Pump station analysis capabilities
226
260
  - `HdfFluvialPluvial`: Fluvial-pluvial boundary analysis
227
- - `RasMapper`: RASMapper interface
228
- - `RasToGo`: Go-Consequences integration
261
+ - `RasMapper`: RASMapper Functions
229
262
  - `HdfPlot` & `HdfResultsPlot`: Specialized plotting utilities
230
263
 
231
264
  ### Project Organization Diagram
@@ -28,7 +28,7 @@ class CustomBuildPy(build_py):
28
28
 
29
29
  setup(
30
30
  name="ras-commander",
31
- version="0.59.0",
31
+ version="0.61.0",
32
32
  packages=find_packages(),
33
33
  include_package_data=True,
34
34
  python_requires='>=3.10',
File without changes
File without changes