stream1d 0.1.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 (65) hide show
  1. stream1d-0.1.0/.gitattributes +2 -0
  2. stream1d-0.1.0/.githooks/pre-commit +4 -0
  3. stream1d-0.1.0/.github/workflows/ci.yml +26 -0
  4. stream1d-0.1.0/.github/workflows/publish.yml +118 -0
  5. stream1d-0.1.0/.gitignore +37 -0
  6. stream1d-0.1.0/Cargo.lock +588 -0
  7. stream1d-0.1.0/Cargo.toml +25 -0
  8. stream1d-0.1.0/LICENSE +21 -0
  9. stream1d-0.1.0/PKG-INFO +178 -0
  10. stream1d-0.1.0/README.md +164 -0
  11. stream1d-0.1.0/apt.txt +3 -0
  12. stream1d-0.1.0/build_wasm.sh +21 -0
  13. stream1d-0.1.0/codecov.yml +13 -0
  14. stream1d-0.1.0/docs/BRIDGE_INTERIOR_SECTIONS_API.md +170 -0
  15. stream1d-0.1.0/docs/development/publishing.md +33 -0
  16. stream1d-0.1.0/docs/development/testing.md +101 -0
  17. stream1d-0.1.0/docs/python/getting_started.md +169 -0
  18. stream1d-0.1.0/docs/reference/api_changelog.md +28 -0
  19. stream1d-0.1.0/docs/reference/equations.md +306 -0
  20. stream1d-0.1.0/docs/reference/hecras_parity.md +62 -0
  21. stream1d-0.1.0/docs/wasm_api.types.ts +506 -0
  22. stream1d-0.1.0/docs/web/wasm_body.txt +0 -0
  23. stream1d-0.1.0/docs/web/wasm_integration.md +225 -0
  24. stream1d-0.1.0/examples/wasm/bridge_smoke_test.mjs +46 -0
  25. stream1d-0.1.0/examples/wasm/node_smoke_test.mjs +40 -0
  26. stream1d-0.1.0/examples/wasm/steady_bridge_bu_bd_v22.json +64 -0
  27. stream1d-0.1.0/examples/wasm/worker_solve_steady.mjs +63 -0
  28. stream1d-0.1.0/postBuild +16 -0
  29. stream1d-0.1.0/pyproject.toml +27 -0
  30. stream1d-0.1.0/python/streams1d/__init__.py +656 -0
  31. stream1d-0.1.0/python/streams1d/import_utils.py +341 -0
  32. stream1d-0.1.0/python/streams1d_verification.ipynb +339 -0
  33. stream1d-0.1.0/python/test_hecras_culvert_verification.py +121 -0
  34. stream1d-0.1.0/python/test_python_bindings.py +138 -0
  35. stream1d-0.1.0/python/test_streams1d.py +423 -0
  36. stream1d-0.1.0/python/verification/ConSpan.csv +43 -0
  37. stream1d-0.1.0/python/verification/bridge_abutment_hecras.json +55 -0
  38. stream1d-0.1.0/python/verification/bridge_bu_bd_hecras.json +59 -0
  39. stream1d-0.1.0/python/verification/conspan_project_12.json +796 -0
  40. stream1d-0.1.0/python/verification/hecras_conspan_profiles.json +58 -0
  41. stream1d-0.1.0/requirements.txt +5 -0
  42. stream1d-0.1.0/scripts/install_git_hooks.sh +18 -0
  43. stream1d-0.1.0/scripts/run_coverage.sh +39 -0
  44. stream1d-0.1.0/src/geometry/ineffective_serde.rs +116 -0
  45. stream1d-0.1.0/src/geometry/mod.rs +7 -0
  46. stream1d-0.1.0/src/geometry/processor.rs +1132 -0
  47. stream1d-0.1.0/src/lib.rs +146 -0
  48. stream1d-0.1.0/src/solvers/bridge.rs +4252 -0
  49. stream1d-0.1.0/src/solvers/bridge_abutment.rs +542 -0
  50. stream1d-0.1.0/src/solvers/bridge_interior.rs +1079 -0
  51. stream1d-0.1.0/src/solvers/culvert.rs +2430 -0
  52. stream1d-0.1.0/src/solvers/junction.rs +427 -0
  53. stream1d-0.1.0/src/solvers/mod.rs +18 -0
  54. stream1d-0.1.0/src/solvers/steady.rs +2548 -0
  55. stream1d-0.1.0/src/solvers/unsteady.rs +2428 -0
  56. stream1d-0.1.0/src/utils.rs +256 -0
  57. stream1d-0.1.0/src/wasm_api.rs +397 -0
  58. stream1d-0.1.0/tech_spec.md +156 -0
  59. stream1d-0.1.0/tests/bridge_abutment_hecras_verification.rs +174 -0
  60. stream1d-0.1.0/tests/bridge_bu_bd_hecras_verification.rs +301 -0
  61. stream1d-0.1.0/tests/culvert_hecras_verification.rs +285 -0
  62. stream1d-0.1.0/tests/fixtures/culvert_point_benchmarks.json +97 -0
  63. stream1d-0.1.0/tests/fixtures/wasm_steady_bridge_bu_bd_v22.json +76 -0
  64. stream1d-0.1.0/tests/fixtures/wasm_steady_culvert_tier1.json +47 -0
  65. stream1d-0.1.0/tests/wasm_json_contract.rs +536 -0
@@ -0,0 +1,2 @@
1
+ *.sh text eol=lf
2
+ build_wasm.sh text eol=lf
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+ # Run coverage/tests before each commit (skipped when no Rust files are staged).
3
+ ROOT="$(git rev-parse --show-toplevel)"
4
+ exec "$ROOT/scripts/run_coverage.sh" --pre-commit
@@ -0,0 +1,26 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test-and-coverage:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: dtolnay/rust-toolchain@stable
15
+
16
+ - uses: taiki-e/install-action@cargo-llvm-cov
17
+
18
+ - name: Run tests with coverage
19
+ run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
20
+
21
+ - name: Upload coverage to Codecov
22
+ uses: codecov/codecov-action@v5
23
+ with:
24
+ token: ${{ secrets.CODECOV_TOKEN }}
25
+ files: lcov.info
26
+ fail_ci_if_error: false
@@ -0,0 +1,118 @@
1
+ # Publish Python wheels to PyPI (trusted publishing).
2
+ # PyPI trusted publisher: project stream1d, owner jlillywh, repo STREAM-1D, workflow publish.yml, environment pypi.
3
+ # Trigger: git tag v* && git push origin v*
4
+
5
+ name: Publish
6
+
7
+ on:
8
+ push:
9
+ tags:
10
+ - v*
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ linux:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ matrix:
21
+ target: [x86_64, aarch64]
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.x"
28
+
29
+ - name: Build wheels (Linux)
30
+ uses: PyO3/maturin-action@v1
31
+ with:
32
+ target: ${{ matrix.target }}
33
+ args: --release --out dist --features python
34
+ sccache: "true"
35
+ manylinux: auto
36
+
37
+ - uses: actions/upload-artifact@v4
38
+ with:
39
+ name: wheels-linux-${{ matrix.target }}
40
+ path: dist
41
+
42
+ windows:
43
+ runs-on: windows-latest
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+
47
+ - uses: actions/setup-python@v5
48
+ with:
49
+ python-version: "3.x"
50
+
51
+ - name: Build wheels (Windows)
52
+ uses: PyO3/maturin-action@v1
53
+ with:
54
+ args: --release --out dist --features python
55
+ sccache: "true"
56
+
57
+ - uses: actions/upload-artifact@v4
58
+ with:
59
+ name: wheels-windows
60
+ path: dist
61
+
62
+ macos:
63
+ runs-on: macos-latest
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+
67
+ - uses: actions/setup-python@v5
68
+ with:
69
+ python-version: "3.x"
70
+
71
+ - name: Build wheels (macOS)
72
+ uses: PyO3/maturin-action@v1
73
+ with:
74
+ args: --release --out dist --features python
75
+ sccache: "true"
76
+
77
+ - uses: actions/upload-artifact@v4
78
+ with:
79
+ name: wheels-macos
80
+ path: dist
81
+
82
+ sdist:
83
+ runs-on: ubuntu-latest
84
+ steps:
85
+ - uses: actions/checkout@v4
86
+
87
+ - name: Build sdist
88
+ uses: PyO3/maturin-action@v1
89
+ with:
90
+ command: sdist
91
+ args: --out dist
92
+
93
+ - uses: actions/upload-artifact@v4
94
+ with:
95
+ name: sdist
96
+ path: dist
97
+
98
+ publish:
99
+ name: Upload to PyPI
100
+ runs-on: ubuntu-latest
101
+ needs: [linux, windows, macos, sdist]
102
+ environment: pypi
103
+ permissions:
104
+ id-token: write
105
+ steps:
106
+ - uses: actions/download-artifact@v4
107
+ with:
108
+ pattern: wheels-*
109
+ merge-multiple: true
110
+ path: dist
111
+
112
+ - uses: actions/download-artifact@v4
113
+ with:
114
+ name: sdist
115
+ path: dist
116
+
117
+ - name: Publish to PyPI
118
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,37 @@
1
+ # ====================================================================
2
+ # STREAM-1D Core Engine Ignore Rules
3
+ # ====================================================================
4
+
5
+ # Ignore the lightweight local development server
6
+ server.mjs
7
+
8
+ # Ignore the vanilla HTML/JS benchmark dashboard files
9
+ index.html
10
+ worker.js
11
+
12
+ # Ignore performance screenshots or test recordings generated by subagents
13
+ *.png
14
+ *.mp4
15
+ *.mov
16
+ benchmark_results_*.png
17
+
18
+ # Coverage reports (generated in CI)
19
+ lcov.info
20
+ coverage/
21
+
22
+ # Standard Rust / Cargo build artifacts
23
+ /target/
24
+ **/*.rs.bk
25
+
26
+ # WebAssembly package output (if you plan to publish npm packages separately)
27
+ # Note: If your JS worker explicitly imports from /pkg inside this repo,
28
+ # you can track it, but usually, target files are ignored in the engine PR.
29
+ /pkg/
30
+ /pkg-node/
31
+
32
+ # Python-related build artifacts
33
+ __pycache__/
34
+ *.py[cod]
35
+ *$py.class
36
+ *.so
37
+ .venv/