ras-commander-fast-preprocess 0.1.0__py3-none-win_amd64.whl

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.
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: ras-commander-fast-preprocess
3
+ Version: 0.1.0
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Intended Audience :: Science/Research
6
+ Classifier: Operating System :: Microsoft :: Windows
7
+ Classifier: Operating System :: POSIX :: Linux
8
+ Classifier: Programming Language :: Rust
9
+ Classifier: Topic :: Scientific/Engineering :: Hydrology
10
+ License-File: LICENSE
11
+ License-File: THIRD_PARTY_NOTICES
12
+ Summary: Experimental HEC-RAS geometry preprocessor in Rust (the ras-preprocess command-line tool); not for regulatory use
13
+ Keywords: hec-ras,hydraulics,preprocessor,geometry,flood
14
+ Home-Page: https://github.com/gpt-cmdr/ras-commander-fast-preprocess
15
+ License-Expression: MIT
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
18
+ Project-URL: Changelog, https://github.com/gpt-cmdr/ras-commander-fast-preprocess/blob/main/CHANGELOG.md
19
+ Project-URL: Repository, https://github.com/gpt-cmdr/ras-commander-fast-preprocess
20
+
21
+ # ras-commander-fast-preprocess
22
+
23
+ > **Experimental. Not for regulatory use.** This is a 0.x release of a HEC-RAS geometry
24
+ > preprocessor written in Rust. It reproduces native HEC-RAS output only for the component
25
+ > classes listed under [What is qualified](#what-is-qualified), and refuses everything else.
26
+ > Check every model you use it on against native HEC-RAS
27
+ > ([Verification](#verification-against-hec-ras)). Floodplain studies, permits and other
28
+ > regulatory work must use native HEC-RAS preprocessing.
29
+
30
+ `ras-preprocess` computes the hydraulic property tables that HEC-RAS writes into a geometry
31
+ HDF (`.g##.hdf`) when it preprocesses a geometry: 2D face profiles, classification layers,
32
+ face property tables and cell elevation-volume tables; 1D cross-section tables and solver
33
+ connectivity; and pipe-network tables. It reads the geometry, terrain and land-classification
34
+ data, never modifies its inputs, and writes a bundle of tables that the write-back scripts
35
+ copy into a new geometry HDF in the native layout. The engine is built for batch work at
36
+ scale, where many meshes need solver-ready tables under a shared CPU, memory and storage
37
+ budget, and it is the preprocessing engine behind
38
+ [RAS Commander](https://github.com/gpt-cmdr/ras-commander).
39
+
40
+ ## What is qualified
41
+
42
+ "Qualified" means the engine's tables are equal, bit for bit, to the tables native HEC-RAS
43
+ writes for the same geometry, on every validated model that has the component. The
44
+ [validation record](docs/validation.md) lists each case, its source model and result.
45
+
46
+ | Component | HEC-RAS version | Evidence |
47
+ |---|---|---|
48
+ | 2D flow areas, all four stages, with terrain modifications | 7.0.1 and 7.0.2 | Bitwise on 25 real and example models (USGS, FEMA eBFE, LWI and HEC example projects, up to 1.5 million cells) and 83 controlled cases |
49
+ | 2D/2D connections (weir and bridge-opening modes) | 7.0.1 and 7.0.2 | Native tables kept as stored; `2DBR *` and `Default Weir Connectivity` regenerated bitwise for comparison |
50
+ | 1D-only geometry: river reaches, cross sections, junctions, storage areas, lateral structures, SA/SA connections without a rating family | 7.0.2 | Every computed dataset bitwise on the 1D fixtures; HEC-RAS 7.0.2 computes plans from the written tables |
51
+ | Pipe networks, conduits, nodes and their pump stations | 7.0.2 | Bitwise on two independent networks (Davis, BeaverLake) and 20 pump fixtures |
52
+
53
+ ## What is refused
54
+
55
+ A geometry that holds any other component is refused **before anything is written**:
56
+ `stage1`, `stage4` and `all` exit with code 3, print one line naming each component and its
57
+ count, and record a `refused` object in the JSON report. Preprocess such a geometry with
58
+ native HEC-RAS. Refused classes include 1D bridges, culverts, multiple openings, inline
59
+ structures, mixed 1D/2D geometry, and 1D components or pipe networks in a geometry that is not
60
+ labelled HEC-RAS 7.0.2. [docs/known-gaps.md](docs/known-gaps.md) lists every refused class and
61
+ the reason.
62
+
63
+ Where native HEC-RAS 7.0.1 or 7.0.2 has an unfixed defect, the engine reproduces it by default
64
+ so that its output matches native, and offers an opt-in correction flag that records itself in
65
+ the report and the output files ([docs/native-defects.md](docs/native-defects.md)).
66
+
67
+ ## Install
68
+
69
+ Build from source with Rust 1.90 or later:
70
+
71
+ ```text
72
+ cargo build --release -p ras-commander-fast-preprocess-cli
73
+ ```
74
+
75
+ The binary is `target/release/ras-preprocess` (`ras-preprocess.exe` on Windows). Prebuilt
76
+ Windows and Linux binaries are attached to each GitHub release. The workspace builds on
77
+ `x86_64-pc-windows-msvc` and `x86_64-unknown-linux-gnu`, and both builds write identical
78
+ tables.
79
+
80
+ ## Run
81
+
82
+ ```text
83
+ ras-preprocess inspect <model>.g01.hdf
84
+ ras-preprocess all <model>.g01.hdf --out <bundle_dir> [--compare] [--threads N]
85
+ python scripts/hdf_writeback.py <staged copy>.g01.hdf <bundle_dir>
86
+ ```
87
+
88
+ - `inspect` reports the geometry's components and whether the engine would refuse it.
89
+ - `all` runs every stage in one process and writes a write-back bundle. With `--compare` it
90
+ also reports, per stage and dataset, whether its tables equal the native tables already
91
+ stored in the input.
92
+ - `pipes`, `structures` and `xs-htab` compute and compare the pipe-network, 2D-structure and
93
+ 1D tables on their own.
94
+ - Stage the model on a local disk first; `scripts/stage_local.py` copies a geometry and every
95
+ file its preprocessing reads. `hdf_writeback.py` writes the bundle into that staged copy in
96
+ place, after a full backup, and restores the backup on any failure.
97
+
98
+ The write-back scripts are Python (h5py). [docs/usage.md](docs/usage.md) documents every
99
+ subcommand, flag, report field and environment variable.
100
+
101
+ ## Verification against HEC-RAS
102
+
103
+ The engine is verified by comparing its tables with the tables native HEC-RAS writes for the
104
+ same geometry:
105
+
106
+ 1. Native HEC-RAS (7.0.1 or 7.0.2) preprocesses a public model, and the resulting geometry
107
+ HDF is retained as a fixture.
108
+ 2. `ras-preprocess all --compare` (and the `pipes`, `structures` and `xs-htab` comparisons)
109
+ recomputes every table from the geometry's inputs and compares it with the stored native
110
+ table, element by element, at the bit level.
111
+ 3. For the 1D and pipe paths, the written tables are loaded back into HEC-RAS and plans are
112
+ computed from them, to check that the solver accepts them and gives the native results.
113
+
114
+ The fixture-backed test suite runs these comparisons:
115
+ `RAS_PREPROCESS_REQUIRE_FIXTURES=1 cargo test --workspace --release`. Without the variable,
116
+ tests whose fixtures are absent skip themselves. [docs/validation.md](docs/validation.md) is
117
+ the record of every comparison; the [coverage gaps](docs/validation.md#8-coverage-gaps) list
118
+ what has not been compared.
119
+
120
+ To check your own model, compare the engine with a native preprocessing run of the same
121
+ geometry, for example with RAS Commander's side-by-side harness
122
+ (`GeomPreprocessor.validate_rust_equivalence`), for each model and HEC-RAS version you use.
123
+
124
+ ## Documentation
125
+
126
+ - [Usage](docs/usage.md): subcommands, scope rules, version handling, reports and data locations.
127
+ - [Known gaps](docs/known-gaps.md): refused classes and why.
128
+ - [Validation record](docs/validation.md) and [native defects](docs/native-defects.md).
129
+ - [Specification](docs/specification.md).
130
+ - [Changelog](CHANGELOG.md), [contributing](CONTRIBUTING.md), [security](SECURITY.md).
131
+
132
+ ## License and acknowledgments
133
+
134
+ MIT; see [LICENSE](LICENSE). Third-party components and their licenses are listed in
135
+ [THIRD_PARTY_NOTICES](THIRD_PARTY_NOTICES).
136
+
137
+ HEC-RAS is developed by the U.S. Army Corps of Engineers Hydrologic Engineering Center (HEC).
138
+ ras-commander-fast-preprocess is an independent open-source project; it is not affiliated
139
+ with, endorsed by or supported by HEC or USACE. If you use it in published work, please cite
140
+ RAS Commander: <https://rascommander.info/ras/cite/>.
141
+
@@ -0,0 +1,7 @@
1
+ ras_commander_fast_preprocess-0.1.0.data/scripts/ras-preprocess.exe,sha256=SPYFLIXKC6Y9pizXAwCCbbEF7Xl6vfYJ5qCXBni84H0,28136448
2
+ ras_commander_fast_preprocess-0.1.0.dist-info/METADATA,sha256=p-NKWULK1zGwdSugFRiCfqOLwoUFF_mQrSyGV1gRpLU,7951
3
+ ras_commander_fast_preprocess-0.1.0.dist-info/WHEEL,sha256=8Aej0W0a6Cz6apA3IzJrTnxLRVLAt-w0Oh8SA3Con_c,94
4
+ ras_commander_fast_preprocess-0.1.0.dist-info/licenses/LICENSE,sha256=T4YEPMP7tytAkdSFfcO5yCCbhdkW9w6B8rrAHXEEXVs,1100
5
+ ras_commander_fast_preprocess-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES,sha256=guQe-BT5fvWdVPc3rX8aWp-apTXMOkiwL_ZDzbnOAOk,52659
6
+ ras_commander_fast_preprocess-0.1.0.dist-info/sboms/ras-commander-fast-preprocess-cli.cyclonedx.json,sha256=OyMoGeCQpvBqTfE_WqmGpMvAnkAvzysQz36HARIexBI,233654
7
+ ras_commander_fast_preprocess-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.15.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 William M. Katzenmeyer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.