ras-commander 0.23.0.dev0__tar.gz → 0.33.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 (71) hide show
  1. ras_commander-0.33.0/PKG-INFO +4 -0
  2. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/README.md +58 -78
  3. ras_commander-0.33.0/pyproject.toml +3 -0
  4. ras_commander-0.23.0.dev0/ras_commander/RasCommander.py → ras_commander-0.33.0/ras_commander/RasCmdr.py +449 -465
  5. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander/RasExamples.py +304 -304
  6. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander/RasGeo.py +88 -88
  7. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander/RasPlan.py +1266 -1266
  8. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander/RasPrj.py +399 -399
  9. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander/RasUnsteady.py +73 -64
  10. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander/RasUtils.py +310 -310
  11. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander/__init__.py +6 -6
  12. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander/_version.py +16 -16
  13. ras_commander-0.33.0/ras_commander.egg-info/PKG-INFO +4 -0
  14. ras_commander-0.33.0/ras_commander.egg-info/SOURCES.txt +17 -0
  15. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/setup.cfg +4 -7
  16. ras_commander-0.33.0/setup.py +8 -0
  17. ras_commander-0.23.0.dev0/.cursorrules +0 -118
  18. ras_commander-0.23.0.dev0/.github/workflows/publish-to-pypi.yml +0 -58
  19. ras_commander-0.23.0.dev0/.gitignore/.gitignore +0 -8
  20. ras_commander-0.23.0.dev0/Comprehensive_Library_Guide.md +0 -278
  21. ras_commander-0.23.0.dev0/PKG-INFO +0 -218
  22. ras_commander-0.23.0.dev0/STYLE_GUIDE.md +0 -184
  23. ras_commander-0.23.0.dev0/ai_tools/README.md +0 -3
  24. ras_commander-0.23.0.dev0/ai_tools/llm_summary/ras_commander.txt +0 -7371
  25. ras_commander-0.23.0.dev0/ai_tools/llmsummarize 1. full repo.py +0 -66
  26. ras_commander-0.23.0.dev0/ai_tools/llmsummarize 2. docs and code only.py +0 -66
  27. ras_commander-0.23.0.dev0/ai_tools/llmsummarize 3. documentation and docstrings.py +0 -80
  28. ras_commander-0.23.0.dev0/ai_tools/rascommander_code_assistant.ipynb +0 -760
  29. ras_commander-0.23.0.dev0/examples/01_project_initialization.py +0 -138
  30. ras_commander-0.23.0.dev0/examples/02_plan_operations.py +0 -152
  31. ras_commander-0.23.0.dev0/examples/03_geometry_operations.py +0 -112
  32. ras_commander-0.23.0.dev0/examples/04_unsteady_flow_operations.py +0 -103
  33. ras_commander-0.23.0.dev0/examples/05_utility_functions.py +0 -74
  34. ras_commander-0.23.0.dev0/examples/06_single_plan_execution.py +0 -80
  35. ras_commander-0.23.0.dev0/examples/07_sequential_plan_execution.py +0 -105
  36. ras_commander-0.23.0.dev0/examples/08_parallel_execution.py +0 -97
  37. ras_commander-0.23.0.dev0/examples/09_specifying_plans.py +0 -108
  38. ras_commander-0.23.0.dev0/examples/10_arguments_for_compute.py +0 -102
  39. ras_commander-0.23.0.dev0/examples/11_Using_RasExamples.ipynb +0 -456
  40. ras_commander-0.23.0.dev0/examples/12_plan_set_execution.py +0 -95
  41. ras_commander-0.23.0.dev0/examples/13_multiple_project_operations.py +0 -135
  42. ras_commander-0.23.0.dev0/examples/example_projects.csv +0 -67
  43. ras_commander-0.23.0.dev0/examples/example_projects.ipynb +0 -372
  44. ras_commander-0.23.0.dev0/future_dev_roadmap.ipynb +0 -433
  45. ras_commander-0.23.0.dev0/misc/Claude Example Error Correct Suggestions.txt +0 -278
  46. ras_commander-0.23.0.dev0/misc/FunctionList.md +0 -0
  47. ras_commander-0.23.0.dev0/misc/Gemini Code Review.ipynb +0 -1830
  48. ras_commander-0.23.0.dev0/misc/Gemini Dev notes.ipynb +0 -75
  49. ras_commander-0.23.0.dev0/misc/PEP 484.txt +0 -2493
  50. ras_commander-0.23.0.dev0/misc/Plan Key Notes.txt +0 -161
  51. ras_commander-0.23.0.dev0/misc/Prompts.txt +0 -370
  52. ras_commander-0.23.0.dev0/misc/future examples/xx_accessing_hdf_results_1D.py +0 -1
  53. ras_commander-0.23.0.dev0/misc/future examples/xx_accessing_hdf_results_2D.py +0 -1
  54. ras_commander-0.23.0.dev0/misc/future examples/xx_changing_2d_infiltration_overrides.ipynb +0 -0
  55. ras_commander-0.23.0.dev0/misc/future examples/xx_changing_2d_mannings_tables.ipynb +0 -0
  56. ras_commander-0.23.0.dev0/misc/future examples/xx_changing_common_plan_keys.ipynb +0 -0
  57. ras_commander-0.23.0.dev0/misc/future examples/xx_changing_common_unsteady_keys.ipynb +0 -0
  58. ras_commander-0.23.0.dev0/misc/future examples/xx_compute_remote_desktop.py +0 -0
  59. ras_commander-0.23.0.dev0/misc/future_dev_roadmap.ipynb +0 -433
  60. ras_commander-0.23.0.dev0/misc/magic example project lines.txt +0 -3
  61. ras_commander-0.23.0.dev0/misc/pep 8.txt +0 -1647
  62. ras_commander-0.23.0.dev0/pyproject.toml +0 -28
  63. ras_commander-0.23.0.dev0/ras_commander/README.md +0 -187
  64. ras_commander-0.23.0.dev0/ras_commander.egg-info/PKG-INFO +0 -218
  65. ras_commander-0.23.0.dev0/ras_commander.egg-info/SOURCES.txt +0 -65
  66. ras_commander-0.23.0.dev0/requirements.txt +0 -32
  67. ras_commander-0.23.0.dev0/setup.py +0 -19
  68. ras_commander-0.23.0.dev0/updated_pyproject.toml +0 -25
  69. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/LICENSE +0 -0
  70. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander.egg-info/dependency_links.txt +0 -0
  71. {ras_commander-0.23.0.dev0 → ras_commander-0.33.0}/ras_commander.egg-info/top_level.txt +0 -0
@@ -0,0 +1,4 @@
1
+ Metadata-Version: 2.1
2
+ Name: ras-commander
3
+ Version: 0.33.0
4
+ License-File: LICENSE
@@ -1,6 +1,11 @@
1
- # RAS-Commander (ras_commander)
1
+ # RAS Commander (ras-commander)
2
2
 
3
- ras_commander is a Python library for automating HEC-RAS operations, providing a set of tools to interact with HEC-RAS project files, execute simulations, and manage project data. This library is an evolution of the RAS-Commander 1.0 Python Notebook Application previously released under the HEC-Commander tools.
3
+ RAS Commander is a Python library for automating HEC-RAS operations, providing a set of tools to interact with HEC-RAS project files, execute simulations, and manage project data. This library is an evolution of the RASCommander 1.0 Python Notebook Application previously released under HEC-Commander tools.
4
+
5
+ Contributors:
6
+ William Katzenmeyer, P.E., C.F.M. - billk@fenstermaker.com
7
+ Sean Micek, P.E., C.F.M. - smicek@fenstermaker.com
8
+ Aaron Nichols, P.E., C.F.M. - anichols@fenstermaker.com
4
9
 
5
10
  ## Features
6
11
 
@@ -13,11 +18,12 @@ ras_commander is a Python library for automating HEC-RAS operations, providing a
13
18
 
14
19
  ## Installation
15
20
 
16
- Install ras_commander using pip:
21
+ Install ras-commander using pip:
22
+
17
23
 
18
- ```bash
24
+ pip install pandas requests pathlib # Only 3 requirements for ras-commander, needs to be added to the requirements.txt file so pip install works
19
25
  pip install ras-commander
20
- ```
26
+
21
27
 
22
28
  ## Requirements
23
29
 
@@ -28,30 +34,32 @@ For a full list of dependencies, see the `requirements.txt` file.
28
34
 
29
35
  ## Quick Start
30
36
 
31
- ```python
32
- from ras_commander import init_ras_project, RasCommander, RasPlan
37
+
38
+ from ras_commander import init_ras_project, RasCmdr, RasPlan
33
39
 
34
40
  # Initialize a project
35
- init_ras_project("/path/to/project", "6.5")
41
+ init_ras_project(r"/path/to/project", "6.5")
36
42
 
37
43
  # Execute a single plan
38
- RasCommander.compute_plan("01")
44
+ RasCmdr.compute_plan("01", dest_folder=r"/path/to/results", overwrite_dest=True)
39
45
 
40
46
  # Execute plans in parallel
41
- results = RasCommander.compute_parallel(
47
+ results = RasCmdr.compute_parallel(
42
48
  plan_numbers=["01", "02"],
43
49
  max_workers=2,
44
- cores_per_run=2
50
+ cores_per_run=2,
51
+ dest_folder=r"/path/to/results",
52
+ overwrite_dest=True
45
53
  )
46
54
 
47
55
  # Modify a plan
48
56
  RasPlan.set_geom("01", "02")
49
- ```
57
+
50
58
 
51
59
  ## Key Components
52
60
 
53
61
  - `RasPrj`: Manages HEC-RAS projects
54
- - `RasCommander`: Handles execution of HEC-RAS simulations
62
+ - `RasCmdr`: Handles execution of HEC-RAS simulations
55
63
  - `RasPlan`: Provides functions for modifying and updating plan files
56
64
  - `RasGeo`: Handles operations related to geometry files
57
65
  - `RasUnsteady`: Manages unsteady flow file operations
@@ -64,38 +72,18 @@ For detailed usage instructions and API documentation, please refer to the [Comp
64
72
 
65
73
  ## Examples
66
74
 
67
- Check out the `examples/` directory for sample scripts demonstrating various features of ras_commander.
68
-
69
- ## Development
70
-
71
- ### Setting up the development environment
72
-
73
- 1. Clone the repository:
74
- ```
75
- git clone https://github.com/yourusername/ras_commander.git
76
- ```
77
- 2. Create a virtual environment and activate it:
78
- ```
79
- python -m venv venv
80
- source venv/bin/activate # On Windows, use `venv\Scripts\activate`
81
- ```
82
- 3. Install the development dependencies:
83
- ```
84
- pip install -r requirements.txt
85
- ```
86
- Certainly! I'll provide an updated Project Organization Diagram based on the current structure of the ras_commander library. Here's the updated diagram:
87
-
75
+ Check out the `examples/` directory for sample scripts demonstrating various features of ras-commander.
88
76
 
89
77
  ## Project Organization Diagram
90
78
 
91
- ```
79
+
92
80
  ras_commander
93
81
  ├── .github
94
82
  │ └── workflows
95
83
  │ └── python-package.yml
96
84
  ├── ras_commander
97
85
  │ ├── __init__.py
98
- │ ├── RasCommander.py
86
+ │ ├── RasCmdr.py
99
87
  │ ├── RasExamples.py
100
88
  │ ├── RasGeo.py
101
89
  │ ├── RasPlan.py
@@ -127,12 +115,11 @@ ras_commander
127
115
  ├── setup.cfg
128
116
  ├── setup.py
129
117
  └── requirements.txt
130
- ```
131
118
 
132
119
 
133
120
  ## Inclusion of .cursorrules and ai_tools for AI-driven Coding Experience
134
121
 
135
- Open the ras_commander folder in the Cursor IDE, and it will automatically include the .cursorrules file in your instructions. Additionally, two other provided methods for interacting with the library though your current AI subscriptions:
122
+ Open the ras_commander folder in the Cursor IDE, and it will automatically include the .cursorrules file in your instructions. Additionally, two other provided methods for interacting with the library through your current AI subscriptions:
136
123
 
137
124
  - ChatGPT: ras_commander GPT Assistant (LINK HERE)
138
125
  - Latest LLM summaries of the code base:
@@ -143,63 +130,56 @@ Open the ras_commander folder in the Cursor IDE, and it will automatically inclu
143
130
 
144
131
  There are a series of scripts provided in the "llm_summaries" folder that provide summaries of the code base, and the docstrings of the functions. They can be run in your local environment, or provided to ChatGPT's code interpreter for execution.
145
132
 
146
- ## RAS-Commander GPT Assistant
147
-
148
- The ras_commander GPT assistant has access the entire code base, and can be a helpful tool for understanding the library and its capabilities. However, it is subject to the same context window limitations and file retrieval limtations as I have covered in ADD BLOG LINK HERE. For best results, use the llm summaries above to provide robust context to the model before asking to generate complex workflows.
149
-
150
- ## Contributing
151
-
152
- We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and suggest improvements.
153
-
154
- ## Style Guide
155
-
156
- This project follows a specific style guide to maintain consistency across the codebase. Please refer to the [Style Guide](STYLE_GUIDE.md) for details on coding conventions, documentation standards, and best practices.
157
-
133
+ ## RAS-Cmdr GPT Assistant
158
134
 
159
- ## License
135
+ The RAS Commander GPT assistant has access to the entire code base, and can be a helpful tool for understanding the library and its capabilities. However, it is subject to the same context window limitations and file retrieval limitations as I have covered in ADD BLOG LINK HERE. For best results, use the llm summaries above to provide robust context to the model before asking to generate complex workflows.
160
136
 
161
- ras_commander is released under the MIT License. See the license file for details.
162
-
163
- ## Acknowledgments
137
+ ## Current Uses and Roadmap Items
164
138
 
165
- ras_commander is based on the HEC-Commander project's "Command Line is All You Need" approach, leveraging the HEC-RAS command-line interface for automation. The initial development of this library was presented in the HEC-Commander Tools repository. In a 2024 Australian Water School webinar, Bill demonstrated the derivation of basic HEC-RAS automation functions from plain language instructions. Leveraging the previously developed code and AI tools, the library was created. The primary tools used for this initial development were Anthropic's Claude, GPT-4o, Google's Gemini Experimental models,and the Cursor AI Coding IDE.
139
+ ### Potential Uses (Roadmap Items) of HEC-RAS Automation Functions
166
140
 
141
+ This set of functions provides a powerful foundation for automating various aspects of HEC-RAS modeling workflows. Here are some potential applications:
167
142
 
143
+ 1. **Calibration and Sensitivity Analysis:**
144
+ - **Automated Parameter Variation:** Users can create multiple simulation scenarios with varying parameters (e.g., Manning's n values, boundary conditions, initial conditions) to calibrate their model against observed data.
145
+ - **Sensitivity Testing:** Evaluate the impact of different input parameters on model outputs by generating a range of scenarios and analyzing the results. This helps identify critical parameters that require more attention during calibration.
168
146
 
169
- ## Contact
147
+ 2. **Real-time Forecasting:**
148
+ - **Dynamic Model Updates:** Integrate with external data sources (e.g., weather forecasts, streamflow observations) to automatically update boundary conditions and initial conditions in unsteady flow files before running the simulation.
149
+ - **Ensemble Forecasting:** Generate multiple forecasts by incorporating uncertainty in input data and model parameters. This provides a more comprehensive understanding of potential future flow conditions.
170
150
 
171
- For questions, suggestions, or support, please contact:
172
- William Katzenmeyer, P.E., C.F.M. - billk@fenstermaker.com
151
+ 3. **Scenario Analysis:**
152
+ - **Land Use Change Impacts:** Evaluate the effects of land use changes on flood risk by modifying Manning's n values using `extract_2d_mannings_tables`, `modify_2d_mannings_table`, and `write_2d_mannings_tables` and running simulations with updated geometry files.
153
+ - **Climate Change Impacts:** Analyze the potential impacts of projected climate changes on flood risk by adjusting precipitation patterns and other relevant parameters in unsteady flow files.
173
154
 
155
+ 4. **Batch Processing and High-Performance Computing:**
156
+ - **Large-scale Model Runs:** Utilize `run_plans_parallel` to execute multiple simulations concurrently on a multi-core system, significantly reducing processing time for large-scale models or complex scenarios.
157
+ - **Automated Report Generation:** Integrate with Python libraries like matplotlib and bokeh to automatically generate customized reports summarizing simulation results, including tables, figures, and maps.
174
158
 
159
+ 5. **Model Development and Testing:**
160
+ - **Rapid Prototyping:** Quickly set up and run new model configurations using template files and automated workflows, facilitating rapid model development and testing.
161
+ - **Regression Testing:** Ensure model integrity and consistency after code changes or updates by automatically running a predefined set of simulations and comparing results with expected outputs.
175
162
 
163
+ 6. **User-Friendly Interfaces:**
164
+ - **GUI Development:** Integrate with Python GUI libraries like Tkinter or PyQt to create user-friendly interfaces for automating HEC-RAS workflows, allowing non-programmers to access the power of automation.
176
165
 
166
+ ## Contributing
177
167
 
168
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and suggest improvements.
178
169
 
170
+ ## Style Guide
179
171
 
172
+ This project follows a specific style guide to maintain consistency across the codebase. Please refer to the [Style Guide](STYLE_GUIDE.md) for details on coding conventions, documentation standards, and best practices.
180
173
 
174
+ ## License
181
175
 
182
- NOTES: INCORPORATE INTO THE README.MD FILE ABOVE UNDER A NEW SECTION FOR CURRENT USES AND ROADMAP ITEMS, THEN DELETE THIS NOTE
176
+ ras-commander is released under the MIT License. See the license file for details.
183
177
 
178
+ ## Acknowledgments
184
179
 
185
- Potential Uses of HEC-RAS Automation Functions
186
- This set of functions provides a powerful foundation for automating various aspects of HEC-RAS modeling workflows. Here are some potential applications:
187
- 1. Calibration and Sensitivity Analysis:
188
- Automated Parameter Variation: Users can create multiple simulation scenarios with varying parameters (e.g., Manning's n values, boundary conditions, initial conditions) to calibrate their model against observed data.
189
- Sensitivity Testing: Evaluate the impact of different input parameters on model outputs by generating a range of scenarios and analyzing the results. This helps identify critical parameters that require more attention during calibration.
190
- 2. Real-time Forecasting:
191
- Dynamic Model Updates: Integrate with external data sources (e.g., weather forecasts, streamflow observations) to automatically update boundary conditions and initial conditions in unsteady flow files before running the simulation.
192
- Ensemble Forecasting: Generate multiple forecasts by incorporating uncertainty in input data and model parameters. This provides a more comprehensive understanding of potential future flow conditions.
193
- 3. Scenario Analysis:
194
- Land Use Change Impacts: Evaluate the effects of land use changes on flood risk by modifying Manning's n values using extract_2d_mannings_tables, modify_2d_mannings_table, and write_2d_mannings_tables and running simulations with updated geometry files.
195
- Climate Change Impacts: Analyze the potential impacts of projected climate changes on flood risk by adjusting precipitation patterns and other relevant parameters in unsteady flow files.
196
- 4. Batch Processing and High-Performance Computing:
197
- Large-scale Model Runs: Utilize run_plans_parallel to execute multiple simulations concurrently on a multi-core system, significantly reducing processing time for large-scale models or complex scenarios.
198
- Automated Report Generation: Integrate with Python libraries like matplotlib and bokeh to automatically generate customized reports summarizing simulation results, including tables, figures, and maps.
199
- 5. Model Development and Testing:
200
- Rapid Prototyping: Quickly set up and run new model configurations using template files and automated workflows, facilitating rapid model development and testing.
201
- Regression Testing: Ensure model integrity and consistency after code changes or updates by automatically running a predefined set of simulations and comparing results with expected outputs.
202
- 6. User-Friendly Interfaces:
203
- GUI Development: Integrate with Python GUI libraries like Tkinter or PyQt to create user-friendly interfaces for automating HEC-RAS workflows, allowing non-programmers to access the power of automation.
180
+ RAS Commander is based on the HEC-Commander project's "Command Line is All You Need" approach, leveraging the HEC-RAS command-line interface for automation. The initial development of this library was presented in the HEC-Commander Tools repository. In a 2024 Australian Water School webinar, Bill demonstrated the derivation of basic HEC-RAS automation functions from plain language instructions. Leveraging the previously developed code and AI tools, the library was created. The primary tools used for this initial development were Anthropic's Claude, GPT-4o, Google's Gemini Experimental models, and the Cursor AI Coding IDE.
204
181
 
182
+ ## Contact
205
183
 
184
+ For questions, suggestions, or support, please contact:
185
+ William Katzenmeyer, P.E., C.F.M. - billk@fenstermaker.com
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=45", "wheel"]
3
+ build-backend = "setuptools.build_meta:__legacy__"