ras-commander 0.58.0__tar.gz → 0.59.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.58.0/ras_commander.egg-info → ras_commander-0.59.0}/PKG-INFO +101 -47
  2. {ras_commander-0.58.0 → ras_commander-0.59.0}/README.md +101 -47
  3. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasPrj.py +14 -5
  4. {ras_commander-0.58.0 → ras_commander-0.59.0/ras_commander.egg-info}/PKG-INFO +101 -47
  5. {ras_commander-0.58.0 → ras_commander-0.59.0}/setup.py +1 -1
  6. {ras_commander-0.58.0 → ras_commander-0.59.0}/LICENSE +0 -0
  7. {ras_commander-0.58.0 → ras_commander-0.59.0}/pyproject.toml +0 -0
  8. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/Decorators.py +0 -0
  9. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfBase.py +0 -0
  10. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfBndry.py +0 -0
  11. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfFluvialPluvial.py +0 -0
  12. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfInfiltration.py +0 -0
  13. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfMesh.py +0 -0
  14. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfPipe.py +0 -0
  15. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfPlan.py +0 -0
  16. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfPlot.py +0 -0
  17. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfPump.py +0 -0
  18. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfResultsMesh.py +0 -0
  19. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfResultsPlan.py +0 -0
  20. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfResultsPlot.py +0 -0
  21. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfResultsXsec.py +0 -0
  22. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfStruc.py +0 -0
  23. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfUtils.py +0 -0
  24. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/HdfXsec.py +0 -0
  25. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/LoggingConfig.py +0 -0
  26. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasCmdr.py +0 -0
  27. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasExamples.py +0 -0
  28. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasGeo.py +0 -0
  29. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasGpt.py +0 -0
  30. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasMapper.py +0 -0
  31. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasPlan.py +0 -0
  32. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasToGo.py +0 -0
  33. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasUnsteady.py +0 -0
  34. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/RasUtils.py +0 -0
  35. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander/__init__.py +0 -0
  36. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander.egg-info/SOURCES.txt +0 -0
  37. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander.egg-info/dependency_links.txt +0 -0
  38. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander.egg-info/requires.txt +0 -0
  39. {ras_commander-0.58.0 → ras_commander-0.59.0}/ras_commander.egg-info/top_level.txt +0 -0
  40. {ras_commander-0.58.0 → ras_commander-0.59.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ras-commander
3
- Version: 0.58.0
3
+ Version: 0.59.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.
@@ -43,12 +43,11 @@ This repository has several methods of interaction with Large Language Models an
43
43
 
44
44
  1. **[RAS Commander Library Assistant GPT](https://chatgpt.com/g/g-TZRPR3oAO-ras-commander-library-assistant)**: A specialized GPT model with access to the ras-commander codebase and library, available for answering queries and providing code suggestions. You can even upload your own plan, unsteady and HDF files to inspect and help determine how to automate your workflows or visualize your results, although this ability is still limited by OpenAI's GPT frameworks and may not be useful for long conversations.
45
45
 
46
- 2. **[Purpose-Built Knowledge Base Summaries](https://github.com/billk-FM/ras-commander/tree/main/ai_tools/assistant_knowledge_bases)**: Up-to-date compilations of the documentation and codebase for use with large language models like Claude or GPT-4. Look in 'ai_tools/assistant_knowledge_bases/' in the repo. The repo's codebase (without documentation and examples) has been curated to stay within the current ~200k context window limitations of frontier models, and for tasks that do not need an understanding of the underlying code, the Comprehensive Library Guide and any relevant examples from the example folder should be adequate context for leveraging the ras-commander API to complete tasks.
46
+ 2. **[Purpose-Built Knowledge Base Summaries](https://github.com/gpt-cmdr/ras-commander/tree/main/ai_tools/assistant_knowledge_bases)**: Up-to-date compilations of the documentation and codebase for use with large language models like Claude or GPT-4. Look in 'ai_tools/assistant_knowledge_bases/' in the repo. The repo's codebase (without documentation and examples) has been curated to stay within the current ~200k context window limitations of frontier models, and for tasks that do not need an understanding of the underlying code, the Comprehensive Library Guide and any relevant examples from the example folder should be adequate context for leveraging the ras-commander API to complete tasks.
47
47
 
48
- 3. **[Cursor IDE Integration](https://github.com/billk-FM/ras-commander/blob/main/.cursorrules)**: Custom rules(.cursorrules) for the Cursor IDE to provide context-aware suggestions and documentation. Just open the repository folder in Cursor to recognize these instructions. You can create your own folders "/workspace/, "/projects/", or "my_projects/" as these are already in the .gitignore, and place your custom scripts there for your projects. This will allow easy referencing of the ras-commander documents and individual repo files, the automatic loading of the .cursorrules file. Alternatvely, download the github repo into your projects folder to easily load documents and use cursor rules files.
49
-
50
- 5. **[RAS-Commander Library Assistant](https://github.com/billk-FM/ras-commander/blob/main/library_assistant)**: A full-featured interface for multi-turn conversations, using your own API keys and the ras-commander library for context. The library assistant allows you to load your own scripts and chat with specific examples and/or function classes in the RAS-Commander library to effectively utilize the library's functions in your workflow. To reduce hallucinations, a file browser is included which adds full files to the conversation to ensure grounded responses. A dashboard shows you the total context and estimated cost of each request. **Now with support for OpenAI's o1 and o3-mini, and Deepseek V3 and R1 models using US-based Together.ai**
48
+ 3. **[Cursor IDE Integration](https://github.com/gpt-cmdr/ras-commander/blob/main/.cursorrules)**: Custom rules(.cursorrules) for the Cursor IDE to provide context-aware suggestions and documentation. Just open the repository folder in Cursor to recognize these instructions. You can create your own folders "/workspace/, "/projects/", or "my_projects/" as these are already in the .gitignore, and place your custom scripts there for your projects. This will allow easy referencing of the ras-commander documents and individual repo files, the automatic loading of the .cursorrules file. Alternatvely, download the github repo into your projects folder to easily load documents and use cursor rules files.
51
49
 
50
+ 5. **[RAS-Commander Library Assistant](https://github.com/gpt-cmdr/ras-commander/blob/main/library_assistant)**: A full-featured interface for multi-turn conversations, using your own API keys and the ras-commander library for context. The library assistant allows you to load your own scripts and chat with specific examples and/or function classes in the RAS-Commander library to effectively utilize the library's functions in your workflow. To reduce hallucinations, a file browser is included which adds full files to the conversation to ensure grounded responses. A dashboard shows you the total context and estimated cost of each request. **Now with support for OpenAI's o1 and o3-mini, and Deepseek V3 and R1 models using US-based Together.ai**
52
51
 
53
52
  ## Background
54
53
  The ras-commander library emerged from the initial test-bed of AI-driven coding represented by the HEC-Commander tools Python notebooks. These notebooks served as a proof of concept, demonstrating the value proposition of automating HEC-RAS operations. The transition from notebooks to a structured library aims to provide a more robust, maintainable, and extensible solution for water resources engineers.
@@ -65,8 +64,6 @@ HEC-RAS Project Management & Execution
65
64
  - Progress tracking and logging
66
65
  - Execution error handling and recovery
67
66
 
68
-
69
-
70
67
  HDF Data Access & Analysis
71
68
  - 2D mesh results processing (depths, velocities, WSE)
72
69
  - Cross-section data extraction
@@ -76,7 +73,6 @@ HDF Data Access & Analysis
76
73
  - Fluvial-pluvial boundary calculations
77
74
  - Infiltration and precipitation data handling
78
75
 
79
-
80
76
  RAS ASCII File Operations
81
77
  - Plan file creation and modification
82
78
  - Geometry file parsing examples
@@ -93,7 +89,6 @@ First, create a virtual environment with conda or venv (ask ChatGPT if you need
93
89
 
94
90
  In your virtual environment, install ras-commander using pip:
95
91
  ```
96
- pip install h5py numpy pandas requests tqdm scipy xarray geopandas matplotlib ipython tqdm psutil shapely fiona pathlib rtree rasterstats
97
92
  pip install --upgrade ras-commander
98
93
  ```
99
94
  If you have dependency issues with pip (especially if you have errors with numpy), try clearing your local pip packages 'C:\Users\your_username\AppData\Roaming\Python\' and then creating a new virtual environment.
@@ -118,10 +113,6 @@ except ImportError:
118
113
  ```
119
114
  It is highly suggested to fork this repository before going this route, and using Git to manage your changes! This allows any revisions to the ras-commander classes and functions to be actively edited and developed by end users. The folders "/workspace/, "/projects/", or "my_projects/" are included in the .gitignore, so users can place you custom scripts there for any project data they don't want to be tracked by git.
120
115
 
121
-
122
-
123
-
124
-
125
116
  ## Quick Start Guide
126
117
 
127
118
  ```
@@ -141,9 +132,9 @@ RasCmdr.compute_plan("01", dest_folder=r"/path/to/results", overwrite_dest=True)
141
132
  ### Execute plans in parallel
142
133
  ```
143
134
  results = RasCmdr.compute_parallel(
144
- plan_numbers=["01", "02"],
135
+ plan_number=["01", "02"],
145
136
  max_workers=2,
146
- cores_per_run=2,
137
+ num_cores=2,
147
138
  dest_folder=r"/path/to/results",
148
139
  overwrite_dest=True
149
140
  )
@@ -154,6 +145,63 @@ results = RasCmdr.compute_parallel(
154
145
  RasPlan.set_geom("01", "02")
155
146
  ```
156
147
 
148
+ ### Execution Modes
149
+
150
+ RAS Commander provides three methods for executing HEC-RAS plans:
151
+
152
+ #### Single Plan Execution
153
+ ```python
154
+ # Execute a single plan
155
+ success = RasCmdr.compute_plan("01", dest_folder=r"/path/to/results")
156
+ print(f"Plan execution {'successful' if success else 'failed'}")
157
+ ```
158
+
159
+ #### Sequential Execution of Multiple Plans
160
+ ```python
161
+ # Execute multiple plans in sequence in a test folder
162
+ results = RasCmdr.compute_test_mode(
163
+ plan_number=["01", "02", "03"],
164
+ dest_folder_suffix="[Test]"
165
+ )
166
+ for plan, success in results.items():
167
+ print(f"Plan {plan}: {'Successful' if success else 'Failed'}")
168
+ ```
169
+
170
+ #### Parallel Execution of Multiple Plans
171
+ ```python
172
+ # Execute multiple plans concurrently
173
+ results = RasCmdr.compute_parallel(
174
+ plan_number=["01", "02", "03"],
175
+ max_workers=3,
176
+ num_cores=2
177
+ )
178
+ for plan, success in results.items():
179
+ print(f"Plan {plan}: {'Successful' if success else 'Failed'}")
180
+ ```
181
+
182
+ ### Working with Multiple Projects
183
+
184
+ RAS Commander allows working with multiple HEC-RAS projects simultaneously:
185
+
186
+ ```python
187
+ # Initialize multiple projects
188
+ project1 = init_ras_project(path1, "6.6")
189
+ project2 = init_ras_project(path2, "6.6")
190
+
191
+ # Perform operations on each project
192
+ RasCmdr.compute_plan("01", ras_object=project1, dest_folder=folder1)
193
+ RasCmdr.compute_plan("01", ras_object=project2, dest_folder=folder2)
194
+
195
+ # Compare results between projects
196
+ print(f"Project 1: {project1.project_name}")
197
+ print(f"Project 2: {project2.project_name}")
198
+
199
+ # Always specify the ras_object parameter when working with multiple projects
200
+ # to avoid confusion with the global 'ras' object
201
+ ```
202
+
203
+ This is useful for comparing different river systems, running scenario analyses across multiple watersheds, or managing a suite of related models.
204
+
157
205
  #### Key Components
158
206
 
159
207
  - `RasPrj`: Manages HEC-RAS projects, handling initialization and data loading
@@ -182,8 +230,6 @@ RasPlan.set_geom("01", "02")
182
230
 
183
231
  ### Project Organization Diagram
184
232
 
185
- ### Project Organization Diagram
186
-
187
233
  ```
188
234
  ras_commander
189
235
  ├── ras_commander
@@ -214,24 +260,16 @@ ras_commander
214
260
  │ ├── HdfPlot.py
215
261
  │ └── HdfResultsPlot.py
216
262
  ├── examples
217
- │ ├── 01_project_initialization.py
218
- │ ├── 02_plan_operations.py
219
- │ ├── 03_geometry_operations.py
220
- │ ├── 04_unsteady_flow_operations.py
221
- │ ├── 05_utility_functions.py
222
- │ ├── 06_single_plan_execution.py
223
- │ ├── 07_sequential_plan_execution.py
224
- │ ├── 08_parallel_execution.py
225
- │ ├── 09_specifying_plans.py
226
- │ ├── 10_arguments_for_compute.py
227
- │ ├── 11_Using_RasExamples.ipynb
228
- │ ├── 12_plan_set_execution.py
229
- │ ├── 13_multiple_project_operations.py
230
- │ ├── 14_Core_Sensitivity.ipynb
231
- │ ├── 15_plan_key_operations.py
232
- │ ├── 16_scanning_ras_project_info.py
233
- │ ├── 17_parallel_execution_ble.py
234
- │ └── HEC_RAS_2D_HDF_Analysis.ipynb
263
+ │ ├── 00_Using_RasExamples.ipynb
264
+ │ ├── 01_project_initialization.ipynb
265
+ │ ├── 02_plan_and_geometry_operations.ipynb
266
+ │ ├── 03_unsteady_flow_operations.ipynb
267
+ │ ├── 04_multiple_project_operations.ipynb
268
+ │ ├── 05_single_plan_execution.ipynb
269
+ │ ├── 06_executing_plan_sets.ipynb
270
+ │ ├── 07_sequential_plan_execution.ipynb
271
+ │ ├── 08_parallel_execution.ipynb
272
+ │ └── 09_plan_parameter_operations.ipynb
235
273
  ├── tests
236
274
  │ └── ... (test files)
237
275
  ├── .gitignore
@@ -311,7 +349,6 @@ print(runtime_data)
311
349
  ```
312
350
  This class simplifies the process of extracting and analyzing data from HEC-RAS HDF output files, supporting tasks such as post-processing and result visualization.
313
351
 
314
-
315
352
  #### Infrastructure Analysis
316
353
  ```python
317
354
  from ras_commander import HdfPipe, HdfPump
@@ -348,13 +385,33 @@ boundary = HdfFluvialPluvial.calculate_fluvial_pluvial_boundary(
348
385
  )
349
386
  ```
350
387
 
351
- ## Documentation
388
+ ## Examples
352
389
 
353
- For detailed usage instructions and API documentation, please refer to the [Comprehensive Library Guide](Comprehensive_Library_Guide.md).
390
+ Check out the examples in the repository to learn how to use RAS Commander:
354
391
 
355
- ## Examples
392
+ ### Project Setup
393
+ - `00_Using_RasExamples.ipynb`: Download and extract HEC-RAS example projects
394
+ - `01_project_initialization.ipynb`: Initialize HEC-RAS projects and explore their components
395
+
396
+ ### File Operations
397
+ - `02_plan_and_geometry_operations.ipynb`: Clone and modify plan and geometry files
398
+ - `03_unsteady_flow_operations.ipynb`: Extract and modify boundary conditions
399
+ - `09_plan_parameter_operations.ipynb`: Retrieve and update plan parameters
400
+
401
+ ### Execution Modes
402
+ - `05_single_plan_execution.ipynb`: Execute a single plan with specific options
403
+ - `06_executing_plan_sets.ipynb`: Different ways to specify and execute plan sets
404
+ - `07_sequential_plan_execution.ipynb`: Run multiple plans in sequence
405
+ - `08_parallel_execution.ipynb`: Run multiple plans in parallel
356
406
 
357
- Check out the `examples/` directory for sample scripts demonstrating various features of ras-commander.
407
+ ### Advanced Operations
408
+ - `04_multiple_project_operations.ipynb`: Work with multiple HEC-RAS projects simultaneously
409
+
410
+ These examples demonstrate practical applications of RAS Commander for automating HEC-RAS workflows, from basic operations to advanced scenarios.
411
+
412
+ ## Documentation
413
+
414
+ For detailed usage instructions and API documentation, please refer to the [Comprehensive Library Guide](Comprehensive_Library_Guide.md).
358
415
 
359
416
  ## Future Development
360
417
 
@@ -365,10 +422,9 @@ The ras-commander library is an ongoing project. Future plans include:
365
422
 
366
423
  ## Related Resources
367
424
 
368
- - [HEC-Commander Blog](https://github.com/billk-FM/HEC-Commander/tree/main/Blog)
425
+ - [HEC-Commander Blog](https://github.com/gpt-cmdr/HEC-Commander/tree/main/Blog)
369
426
  - [GPT-Commander YouTube Channel](https://www.youtube.com/@GPT_Commander)
370
- - [ChatGPT Examples for Water Resources Engineers](https://github.com/billk-FM/HEC-Commander/tree/main/ChatGPT%20Examples)
371
-
427
+ - [ChatGPT Examples for Water Resources Engineers](https://github.com/gpt-cmdr/HEC-Commander/tree/main/ChatGPT%20Examples)
372
428
 
373
429
  ## Contributing
374
430
 
@@ -405,8 +461,7 @@ These acknowledgments recognize the contributions and inspirations that have hel
405
461
 
406
462
  4. Chris Goodell, "Breaking the HEC-RAS Code" - Studied and used as a reference for understanding the inner workings of HEC-RAS, providing valuable insights into the software's functionality and structure.
407
463
 
408
- 5. [HEC-Commander Tools](https://github.com/billk-FM/HEC-Commander) - Inspiration and initial code base for the development of RAS Commander.
409
-
464
+ 5. [HEC-Commander Tools](https://github.com/gpt-cmdr/HEC-Commander) - Inspiration and initial code base for the development of RAS Commander.
410
465
 
411
466
  ## Official RAS Commander AI-Generated Songs:
412
467
 
@@ -416,14 +471,13 @@ These acknowledgments recognize the contributions and inspirations that have hel
416
471
 
417
472
  ## Other Resources
418
473
 
419
- Notebook version of RAS-Commander: [RAS-Commander Notebook in the HEC-Commander Tools Repository](https://github.com/billk-FM/HEC-Commander/tree/main/RAS-Commander)
474
+ Notebook version of RAS-Commander: [RAS-Commander Notebook in the HEC-Commander Tools Repository](https://github.com/gpt-cmdr/HEC-Commander/tree/main/RAS-Commander)
420
475
  Youtube Tutorials for HEC-Commander Tools and RAS-Commander: [GPT-Commander on YouTube](https://www.youtube.com/@GPT_Commander/videos)
421
476
 
422
477
  ## LICENSE
423
478
 
424
479
  This software is released under the MIT license.
425
480
 
426
-
427
481
  ## Contact
428
482
 
429
483
  For questions, suggestions, or support, please contact:
@@ -11,12 +11,11 @@ This repository has several methods of interaction with Large Language Models an
11
11
 
12
12
  1. **[RAS Commander Library Assistant GPT](https://chatgpt.com/g/g-TZRPR3oAO-ras-commander-library-assistant)**: A specialized GPT model with access to the ras-commander codebase and library, available for answering queries and providing code suggestions. You can even upload your own plan, unsteady and HDF files to inspect and help determine how to automate your workflows or visualize your results, although this ability is still limited by OpenAI's GPT frameworks and may not be useful for long conversations.
13
13
 
14
- 2. **[Purpose-Built Knowledge Base Summaries](https://github.com/billk-FM/ras-commander/tree/main/ai_tools/assistant_knowledge_bases)**: Up-to-date compilations of the documentation and codebase for use with large language models like Claude or GPT-4. Look in 'ai_tools/assistant_knowledge_bases/' in the repo. The repo's codebase (without documentation and examples) has been curated to stay within the current ~200k context window limitations of frontier models, and for tasks that do not need an understanding of the underlying code, the Comprehensive Library Guide and any relevant examples from the example folder should be adequate context for leveraging the ras-commander API to complete tasks.
14
+ 2. **[Purpose-Built Knowledge Base Summaries](https://github.com/gpt-cmdr/ras-commander/tree/main/ai_tools/assistant_knowledge_bases)**: Up-to-date compilations of the documentation and codebase for use with large language models like Claude or GPT-4. Look in 'ai_tools/assistant_knowledge_bases/' in the repo. The repo's codebase (without documentation and examples) has been curated to stay within the current ~200k context window limitations of frontier models, and for tasks that do not need an understanding of the underlying code, the Comprehensive Library Guide and any relevant examples from the example folder should be adequate context for leveraging the ras-commander API to complete tasks.
15
15
 
16
- 3. **[Cursor IDE Integration](https://github.com/billk-FM/ras-commander/blob/main/.cursorrules)**: Custom rules(.cursorrules) for the Cursor IDE to provide context-aware suggestions and documentation. Just open the repository folder in Cursor to recognize these instructions. You can create your own folders "/workspace/, "/projects/", or "my_projects/" as these are already in the .gitignore, and place your custom scripts there for your projects. This will allow easy referencing of the ras-commander documents and individual repo files, the automatic loading of the .cursorrules file. Alternatvely, download the github repo into your projects folder to easily load documents and use cursor rules files.
17
-
18
- 5. **[RAS-Commander Library Assistant](https://github.com/billk-FM/ras-commander/blob/main/library_assistant)**: A full-featured interface for multi-turn conversations, using your own API keys and the ras-commander library for context. The library assistant allows you to load your own scripts and chat with specific examples and/or function classes in the RAS-Commander library to effectively utilize the library's functions in your workflow. To reduce hallucinations, a file browser is included which adds full files to the conversation to ensure grounded responses. A dashboard shows you the total context and estimated cost of each request. **Now with support for OpenAI's o1 and o3-mini, and Deepseek V3 and R1 models using US-based Together.ai**
16
+ 3. **[Cursor IDE Integration](https://github.com/gpt-cmdr/ras-commander/blob/main/.cursorrules)**: Custom rules(.cursorrules) for the Cursor IDE to provide context-aware suggestions and documentation. Just open the repository folder in Cursor to recognize these instructions. You can create your own folders "/workspace/, "/projects/", or "my_projects/" as these are already in the .gitignore, and place your custom scripts there for your projects. This will allow easy referencing of the ras-commander documents and individual repo files, the automatic loading of the .cursorrules file. Alternatvely, download the github repo into your projects folder to easily load documents and use cursor rules files.
19
17
 
18
+ 5. **[RAS-Commander Library Assistant](https://github.com/gpt-cmdr/ras-commander/blob/main/library_assistant)**: A full-featured interface for multi-turn conversations, using your own API keys and the ras-commander library for context. The library assistant allows you to load your own scripts and chat with specific examples and/or function classes in the RAS-Commander library to effectively utilize the library's functions in your workflow. To reduce hallucinations, a file browser is included which adds full files to the conversation to ensure grounded responses. A dashboard shows you the total context and estimated cost of each request. **Now with support for OpenAI's o1 and o3-mini, and Deepseek V3 and R1 models using US-based Together.ai**
20
19
 
21
20
  ## Background
22
21
  The ras-commander library emerged from the initial test-bed of AI-driven coding represented by the HEC-Commander tools Python notebooks. These notebooks served as a proof of concept, demonstrating the value proposition of automating HEC-RAS operations. The transition from notebooks to a structured library aims to provide a more robust, maintainable, and extensible solution for water resources engineers.
@@ -33,8 +32,6 @@ HEC-RAS Project Management & Execution
33
32
  - Progress tracking and logging
34
33
  - Execution error handling and recovery
35
34
 
36
-
37
-
38
35
  HDF Data Access & Analysis
39
36
  - 2D mesh results processing (depths, velocities, WSE)
40
37
  - Cross-section data extraction
@@ -44,7 +41,6 @@ HDF Data Access & Analysis
44
41
  - Fluvial-pluvial boundary calculations
45
42
  - Infiltration and precipitation data handling
46
43
 
47
-
48
44
  RAS ASCII File Operations
49
45
  - Plan file creation and modification
50
46
  - Geometry file parsing examples
@@ -61,7 +57,6 @@ First, create a virtual environment with conda or venv (ask ChatGPT if you need
61
57
 
62
58
  In your virtual environment, install ras-commander using pip:
63
59
  ```
64
- pip install h5py numpy pandas requests tqdm scipy xarray geopandas matplotlib ipython tqdm psutil shapely fiona pathlib rtree rasterstats
65
60
  pip install --upgrade ras-commander
66
61
  ```
67
62
  If you have dependency issues with pip (especially if you have errors with numpy), try clearing your local pip packages 'C:\Users\your_username\AppData\Roaming\Python\' and then creating a new virtual environment.
@@ -86,10 +81,6 @@ except ImportError:
86
81
  ```
87
82
  It is highly suggested to fork this repository before going this route, and using Git to manage your changes! This allows any revisions to the ras-commander classes and functions to be actively edited and developed by end users. The folders "/workspace/, "/projects/", or "my_projects/" are included in the .gitignore, so users can place you custom scripts there for any project data they don't want to be tracked by git.
88
83
 
89
-
90
-
91
-
92
-
93
84
  ## Quick Start Guide
94
85
 
95
86
  ```
@@ -109,9 +100,9 @@ RasCmdr.compute_plan("01", dest_folder=r"/path/to/results", overwrite_dest=True)
109
100
  ### Execute plans in parallel
110
101
  ```
111
102
  results = RasCmdr.compute_parallel(
112
- plan_numbers=["01", "02"],
103
+ plan_number=["01", "02"],
113
104
  max_workers=2,
114
- cores_per_run=2,
105
+ num_cores=2,
115
106
  dest_folder=r"/path/to/results",
116
107
  overwrite_dest=True
117
108
  )
@@ -122,6 +113,63 @@ results = RasCmdr.compute_parallel(
122
113
  RasPlan.set_geom("01", "02")
123
114
  ```
124
115
 
116
+ ### Execution Modes
117
+
118
+ RAS Commander provides three methods for executing HEC-RAS plans:
119
+
120
+ #### Single Plan Execution
121
+ ```python
122
+ # Execute a single plan
123
+ success = RasCmdr.compute_plan("01", dest_folder=r"/path/to/results")
124
+ print(f"Plan execution {'successful' if success else 'failed'}")
125
+ ```
126
+
127
+ #### Sequential Execution of Multiple Plans
128
+ ```python
129
+ # Execute multiple plans in sequence in a test folder
130
+ results = RasCmdr.compute_test_mode(
131
+ plan_number=["01", "02", "03"],
132
+ dest_folder_suffix="[Test]"
133
+ )
134
+ for plan, success in results.items():
135
+ print(f"Plan {plan}: {'Successful' if success else 'Failed'}")
136
+ ```
137
+
138
+ #### Parallel Execution of Multiple Plans
139
+ ```python
140
+ # Execute multiple plans concurrently
141
+ results = RasCmdr.compute_parallel(
142
+ plan_number=["01", "02", "03"],
143
+ max_workers=3,
144
+ num_cores=2
145
+ )
146
+ for plan, success in results.items():
147
+ print(f"Plan {plan}: {'Successful' if success else 'Failed'}")
148
+ ```
149
+
150
+ ### Working with Multiple Projects
151
+
152
+ RAS Commander allows working with multiple HEC-RAS projects simultaneously:
153
+
154
+ ```python
155
+ # Initialize multiple projects
156
+ project1 = init_ras_project(path1, "6.6")
157
+ project2 = init_ras_project(path2, "6.6")
158
+
159
+ # Perform operations on each project
160
+ RasCmdr.compute_plan("01", ras_object=project1, dest_folder=folder1)
161
+ RasCmdr.compute_plan("01", ras_object=project2, dest_folder=folder2)
162
+
163
+ # Compare results between projects
164
+ print(f"Project 1: {project1.project_name}")
165
+ print(f"Project 2: {project2.project_name}")
166
+
167
+ # Always specify the ras_object parameter when working with multiple projects
168
+ # to avoid confusion with the global 'ras' object
169
+ ```
170
+
171
+ This is useful for comparing different river systems, running scenario analyses across multiple watersheds, or managing a suite of related models.
172
+
125
173
  #### Key Components
126
174
 
127
175
  - `RasPrj`: Manages HEC-RAS projects, handling initialization and data loading
@@ -150,8 +198,6 @@ RasPlan.set_geom("01", "02")
150
198
 
151
199
  ### Project Organization Diagram
152
200
 
153
- ### Project Organization Diagram
154
-
155
201
  ```
156
202
  ras_commander
157
203
  ├── ras_commander
@@ -182,24 +228,16 @@ ras_commander
182
228
  │ ├── HdfPlot.py
183
229
  │ └── HdfResultsPlot.py
184
230
  ├── examples
185
- │ ├── 01_project_initialization.py
186
- │ ├── 02_plan_operations.py
187
- │ ├── 03_geometry_operations.py
188
- │ ├── 04_unsteady_flow_operations.py
189
- │ ├── 05_utility_functions.py
190
- │ ├── 06_single_plan_execution.py
191
- │ ├── 07_sequential_plan_execution.py
192
- │ ├── 08_parallel_execution.py
193
- │ ├── 09_specifying_plans.py
194
- ├── 10_arguments_for_compute.py
195
- │ ├── 11_Using_RasExamples.ipynb
196
- │ ├── 12_plan_set_execution.py
197
- │ ├── 13_multiple_project_operations.py
198
- │ ├── 14_Core_Sensitivity.ipynb
199
- │ ├── 15_plan_key_operations.py
200
- │ ├── 16_scanning_ras_project_info.py
201
- │ ├── 17_parallel_execution_ble.py
202
- │ └── HEC_RAS_2D_HDF_Analysis.ipynb
231
+ │ ├── 00_Using_RasExamples.ipynb
232
+ │ ├── 01_project_initialization.ipynb
233
+ │ ├── 02_plan_and_geometry_operations.ipynb
234
+ │ ├── 03_unsteady_flow_operations.ipynb
235
+ │ ├── 04_multiple_project_operations.ipynb
236
+ │ ├── 05_single_plan_execution.ipynb
237
+ │ ├── 06_executing_plan_sets.ipynb
238
+ │ ├── 07_sequential_plan_execution.ipynb
239
+ │ ├── 08_parallel_execution.ipynb
240
+ └── 09_plan_parameter_operations.ipynb
203
241
  ├── tests
204
242
  │ └── ... (test files)
205
243
  ├── .gitignore
@@ -279,7 +317,6 @@ print(runtime_data)
279
317
  ```
280
318
  This class simplifies the process of extracting and analyzing data from HEC-RAS HDF output files, supporting tasks such as post-processing and result visualization.
281
319
 
282
-
283
320
  #### Infrastructure Analysis
284
321
  ```python
285
322
  from ras_commander import HdfPipe, HdfPump
@@ -316,13 +353,33 @@ boundary = HdfFluvialPluvial.calculate_fluvial_pluvial_boundary(
316
353
  )
317
354
  ```
318
355
 
319
- ## Documentation
356
+ ## Examples
320
357
 
321
- For detailed usage instructions and API documentation, please refer to the [Comprehensive Library Guide](Comprehensive_Library_Guide.md).
358
+ Check out the examples in the repository to learn how to use RAS Commander:
322
359
 
323
- ## Examples
360
+ ### Project Setup
361
+ - `00_Using_RasExamples.ipynb`: Download and extract HEC-RAS example projects
362
+ - `01_project_initialization.ipynb`: Initialize HEC-RAS projects and explore their components
363
+
364
+ ### File Operations
365
+ - `02_plan_and_geometry_operations.ipynb`: Clone and modify plan and geometry files
366
+ - `03_unsteady_flow_operations.ipynb`: Extract and modify boundary conditions
367
+ - `09_plan_parameter_operations.ipynb`: Retrieve and update plan parameters
368
+
369
+ ### Execution Modes
370
+ - `05_single_plan_execution.ipynb`: Execute a single plan with specific options
371
+ - `06_executing_plan_sets.ipynb`: Different ways to specify and execute plan sets
372
+ - `07_sequential_plan_execution.ipynb`: Run multiple plans in sequence
373
+ - `08_parallel_execution.ipynb`: Run multiple plans in parallel
324
374
 
325
- Check out the `examples/` directory for sample scripts demonstrating various features of ras-commander.
375
+ ### Advanced Operations
376
+ - `04_multiple_project_operations.ipynb`: Work with multiple HEC-RAS projects simultaneously
377
+
378
+ These examples demonstrate practical applications of RAS Commander for automating HEC-RAS workflows, from basic operations to advanced scenarios.
379
+
380
+ ## Documentation
381
+
382
+ For detailed usage instructions and API documentation, please refer to the [Comprehensive Library Guide](Comprehensive_Library_Guide.md).
326
383
 
327
384
  ## Future Development
328
385
 
@@ -333,10 +390,9 @@ The ras-commander library is an ongoing project. Future plans include:
333
390
 
334
391
  ## Related Resources
335
392
 
336
- - [HEC-Commander Blog](https://github.com/billk-FM/HEC-Commander/tree/main/Blog)
393
+ - [HEC-Commander Blog](https://github.com/gpt-cmdr/HEC-Commander/tree/main/Blog)
337
394
  - [GPT-Commander YouTube Channel](https://www.youtube.com/@GPT_Commander)
338
- - [ChatGPT Examples for Water Resources Engineers](https://github.com/billk-FM/HEC-Commander/tree/main/ChatGPT%20Examples)
339
-
395
+ - [ChatGPT Examples for Water Resources Engineers](https://github.com/gpt-cmdr/HEC-Commander/tree/main/ChatGPT%20Examples)
340
396
 
341
397
  ## Contributing
342
398
 
@@ -373,8 +429,7 @@ These acknowledgments recognize the contributions and inspirations that have hel
373
429
 
374
430
  4. Chris Goodell, "Breaking the HEC-RAS Code" - Studied and used as a reference for understanding the inner workings of HEC-RAS, providing valuable insights into the software's functionality and structure.
375
431
 
376
- 5. [HEC-Commander Tools](https://github.com/billk-FM/HEC-Commander) - Inspiration and initial code base for the development of RAS Commander.
377
-
432
+ 5. [HEC-Commander Tools](https://github.com/gpt-cmdr/HEC-Commander) - Inspiration and initial code base for the development of RAS Commander.
378
433
 
379
434
  ## Official RAS Commander AI-Generated Songs:
380
435
 
@@ -384,15 +439,14 @@ These acknowledgments recognize the contributions and inspirations that have hel
384
439
 
385
440
  ## Other Resources
386
441
 
387
- Notebook version of RAS-Commander: [RAS-Commander Notebook in the HEC-Commander Tools Repository](https://github.com/billk-FM/HEC-Commander/tree/main/RAS-Commander)
442
+ Notebook version of RAS-Commander: [RAS-Commander Notebook in the HEC-Commander Tools Repository](https://github.com/gpt-cmdr/HEC-Commander/tree/main/RAS-Commander)
388
443
  Youtube Tutorials for HEC-Commander Tools and RAS-Commander: [GPT-Commander on YouTube](https://www.youtube.com/@GPT_Commander/videos)
389
444
 
390
445
  ## LICENSE
391
446
 
392
447
  This software is released under the MIT license.
393
448
 
394
-
395
449
  ## Contact
396
450
 
397
451
  For questions, suggestions, or support, please contact:
398
- William Katzenmeyer, P.E., C.F.M. - heccommander@gmail.com
452
+ William Katzenmeyer, P.E., C.F.M. - heccommander@gmail.com
@@ -828,7 +828,6 @@ def init_ras_project(ras_project_folder, ras_version=None, ras_object=None):
828
828
  Initialize a RAS project.
829
829
 
830
830
  USE THIS FUNCTION TO INITIALIZE A RAS PROJECT, NOT THE INITIALIZE METHOD OF THE RasPrj CLASS.
831
- The initialize method of the RasPrj class only modifies the global 'ras' object.
832
831
 
833
832
  Parameters:
834
833
  -----------
@@ -838,8 +837,10 @@ def init_ras_project(ras_project_folder, ras_version=None, ras_object=None):
838
837
  The version of RAS to use (e.g., "6.6").
839
838
  The version can also be a full path to the Ras.exe file.
840
839
  If None, the function will attempt to use the version from the global 'ras' object or a default path.
841
- ras_object : RasPrj, optional
842
- An instance of RasPrj to initialize. If None, the global 'ras' object is used.
840
+ ras_object : RasPrj or str, optional
841
+ If None, the global 'ras' object is updated.
842
+ If a RasPrj instance, that instance is updated.
843
+ If any other value is provided, a new RasPrj instance is created and returned.
843
844
 
844
845
  Returns:
845
846
  --------
@@ -852,16 +853,24 @@ def init_ras_project(ras_project_folder, ras_version=None, ras_object=None):
852
853
 
853
854
  ras_exe_path = get_ras_exe(ras_version)
854
855
 
856
+ # Determine which RasPrj instance to use
855
857
  if ras_object is None:
858
+ # Use the global 'ras' object
856
859
  logger.info("Initializing global 'ras' object via init_ras_project function.")
857
860
  ras_object = ras
858
861
  elif not isinstance(ras_object, RasPrj):
859
- logger.error("Provided ras_object is not an instance of RasPrj.")
860
- raise TypeError("ras_object must be an instance of RasPrj or None.")
862
+ # Create a new RasPrj instance
863
+ logger.info("Creating a new RasPrj instance.")
864
+ ras_object = RasPrj()
861
865
 
862
866
  # Initialize the RasPrj instance
863
867
  ras_object.initialize(ras_project_folder, ras_exe_path)
864
868
 
869
+ # Always update the global ras object as well
870
+ if ras_object is not ras:
871
+ ras.initialize(ras_project_folder, ras_exe_path)
872
+ logger.info("Global 'ras' object also updated to match the new project.")
873
+
865
874
  logger.info(f"Project initialized. ras_object project folder: {ras_object.project_folder}")
866
875
  return ras_object
867
876
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ras-commander
3
- Version: 0.58.0
3
+ Version: 0.59.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.
@@ -43,12 +43,11 @@ This repository has several methods of interaction with Large Language Models an
43
43
 
44
44
  1. **[RAS Commander Library Assistant GPT](https://chatgpt.com/g/g-TZRPR3oAO-ras-commander-library-assistant)**: A specialized GPT model with access to the ras-commander codebase and library, available for answering queries and providing code suggestions. You can even upload your own plan, unsteady and HDF files to inspect and help determine how to automate your workflows or visualize your results, although this ability is still limited by OpenAI's GPT frameworks and may not be useful for long conversations.
45
45
 
46
- 2. **[Purpose-Built Knowledge Base Summaries](https://github.com/billk-FM/ras-commander/tree/main/ai_tools/assistant_knowledge_bases)**: Up-to-date compilations of the documentation and codebase for use with large language models like Claude or GPT-4. Look in 'ai_tools/assistant_knowledge_bases/' in the repo. The repo's codebase (without documentation and examples) has been curated to stay within the current ~200k context window limitations of frontier models, and for tasks that do not need an understanding of the underlying code, the Comprehensive Library Guide and any relevant examples from the example folder should be adequate context for leveraging the ras-commander API to complete tasks.
46
+ 2. **[Purpose-Built Knowledge Base Summaries](https://github.com/gpt-cmdr/ras-commander/tree/main/ai_tools/assistant_knowledge_bases)**: Up-to-date compilations of the documentation and codebase for use with large language models like Claude or GPT-4. Look in 'ai_tools/assistant_knowledge_bases/' in the repo. The repo's codebase (without documentation and examples) has been curated to stay within the current ~200k context window limitations of frontier models, and for tasks that do not need an understanding of the underlying code, the Comprehensive Library Guide and any relevant examples from the example folder should be adequate context for leveraging the ras-commander API to complete tasks.
47
47
 
48
- 3. **[Cursor IDE Integration](https://github.com/billk-FM/ras-commander/blob/main/.cursorrules)**: Custom rules(.cursorrules) for the Cursor IDE to provide context-aware suggestions and documentation. Just open the repository folder in Cursor to recognize these instructions. You can create your own folders "/workspace/, "/projects/", or "my_projects/" as these are already in the .gitignore, and place your custom scripts there for your projects. This will allow easy referencing of the ras-commander documents and individual repo files, the automatic loading of the .cursorrules file. Alternatvely, download the github repo into your projects folder to easily load documents and use cursor rules files.
49
-
50
- 5. **[RAS-Commander Library Assistant](https://github.com/billk-FM/ras-commander/blob/main/library_assistant)**: A full-featured interface for multi-turn conversations, using your own API keys and the ras-commander library for context. The library assistant allows you to load your own scripts and chat with specific examples and/or function classes in the RAS-Commander library to effectively utilize the library's functions in your workflow. To reduce hallucinations, a file browser is included which adds full files to the conversation to ensure grounded responses. A dashboard shows you the total context and estimated cost of each request. **Now with support for OpenAI's o1 and o3-mini, and Deepseek V3 and R1 models using US-based Together.ai**
48
+ 3. **[Cursor IDE Integration](https://github.com/gpt-cmdr/ras-commander/blob/main/.cursorrules)**: Custom rules(.cursorrules) for the Cursor IDE to provide context-aware suggestions and documentation. Just open the repository folder in Cursor to recognize these instructions. You can create your own folders "/workspace/, "/projects/", or "my_projects/" as these are already in the .gitignore, and place your custom scripts there for your projects. This will allow easy referencing of the ras-commander documents and individual repo files, the automatic loading of the .cursorrules file. Alternatvely, download the github repo into your projects folder to easily load documents and use cursor rules files.
51
49
 
50
+ 5. **[RAS-Commander Library Assistant](https://github.com/gpt-cmdr/ras-commander/blob/main/library_assistant)**: A full-featured interface for multi-turn conversations, using your own API keys and the ras-commander library for context. The library assistant allows you to load your own scripts and chat with specific examples and/or function classes in the RAS-Commander library to effectively utilize the library's functions in your workflow. To reduce hallucinations, a file browser is included which adds full files to the conversation to ensure grounded responses. A dashboard shows you the total context and estimated cost of each request. **Now with support for OpenAI's o1 and o3-mini, and Deepseek V3 and R1 models using US-based Together.ai**
52
51
 
53
52
  ## Background
54
53
  The ras-commander library emerged from the initial test-bed of AI-driven coding represented by the HEC-Commander tools Python notebooks. These notebooks served as a proof of concept, demonstrating the value proposition of automating HEC-RAS operations. The transition from notebooks to a structured library aims to provide a more robust, maintainable, and extensible solution for water resources engineers.
@@ -65,8 +64,6 @@ HEC-RAS Project Management & Execution
65
64
  - Progress tracking and logging
66
65
  - Execution error handling and recovery
67
66
 
68
-
69
-
70
67
  HDF Data Access & Analysis
71
68
  - 2D mesh results processing (depths, velocities, WSE)
72
69
  - Cross-section data extraction
@@ -76,7 +73,6 @@ HDF Data Access & Analysis
76
73
  - Fluvial-pluvial boundary calculations
77
74
  - Infiltration and precipitation data handling
78
75
 
79
-
80
76
  RAS ASCII File Operations
81
77
  - Plan file creation and modification
82
78
  - Geometry file parsing examples
@@ -93,7 +89,6 @@ First, create a virtual environment with conda or venv (ask ChatGPT if you need
93
89
 
94
90
  In your virtual environment, install ras-commander using pip:
95
91
  ```
96
- pip install h5py numpy pandas requests tqdm scipy xarray geopandas matplotlib ipython tqdm psutil shapely fiona pathlib rtree rasterstats
97
92
  pip install --upgrade ras-commander
98
93
  ```
99
94
  If you have dependency issues with pip (especially if you have errors with numpy), try clearing your local pip packages 'C:\Users\your_username\AppData\Roaming\Python\' and then creating a new virtual environment.
@@ -118,10 +113,6 @@ except ImportError:
118
113
  ```
119
114
  It is highly suggested to fork this repository before going this route, and using Git to manage your changes! This allows any revisions to the ras-commander classes and functions to be actively edited and developed by end users. The folders "/workspace/, "/projects/", or "my_projects/" are included in the .gitignore, so users can place you custom scripts there for any project data they don't want to be tracked by git.
120
115
 
121
-
122
-
123
-
124
-
125
116
  ## Quick Start Guide
126
117
 
127
118
  ```
@@ -141,9 +132,9 @@ RasCmdr.compute_plan("01", dest_folder=r"/path/to/results", overwrite_dest=True)
141
132
  ### Execute plans in parallel
142
133
  ```
143
134
  results = RasCmdr.compute_parallel(
144
- plan_numbers=["01", "02"],
135
+ plan_number=["01", "02"],
145
136
  max_workers=2,
146
- cores_per_run=2,
137
+ num_cores=2,
147
138
  dest_folder=r"/path/to/results",
148
139
  overwrite_dest=True
149
140
  )
@@ -154,6 +145,63 @@ results = RasCmdr.compute_parallel(
154
145
  RasPlan.set_geom("01", "02")
155
146
  ```
156
147
 
148
+ ### Execution Modes
149
+
150
+ RAS Commander provides three methods for executing HEC-RAS plans:
151
+
152
+ #### Single Plan Execution
153
+ ```python
154
+ # Execute a single plan
155
+ success = RasCmdr.compute_plan("01", dest_folder=r"/path/to/results")
156
+ print(f"Plan execution {'successful' if success else 'failed'}")
157
+ ```
158
+
159
+ #### Sequential Execution of Multiple Plans
160
+ ```python
161
+ # Execute multiple plans in sequence in a test folder
162
+ results = RasCmdr.compute_test_mode(
163
+ plan_number=["01", "02", "03"],
164
+ dest_folder_suffix="[Test]"
165
+ )
166
+ for plan, success in results.items():
167
+ print(f"Plan {plan}: {'Successful' if success else 'Failed'}")
168
+ ```
169
+
170
+ #### Parallel Execution of Multiple Plans
171
+ ```python
172
+ # Execute multiple plans concurrently
173
+ results = RasCmdr.compute_parallel(
174
+ plan_number=["01", "02", "03"],
175
+ max_workers=3,
176
+ num_cores=2
177
+ )
178
+ for plan, success in results.items():
179
+ print(f"Plan {plan}: {'Successful' if success else 'Failed'}")
180
+ ```
181
+
182
+ ### Working with Multiple Projects
183
+
184
+ RAS Commander allows working with multiple HEC-RAS projects simultaneously:
185
+
186
+ ```python
187
+ # Initialize multiple projects
188
+ project1 = init_ras_project(path1, "6.6")
189
+ project2 = init_ras_project(path2, "6.6")
190
+
191
+ # Perform operations on each project
192
+ RasCmdr.compute_plan("01", ras_object=project1, dest_folder=folder1)
193
+ RasCmdr.compute_plan("01", ras_object=project2, dest_folder=folder2)
194
+
195
+ # Compare results between projects
196
+ print(f"Project 1: {project1.project_name}")
197
+ print(f"Project 2: {project2.project_name}")
198
+
199
+ # Always specify the ras_object parameter when working with multiple projects
200
+ # to avoid confusion with the global 'ras' object
201
+ ```
202
+
203
+ This is useful for comparing different river systems, running scenario analyses across multiple watersheds, or managing a suite of related models.
204
+
157
205
  #### Key Components
158
206
 
159
207
  - `RasPrj`: Manages HEC-RAS projects, handling initialization and data loading
@@ -182,8 +230,6 @@ RasPlan.set_geom("01", "02")
182
230
 
183
231
  ### Project Organization Diagram
184
232
 
185
- ### Project Organization Diagram
186
-
187
233
  ```
188
234
  ras_commander
189
235
  ├── ras_commander
@@ -214,24 +260,16 @@ ras_commander
214
260
  │ ├── HdfPlot.py
215
261
  │ └── HdfResultsPlot.py
216
262
  ├── examples
217
- │ ├── 01_project_initialization.py
218
- │ ├── 02_plan_operations.py
219
- │ ├── 03_geometry_operations.py
220
- │ ├── 04_unsteady_flow_operations.py
221
- │ ├── 05_utility_functions.py
222
- │ ├── 06_single_plan_execution.py
223
- │ ├── 07_sequential_plan_execution.py
224
- │ ├── 08_parallel_execution.py
225
- │ ├── 09_specifying_plans.py
226
- │ ├── 10_arguments_for_compute.py
227
- │ ├── 11_Using_RasExamples.ipynb
228
- │ ├── 12_plan_set_execution.py
229
- │ ├── 13_multiple_project_operations.py
230
- │ ├── 14_Core_Sensitivity.ipynb
231
- │ ├── 15_plan_key_operations.py
232
- │ ├── 16_scanning_ras_project_info.py
233
- │ ├── 17_parallel_execution_ble.py
234
- │ └── HEC_RAS_2D_HDF_Analysis.ipynb
263
+ │ ├── 00_Using_RasExamples.ipynb
264
+ │ ├── 01_project_initialization.ipynb
265
+ │ ├── 02_plan_and_geometry_operations.ipynb
266
+ │ ├── 03_unsteady_flow_operations.ipynb
267
+ │ ├── 04_multiple_project_operations.ipynb
268
+ │ ├── 05_single_plan_execution.ipynb
269
+ │ ├── 06_executing_plan_sets.ipynb
270
+ │ ├── 07_sequential_plan_execution.ipynb
271
+ │ ├── 08_parallel_execution.ipynb
272
+ │ └── 09_plan_parameter_operations.ipynb
235
273
  ├── tests
236
274
  │ └── ... (test files)
237
275
  ├── .gitignore
@@ -311,7 +349,6 @@ print(runtime_data)
311
349
  ```
312
350
  This class simplifies the process of extracting and analyzing data from HEC-RAS HDF output files, supporting tasks such as post-processing and result visualization.
313
351
 
314
-
315
352
  #### Infrastructure Analysis
316
353
  ```python
317
354
  from ras_commander import HdfPipe, HdfPump
@@ -348,13 +385,33 @@ boundary = HdfFluvialPluvial.calculate_fluvial_pluvial_boundary(
348
385
  )
349
386
  ```
350
387
 
351
- ## Documentation
388
+ ## Examples
352
389
 
353
- For detailed usage instructions and API documentation, please refer to the [Comprehensive Library Guide](Comprehensive_Library_Guide.md).
390
+ Check out the examples in the repository to learn how to use RAS Commander:
354
391
 
355
- ## Examples
392
+ ### Project Setup
393
+ - `00_Using_RasExamples.ipynb`: Download and extract HEC-RAS example projects
394
+ - `01_project_initialization.ipynb`: Initialize HEC-RAS projects and explore their components
395
+
396
+ ### File Operations
397
+ - `02_plan_and_geometry_operations.ipynb`: Clone and modify plan and geometry files
398
+ - `03_unsteady_flow_operations.ipynb`: Extract and modify boundary conditions
399
+ - `09_plan_parameter_operations.ipynb`: Retrieve and update plan parameters
400
+
401
+ ### Execution Modes
402
+ - `05_single_plan_execution.ipynb`: Execute a single plan with specific options
403
+ - `06_executing_plan_sets.ipynb`: Different ways to specify and execute plan sets
404
+ - `07_sequential_plan_execution.ipynb`: Run multiple plans in sequence
405
+ - `08_parallel_execution.ipynb`: Run multiple plans in parallel
356
406
 
357
- Check out the `examples/` directory for sample scripts demonstrating various features of ras-commander.
407
+ ### Advanced Operations
408
+ - `04_multiple_project_operations.ipynb`: Work with multiple HEC-RAS projects simultaneously
409
+
410
+ These examples demonstrate practical applications of RAS Commander for automating HEC-RAS workflows, from basic operations to advanced scenarios.
411
+
412
+ ## Documentation
413
+
414
+ For detailed usage instructions and API documentation, please refer to the [Comprehensive Library Guide](Comprehensive_Library_Guide.md).
358
415
 
359
416
  ## Future Development
360
417
 
@@ -365,10 +422,9 @@ The ras-commander library is an ongoing project. Future plans include:
365
422
 
366
423
  ## Related Resources
367
424
 
368
- - [HEC-Commander Blog](https://github.com/billk-FM/HEC-Commander/tree/main/Blog)
425
+ - [HEC-Commander Blog](https://github.com/gpt-cmdr/HEC-Commander/tree/main/Blog)
369
426
  - [GPT-Commander YouTube Channel](https://www.youtube.com/@GPT_Commander)
370
- - [ChatGPT Examples for Water Resources Engineers](https://github.com/billk-FM/HEC-Commander/tree/main/ChatGPT%20Examples)
371
-
427
+ - [ChatGPT Examples for Water Resources Engineers](https://github.com/gpt-cmdr/HEC-Commander/tree/main/ChatGPT%20Examples)
372
428
 
373
429
  ## Contributing
374
430
 
@@ -405,8 +461,7 @@ These acknowledgments recognize the contributions and inspirations that have hel
405
461
 
406
462
  4. Chris Goodell, "Breaking the HEC-RAS Code" - Studied and used as a reference for understanding the inner workings of HEC-RAS, providing valuable insights into the software's functionality and structure.
407
463
 
408
- 5. [HEC-Commander Tools](https://github.com/billk-FM/HEC-Commander) - Inspiration and initial code base for the development of RAS Commander.
409
-
464
+ 5. [HEC-Commander Tools](https://github.com/gpt-cmdr/HEC-Commander) - Inspiration and initial code base for the development of RAS Commander.
410
465
 
411
466
  ## Official RAS Commander AI-Generated Songs:
412
467
 
@@ -416,14 +471,13 @@ These acknowledgments recognize the contributions and inspirations that have hel
416
471
 
417
472
  ## Other Resources
418
473
 
419
- Notebook version of RAS-Commander: [RAS-Commander Notebook in the HEC-Commander Tools Repository](https://github.com/billk-FM/HEC-Commander/tree/main/RAS-Commander)
474
+ Notebook version of RAS-Commander: [RAS-Commander Notebook in the HEC-Commander Tools Repository](https://github.com/gpt-cmdr/HEC-Commander/tree/main/RAS-Commander)
420
475
  Youtube Tutorials for HEC-Commander Tools and RAS-Commander: [GPT-Commander on YouTube](https://www.youtube.com/@GPT_Commander/videos)
421
476
 
422
477
  ## LICENSE
423
478
 
424
479
  This software is released under the MIT license.
425
480
 
426
-
427
481
  ## Contact
428
482
 
429
483
  For questions, suggestions, or support, please contact:
@@ -28,7 +28,7 @@ class CustomBuildPy(build_py):
28
28
 
29
29
  setup(
30
30
  name="ras-commander",
31
- version="0.58.0",
31
+ version="0.59.0",
32
32
  packages=find_packages(),
33
33
  include_package_data=True,
34
34
  python_requires='>=3.10',
File without changes
File without changes