openswmm 5.3.0.dev1__tar.gz → 6.0.0a4.dev1__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 (341) hide show
  1. openswmm-6.0.0a4.dev1/CMakeLists.txt +276 -0
  2. openswmm-6.0.0a4.dev1/CMakePresets.json +163 -0
  3. openswmm-6.0.0a4.dev1/LICENSE +203 -0
  4. openswmm-6.0.0a4.dev1/NOTICE +35 -0
  5. openswmm-6.0.0a4.dev1/PKG-INFO +281 -0
  6. openswmm-6.0.0a4.dev1/README.md +242 -0
  7. openswmm-6.0.0a4.dev1/cmake/CythonHelpers.cmake +226 -0
  8. openswmm-6.0.0a4.dev1/cmake/PatchNumpyPxd.cmake +116 -0
  9. openswmm-6.0.0a4.dev1/create_schema_review_db.py +451 -0
  10. openswmm-6.0.0a4.dev1/docs/Makefile +192 -0
  11. openswmm-6.0.0a4.dev1/docs/_static/openswmm.css +14 -0
  12. openswmm-6.0.0a4.dev1/docs/api.rst +366 -0
  13. openswmm-6.0.0a4.dev1/docs/conf.py +450 -0
  14. openswmm-6.0.0a4.dev1/docs/environment.yml +13 -0
  15. openswmm-6.0.0a4.dev1/docs/guide/2d.rst +367 -0
  16. openswmm-6.0.0a4.dev1/docs/guide/binding_updates.rst +74 -0
  17. openswmm-6.0.0a4.dev1/docs/guide/catalog.rst +126 -0
  18. openswmm-6.0.0a4.dev1/docs/guide/climate.rst +70 -0
  19. openswmm-6.0.0a4.dev1/docs/guide/concepts.rst +316 -0
  20. openswmm-6.0.0a4.dev1/docs/guide/controls.rst +116 -0
  21. openswmm-6.0.0a4.dev1/docs/guide/datetime.rst +157 -0
  22. openswmm-6.0.0a4.dev1/docs/guide/editing.rst +335 -0
  23. openswmm-6.0.0a4.dev1/docs/guide/error_handling.rst +257 -0
  24. openswmm-6.0.0a4.dev1/docs/guide/forcing.rst +134 -0
  25. openswmm-6.0.0a4.dev1/docs/guide/gages.rst +125 -0
  26. openswmm-6.0.0a4.dev1/docs/guide/geopackage.rst +133 -0
  27. openswmm-6.0.0a4.dev1/docs/guide/groundwater.rst +98 -0
  28. openswmm-6.0.0a4.dev1/docs/guide/heat.rst +234 -0
  29. openswmm-6.0.0a4.dev1/docs/guide/hotstart.rst +150 -0
  30. openswmm-6.0.0a4.dev1/docs/guide/index.rst +140 -0
  31. openswmm-6.0.0a4.dev1/docs/guide/inflows.rst +146 -0
  32. openswmm-6.0.0a4.dev1/docs/guide/infrastructure.rst +145 -0
  33. openswmm-6.0.0a4.dev1/docs/guide/initial_quality.rst +150 -0
  34. openswmm-6.0.0a4.dev1/docs/guide/install.rst +210 -0
  35. openswmm-6.0.0a4.dev1/docs/guide/links.rst +386 -0
  36. openswmm-6.0.0a4.dev1/docs/guide/massbalance.rst +127 -0
  37. openswmm-6.0.0a4.dev1/docs/guide/model_builder.rst +262 -0
  38. openswmm-6.0.0a4.dev1/docs/guide/native_safety.rst +59 -0
  39. openswmm-6.0.0a4.dev1/docs/guide/nodes.rst +356 -0
  40. openswmm-6.0.0a4.dev1/docs/guide/output_reader.rst +217 -0
  41. openswmm-6.0.0a4.dev1/docs/guide/plotting.rst +136 -0
  42. openswmm-6.0.0a4.dev1/docs/guide/pollutants.rst +112 -0
  43. openswmm-6.0.0a4.dev1/docs/guide/process_components.rst +147 -0
  44. openswmm-6.0.0a4.dev1/docs/guide/quality.rst +104 -0
  45. openswmm-6.0.0a4.dev1/docs/guide/quickstart.rst +206 -0
  46. openswmm-6.0.0a4.dev1/docs/guide/reactions.rst +203 -0
  47. openswmm-6.0.0a4.dev1/docs/guide/solver.rst +413 -0
  48. openswmm-6.0.0a4.dev1/docs/guide/spatial.rst +128 -0
  49. openswmm-6.0.0a4.dev1/docs/guide/statistics.rst +116 -0
  50. openswmm-6.0.0a4.dev1/docs/guide/subcatchments.rst +299 -0
  51. openswmm-6.0.0a4.dev1/docs/guide/surface_quality.rst +35 -0
  52. openswmm-6.0.0a4.dev1/docs/guide/tables.rst +160 -0
  53. openswmm-6.0.0a4.dev1/docs/guide/transport.rst +55 -0
  54. openswmm-6.0.0a4.dev1/docs/guide/water_age.rst +146 -0
  55. openswmm-6.0.0a4.dev1/docs/guide/xsect_geometry.rst +233 -0
  56. openswmm-6.0.0a4.dev1/docs/images/hydrocouple_logo.png +0 -0
  57. openswmm-6.0.0a4.dev1/docs/index.rst +151 -0
  58. openswmm-6.0.0a4.dev1/docs/legacy/index.rst +65 -0
  59. openswmm-6.0.0a4.dev1/docs/legacy/output.rst +250 -0
  60. openswmm-6.0.0a4.dev1/docs/legacy/solver.rst +349 -0
  61. openswmm-6.0.0a4.dev1/docs/license.rst +18 -0
  62. openswmm-6.0.0a4.dev1/docs/make.bat +263 -0
  63. openswmm-6.0.0a4.dev1/docs/migration/swmm5_to_swmm6.rst +530 -0
  64. openswmm-6.0.0a4.dev1/docs/requirements.txt +7 -0
  65. openswmm-6.0.0a4.dev1/generate_geopackage_erd.py +1008 -0
  66. openswmm-6.0.0a4.dev1/openswmm/CMakeLists.txt +113 -0
  67. openswmm-6.0.0a4.dev1/openswmm/__init__.py +174 -0
  68. openswmm-6.0.0a4.dev1/openswmm/engine/CMakeLists.txt +84 -0
  69. openswmm-6.0.0a4.dev1/openswmm/engine/_2d.pxd +199 -0
  70. openswmm-6.0.0a4.dev1/openswmm/engine/_2d.pyi +1206 -0
  71. openswmm-6.0.0a4.dev1/openswmm/engine/_2d.pyx +2063 -0
  72. openswmm-6.0.0a4.dev1/openswmm/engine/__init__.pxd +22 -0
  73. openswmm-6.0.0a4.dev1/openswmm/engine/__init__.py +439 -0
  74. openswmm-6.0.0a4.dev1/openswmm/engine/__init__.pyi +234 -0
  75. openswmm-6.0.0a4.dev1/openswmm/engine/_access.py +154 -0
  76. openswmm-6.0.0a4.dev1/openswmm/engine/_climate.pyi +50 -0
  77. openswmm-6.0.0a4.dev1/openswmm/engine/_climate.pyx +388 -0
  78. openswmm-6.0.0a4.dev1/openswmm/engine/_common.pxd +1585 -0
  79. openswmm-6.0.0a4.dev1/openswmm/engine/_controls.pyi +30 -0
  80. openswmm-6.0.0a4.dev1/openswmm/engine/_controls.pyx +256 -0
  81. openswmm-6.0.0a4.dev1/openswmm/engine/_dates.py +66 -0
  82. openswmm-6.0.0a4.dev1/openswmm/engine/_dates.pyi +12 -0
  83. openswmm-6.0.0a4.dev1/openswmm/engine/_datetime.pyi +15 -0
  84. openswmm-6.0.0a4.dev1/openswmm/engine/_datetime.pyx +106 -0
  85. openswmm-6.0.0a4.dev1/openswmm/engine/_edit.pyi +609 -0
  86. openswmm-6.0.0a4.dev1/openswmm/engine/_edit.pyx +1497 -0
  87. openswmm-6.0.0a4.dev1/openswmm/engine/_enums.py +1580 -0
  88. openswmm-6.0.0a4.dev1/openswmm/engine/_enums.pyi +1265 -0
  89. openswmm-6.0.0a4.dev1/openswmm/engine/_exceptions.py +239 -0
  90. openswmm-6.0.0a4.dev1/openswmm/engine/_exceptions.pyi +32 -0
  91. openswmm-6.0.0a4.dev1/openswmm/engine/_forcing.pyi +84 -0
  92. openswmm-6.0.0a4.dev1/openswmm/engine/_forcing.pyx +483 -0
  93. openswmm-6.0.0a4.dev1/openswmm/engine/_gages.pyi +85 -0
  94. openswmm-6.0.0a4.dev1/openswmm/engine/_gages.pyx +473 -0
  95. openswmm-6.0.0a4.dev1/openswmm/engine/_geometry.py +170 -0
  96. openswmm-6.0.0a4.dev1/openswmm/engine/_geopackage.pyi +441 -0
  97. openswmm-6.0.0a4.dev1/openswmm/engine/_geopackage.pyx +665 -0
  98. openswmm-6.0.0a4.dev1/openswmm/engine/_groundwater.pyi +76 -0
  99. openswmm-6.0.0a4.dev1/openswmm/engine/_groundwater.pyx +274 -0
  100. openswmm-6.0.0a4.dev1/openswmm/engine/_gw_transport.pyi +121 -0
  101. openswmm-6.0.0a4.dev1/openswmm/engine/_gw_transport.pyx +366 -0
  102. openswmm-6.0.0a4.dev1/openswmm/engine/_heat.pyi +107 -0
  103. openswmm-6.0.0a4.dev1/openswmm/engine/_heat.pyx +827 -0
  104. openswmm-6.0.0a4.dev1/openswmm/engine/_hotstart.pyi +78 -0
  105. openswmm-6.0.0a4.dev1/openswmm/engine/_hotstart.pyx +338 -0
  106. openswmm-6.0.0a4.dev1/openswmm/engine/_inflows.pyi +125 -0
  107. openswmm-6.0.0a4.dev1/openswmm/engine/_inflows.pyx +545 -0
  108. openswmm-6.0.0a4.dev1/openswmm/engine/_infrastructure.pyi +168 -0
  109. openswmm-6.0.0a4.dev1/openswmm/engine/_infrastructure.pyx +1075 -0
  110. openswmm-6.0.0a4.dev1/openswmm/engine/_initial_quality.pyi +39 -0
  111. openswmm-6.0.0a4.dev1/openswmm/engine/_initial_quality.pyx +254 -0
  112. openswmm-6.0.0a4.dev1/openswmm/engine/_links.pyi +196 -0
  113. openswmm-6.0.0a4.dev1/openswmm/engine/_links.pyx +1206 -0
  114. openswmm-6.0.0a4.dev1/openswmm/engine/_massbalance.pyi +45 -0
  115. openswmm-6.0.0a4.dev1/openswmm/engine/_massbalance.pyx +171 -0
  116. openswmm-6.0.0a4.dev1/openswmm/engine/_model.pyi +626 -0
  117. openswmm-6.0.0a4.dev1/openswmm/engine/_model.pyx +988 -0
  118. openswmm-6.0.0a4.dev1/openswmm/engine/_nodes.pyi +160 -0
  119. openswmm-6.0.0a4.dev1/openswmm/engine/_nodes.pyx +1079 -0
  120. openswmm-6.0.0a4.dev1/openswmm/engine/_output_reader.pyi +134 -0
  121. openswmm-6.0.0a4.dev1/openswmm/engine/_output_reader.pyx +630 -0
  122. openswmm-6.0.0a4.dev1/openswmm/engine/_pollutants.pyi +46 -0
  123. openswmm-6.0.0a4.dev1/openswmm/engine/_pollutants.pyx +372 -0
  124. openswmm-6.0.0a4.dev1/openswmm/engine/_process_components.pyi +38 -0
  125. openswmm-6.0.0a4.dev1/openswmm/engine/_process_components.pyx +269 -0
  126. openswmm-6.0.0a4.dev1/openswmm/engine/_quality.pyi +55 -0
  127. openswmm-6.0.0a4.dev1/openswmm/engine/_quality.pyx +317 -0
  128. openswmm-6.0.0a4.dev1/openswmm/engine/_reactions.pyi +144 -0
  129. openswmm-6.0.0a4.dev1/openswmm/engine/_reactions.pyx +1106 -0
  130. openswmm-6.0.0a4.dev1/openswmm/engine/_report.py +482 -0
  131. openswmm-6.0.0a4.dev1/openswmm/engine/_solver.pxd +70 -0
  132. openswmm-6.0.0a4.dev1/openswmm/engine/_solver.pyi +461 -0
  133. openswmm-6.0.0a4.dev1/openswmm/engine/_solver.pyx +1898 -0
  134. openswmm-6.0.0a4.dev1/openswmm/engine/_spatial.pyi +41 -0
  135. openswmm-6.0.0a4.dev1/openswmm/engine/_spatial.pyx +253 -0
  136. openswmm-6.0.0a4.dev1/openswmm/engine/_statistics.pyi +88 -0
  137. openswmm-6.0.0a4.dev1/openswmm/engine/_statistics.pyx +358 -0
  138. openswmm-6.0.0a4.dev1/openswmm/engine/_subcatchments.pyi +246 -0
  139. openswmm-6.0.0a4.dev1/openswmm/engine/_subcatchments.pyx +1479 -0
  140. openswmm-6.0.0a4.dev1/openswmm/engine/_surface_quality.pyi +48 -0
  141. openswmm-6.0.0a4.dev1/openswmm/engine/_surface_quality.pyx +169 -0
  142. openswmm-6.0.0a4.dev1/openswmm/engine/_tables.pyi +84 -0
  143. openswmm-6.0.0a4.dev1/openswmm/engine/_tables.pyx +543 -0
  144. openswmm-6.0.0a4.dev1/openswmm/engine/_transport.pyi +51 -0
  145. openswmm-6.0.0a4.dev1/openswmm/engine/_transport.pyx +211 -0
  146. openswmm-6.0.0a4.dev1/openswmm/engine/_water_age.pyi +48 -0
  147. openswmm-6.0.0a4.dev1/openswmm/engine/_water_age.pyx +360 -0
  148. openswmm-6.0.0a4.dev1/openswmm/engine/_xsect.pyi +140 -0
  149. openswmm-6.0.0a4.dev1/openswmm/engine/_xsect.pyx +526 -0
  150. openswmm-6.0.0a4.dev1/openswmm/engine/catalog.json +23433 -0
  151. openswmm-6.0.0a4.dev1/openswmm/engine/catalog.py +155 -0
  152. openswmm-6.0.0a4.dev1/openswmm/legacy/CMakeLists.txt +3 -0
  153. openswmm-6.0.0a4.dev1/openswmm/legacy/__init__.py +13 -0
  154. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/CMakeLists.txt +14 -0
  155. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/__init__.py +46 -0
  156. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/_forcing_log.py +97 -0
  157. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/_links.py +267 -0
  158. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/_nodes.py +244 -0
  159. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/_raingages.py +122 -0
  160. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/_solver.c +33790 -0
  161. {openswmm-5.3.0.dev1/openswmm/solver → openswmm-6.0.0a4.dev1/openswmm/legacy/engine}/_solver.pyi +364 -46
  162. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/_solver.pyx +2332 -0
  163. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/_subcatchments.py +468 -0
  164. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/_system.py +281 -0
  165. openswmm-6.0.0a4.dev1/openswmm/legacy/engine/solver.pxd +584 -0
  166. openswmm-6.0.0a4.dev1/openswmm/legacy/output/CMakeLists.txt +11 -0
  167. openswmm-6.0.0a4.dev1/openswmm/legacy/output/__init__.py +24 -0
  168. {openswmm-5.3.0.dev1/openswmm → openswmm-6.0.0a4.dev1/openswmm/legacy}/output/_output.pyi +9 -4
  169. {openswmm-5.3.0.dev1/openswmm → openswmm-6.0.0a4.dev1/openswmm/legacy}/output/_output.pyx +1 -1
  170. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/openswmm/output/CMakeLists.txt +11 -13
  171. openswmm-6.0.0a4.dev1/openswmm/output/__init__.pxd +1 -0
  172. openswmm-6.0.0a4.dev1/openswmm/output/__init__.py +49 -0
  173. openswmm-6.0.0a4.dev1/openswmm/output/_output.pyi +848 -0
  174. openswmm-6.0.0a4.dev1/openswmm/output/_output.pyx +1665 -0
  175. openswmm-6.0.0a4.dev1/openswmm/output/output.pxd +368 -0
  176. openswmm-6.0.0a4.dev1/openswmm/solver/CMakeLists.txt +51 -0
  177. openswmm-6.0.0a4.dev1/openswmm/solver/__init__.pxd +1 -0
  178. openswmm-6.0.0a4.dev1/openswmm/solver/__init__.py +57 -0
  179. openswmm-6.0.0a4.dev1/openswmm/solver/_solver.pyi +1314 -0
  180. openswmm-6.0.0a4.dev1/openswmm/solver/_solver.pyx +1912 -0
  181. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/openswmm/solver/solver.pxd +1 -1
  182. openswmm-6.0.0a4.dev1/pyproject.toml +404 -0
  183. openswmm-6.0.0a4.dev1/requirements.txt +14 -0
  184. openswmm-6.0.0a4.dev1/scripts/api_drift_audit.py +241 -0
  185. openswmm-6.0.0a4.dev1/scripts/catalog_overrides.json +182 -0
  186. openswmm-6.0.0a4.dev1/scripts/cibw_repair_windows.py +98 -0
  187. openswmm-6.0.0a4.dev1/scripts/clean.sh +78 -0
  188. openswmm-6.0.0a4.dev1/scripts/gen_catalog.py +767 -0
  189. openswmm-6.0.0a4.dev1/scripts/stage_python_sources.py +22 -0
  190. openswmm-6.0.0a4.dev1/scripts/test_staged_package.py +30 -0
  191. openswmm-6.0.0a4.dev1/smoke_test.py +239 -0
  192. openswmm-6.0.0a4.dev1/tests/_paths.py +38 -0
  193. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/tests/data/solver/__init__.py +7 -0
  194. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/tests/data/solver/non_existent_input_file.rpt +32 -33
  195. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example.out +0 -0
  196. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example.rpt +2386 -0
  197. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_link.out +0 -0
  198. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_link.rpt +11376 -0
  199. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_node.out +0 -0
  200. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_node.rpt +11376 -0
  201. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_outfall.out +0 -0
  202. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_outfall.rpt +11376 -0
  203. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_routing.out +0 -0
  204. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_routing.rpt +11376 -0
  205. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_runoff.out +0 -0
  206. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_runoff.rpt +11376 -0
  207. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_subcatch.out +0 -0
  208. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_example_subcatch.rpt +11376 -0
  209. openswmm-6.0.0a4.dev1/tests/data/solver/site_drainage_snow.inp +518 -0
  210. openswmm-6.0.0a4.dev1/tests/engine/__init__.py +2 -0
  211. openswmm-6.0.0a4.dev1/tests/engine/_groundwater_cases.py +63 -0
  212. openswmm-6.0.0a4.dev1/tests/engine/_solver_cases.py +114 -0
  213. openswmm-6.0.0a4.dev1/tests/engine/test_2d_evap.py +116 -0
  214. openswmm-6.0.0a4.dev1/tests/engine/test_2d_ts_stage.py +237 -0
  215. openswmm-6.0.0a4.dev1/tests/engine/test_aquifers_pythonic.py +123 -0
  216. openswmm-6.0.0a4.dev1/tests/engine/test_binding_completion.py +212 -0
  217. openswmm-6.0.0a4.dev1/tests/engine/test_callbacks_and_xsect.py +89 -0
  218. openswmm-6.0.0a4.dev1/tests/engine/test_climate_pythonic.py +100 -0
  219. openswmm-6.0.0a4.dev1/tests/engine/test_common.py +242 -0
  220. openswmm-6.0.0a4.dev1/tests/engine/test_concurrent_simulation.py +225 -0
  221. openswmm-6.0.0a4.dev1/tests/engine/test_controls_advancement.py +105 -0
  222. openswmm-6.0.0a4.dev1/tests/engine/test_controls_inflows.py +32 -0
  223. openswmm-6.0.0a4.dev1/tests/engine/test_controls_references.py +87 -0
  224. openswmm-6.0.0a4.dev1/tests/engine/test_edit.py +446 -0
  225. openswmm-6.0.0a4.dev1/tests/engine/test_edit_extended.py +129 -0
  226. openswmm-6.0.0a4.dev1/tests/engine/test_editor_roundtrip.py +137 -0
  227. openswmm-6.0.0a4.dev1/tests/engine/test_enums.py +393 -0
  228. openswmm-6.0.0a4.dev1/tests/engine/test_files_iface_gaps.py +183 -0
  229. openswmm-6.0.0a4.dev1/tests/engine/test_forcing_climate.py +217 -0
  230. openswmm-6.0.0a4.dev1/tests/engine/test_forcing_climate_evap.py +133 -0
  231. openswmm-6.0.0a4.dev1/tests/engine/test_forcing_pet.py +257 -0
  232. openswmm-6.0.0a4.dev1/tests/engine/test_forcing_quality.py +188 -0
  233. openswmm-6.0.0a4.dev1/tests/engine/test_forcing_snow.py +163 -0
  234. openswmm-6.0.0a4.dev1/tests/engine/test_gages_pythonic.py +187 -0
  235. openswmm-6.0.0a4.dev1/tests/engine/test_geopackage.py +308 -0
  236. openswmm-6.0.0a4.dev1/tests/engine/test_geopackage_export.py +115 -0
  237. openswmm-6.0.0a4.dev1/tests/engine/test_groundwater.py +92 -0
  238. openswmm-6.0.0a4.dev1/tests/engine/test_heat.py +587 -0
  239. openswmm-6.0.0a4.dev1/tests/engine/test_hotstart_pythonic.py +125 -0
  240. openswmm-6.0.0a4.dev1/tests/engine/test_iface_routing.py +178 -0
  241. openswmm-6.0.0a4.dev1/tests/engine/test_initial_quality.py +295 -0
  242. openswmm-6.0.0a4.dev1/tests/engine/test_inlet_api.py +119 -0
  243. openswmm-6.0.0a4.dev1/tests/engine/test_integration.py +146 -0
  244. openswmm-6.0.0a4.dev1/tests/engine/test_lenient_open.py +138 -0
  245. openswmm-6.0.0a4.dev1/tests/engine/test_links_pythonic.py +344 -0
  246. openswmm-6.0.0a4.dev1/tests/engine/test_mass_balance_pythonic.py +60 -0
  247. openswmm-6.0.0a4.dev1/tests/engine/test_metadata_bindings.py +106 -0
  248. openswmm-6.0.0a4.dev1/tests/engine/test_model_builder.py +282 -0
  249. openswmm-6.0.0a4.dev1/tests/engine/test_model_file_paths.py +43 -0
  250. openswmm-6.0.0a4.dev1/tests/engine/test_native_safety.py +154 -0
  251. openswmm-6.0.0a4.dev1/tests/engine/test_new_binding_stubs.py +29 -0
  252. openswmm-6.0.0a4.dev1/tests/engine/test_new_domain_tables.py +132 -0
  253. openswmm-6.0.0a4.dev1/tests/engine/test_nodes_pythonic.py +306 -0
  254. openswmm-6.0.0a4.dev1/tests/engine/test_opened_state_editing.py +118 -0
  255. openswmm-6.0.0a4.dev1/tests/engine/test_optional_imports.py +39 -0
  256. openswmm-6.0.0a4.dev1/tests/engine/test_output_reader_pythonic.py +269 -0
  257. openswmm-6.0.0a4.dev1/tests/engine/test_output_species_ids.py +157 -0
  258. openswmm-6.0.0a4.dev1/tests/engine/test_p7_pythonic.py +286 -0
  259. openswmm-6.0.0a4.dev1/tests/engine/test_p8_pythonic.py +154 -0
  260. openswmm-6.0.0a4.dev1/tests/engine/test_param_runtime.py +609 -0
  261. openswmm-6.0.0a4.dev1/tests/engine/test_process_components.py +295 -0
  262. openswmm-6.0.0a4.dev1/tests/engine/test_quality_editing.py +186 -0
  263. openswmm-6.0.0a4.dev1/tests/engine/test_rdii_advancement.py +340 -0
  264. openswmm-6.0.0a4.dev1/tests/engine/test_reactions.py +697 -0
  265. openswmm-6.0.0a4.dev1/tests/engine/test_runoff_interface.py +176 -0
  266. openswmm-6.0.0a4.dev1/tests/engine/test_snowpacks_pythonic.py +89 -0
  267. openswmm-6.0.0a4.dev1/tests/engine/test_solver.py +275 -0
  268. openswmm-6.0.0a4.dev1/tests/engine/test_solver_introspection.py +57 -0
  269. openswmm-6.0.0a4.dev1/tests/engine/test_solver_pythonic.py +322 -0
  270. openswmm-6.0.0a4.dev1/tests/engine/test_solver_units.py +119 -0
  271. openswmm-6.0.0a4.dev1/tests/engine/test_state_injection.py +174 -0
  272. openswmm-6.0.0a4.dev1/tests/engine/test_statistics_pythonic.py +84 -0
  273. openswmm-6.0.0a4.dev1/tests/engine/test_storage_shapes_pythonic.py +184 -0
  274. openswmm-6.0.0a4.dev1/tests/engine/test_streets_params.py +36 -0
  275. openswmm-6.0.0a4.dev1/tests/engine/test_subcatchments_pythonic.py +227 -0
  276. openswmm-6.0.0a4.dev1/tests/engine/test_surface2d_run_stats.py +82 -0
  277. openswmm-6.0.0a4.dev1/tests/engine/test_surface2d_view.py +138 -0
  278. openswmm-6.0.0a4.dev1/tests/engine/test_transects_pythonic.py +112 -0
  279. openswmm-6.0.0a4.dev1/tests/engine/test_transport.py +90 -0
  280. openswmm-6.0.0a4.dev1/tests/engine/test_userflags_schema.py +250 -0
  281. openswmm-6.0.0a4.dev1/tests/engine/test_water_age.py +290 -0
  282. openswmm-6.0.0a4.dev1/tests/engine/test_workflow.py +96 -0
  283. openswmm-6.0.0a4.dev1/tests/engine/test_xsect_geometry.py +595 -0
  284. openswmm-6.0.0a4.dev1/tests/engine/verify_geopackage_c_api.cpp +495 -0
  285. openswmm-6.0.0a4.dev1/tests/engine/verify_geopackage_c_api.sh +90 -0
  286. openswmm-6.0.0a4.dev1/tests/legacy/__init__.py +3 -0
  287. openswmm-6.0.0a4.dev1/tests/legacy/output/b8_aq_probe.inp +2762 -0
  288. openswmm-6.0.0a4.dev1/tests/legacy/test_output.py +339 -0
  289. openswmm-6.0.0a4.dev1/tests/legacy/test_param_runtime.py +418 -0
  290. openswmm-6.0.0a4.dev1/tests/legacy/test_phase1_enum_coverage.py +478 -0
  291. openswmm-6.0.0a4.dev1/tests/legacy/test_phase2_statistics.py +357 -0
  292. openswmm-6.0.0a4.dev1/tests/legacy/test_phase3_oop_wrappers.py +514 -0
  293. openswmm-6.0.0a4.dev1/tests/legacy/test_quality_sources.py +283 -0
  294. openswmm-6.0.0a4.dev1/tests/legacy/test_snow_api.py +117 -0
  295. openswmm-6.0.0a4.dev1/tests/legacy/test_solver.py +356 -0
  296. openswmm-6.0.0a4.dev1/tests/legacy/test_subcatch_api_pet.py +281 -0
  297. openswmm-6.0.0a4.dev1/tests/legacy/test_system_api_climate.py +107 -0
  298. openswmm-6.0.0a4.dev1/tests/minimal_features.py +23 -0
  299. openswmm-6.0.0a4.dev1/tests/test_2d_marcher_options.py +225 -0
  300. openswmm-6.0.0a4.dev1/tests/test_2d_triangle_coupling.py +144 -0
  301. openswmm-6.0.0a4.dev1/tests/test_2d_triangle_initial_state.py +147 -0
  302. openswmm-6.0.0a4.dev1/tests/test_api_coverage.py +228 -0
  303. openswmm-6.0.0a4.dev1/tests/test_catalog.py +165 -0
  304. openswmm-6.0.0a4.dev1/tests/test_enum_drift.py +67 -0
  305. openswmm-6.0.0a4.dev1/tests/test_fv_routing_options.py +237 -0
  306. openswmm-6.0.0a4.dev1/tests/test_pet_parity.py +167 -0
  307. openswmm-6.0.0a4.dev1/tests/test_solver_pxd_attrs.py +108 -0
  308. openswmm-6.0.0a4.dev1/tests/typing/__init__.py +0 -0
  309. openswmm-6.0.0a4.dev1/tests/typing/test_surface.py +601 -0
  310. openswmm-5.3.0.dev1/LICENSE +0 -12
  311. openswmm-5.3.0.dev1/MANIFEST.in +0 -32
  312. openswmm-5.3.0.dev1/PKG-INFO +0 -235
  313. openswmm-5.3.0.dev1/README.md +0 -183
  314. openswmm-5.3.0.dev1/openswmm/CMakeLists.txt +0 -31
  315. openswmm-5.3.0.dev1/openswmm/__init__.py +0 -42
  316. openswmm-5.3.0.dev1/openswmm/_openswmm.pyx +0 -12
  317. openswmm-5.3.0.dev1/openswmm/openswmm.pxd +0 -10
  318. openswmm-5.3.0.dev1/openswmm/output/__init__.py +0 -13
  319. openswmm-5.3.0.dev1/openswmm/solver/CMakeLists.txt +0 -50
  320. openswmm-5.3.0.dev1/openswmm/solver/__init__.py +0 -22
  321. openswmm-5.3.0.dev1/openswmm/solver/_solver.pyx +0 -1646
  322. openswmm-5.3.0.dev1/openswmm.egg-info/SOURCES.txt +0 -36
  323. openswmm-5.3.0.dev1/pyproject.toml +0 -79
  324. openswmm-5.3.0.dev1/setup.cfg +0 -4
  325. openswmm-5.3.0.dev1/setup.py +0 -97
  326. openswmm-5.3.0.dev1/tests/.DS_Store +0 -0
  327. openswmm-5.3.0.dev1/tests/data/.DS_Store +0 -0
  328. openswmm-5.3.0.dev1/tests/data/solver/site_drainage_example.rpt +0 -354
  329. openswmm-5.3.0.dev1/tests/test_swmm_solver.py +0 -716
  330. openswmm-5.3.0.dev1/tests/test_swwm_output.py +0 -1048
  331. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/openswmm/data/__init__.py +0 -0
  332. {openswmm-5.3.0.dev1/openswmm/solver → openswmm-6.0.0a4.dev1/openswmm/legacy/engine}/__init__.pxd +0 -0
  333. {openswmm-5.3.0.dev1/openswmm → openswmm-6.0.0a4.dev1/openswmm/legacy}/output/__init__.pxd +0 -0
  334. {openswmm-5.3.0.dev1/openswmm → openswmm-6.0.0a4.dev1/openswmm/legacy}/output/output.pxd +0 -0
  335. /openswmm-5.3.0.dev1/openswmm/gym/__init__.py → /openswmm-6.0.0a4.dev1/openswmm/py.typed +0 -0
  336. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/tests/__init__.py +0 -0
  337. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/tests/data/__init__.py +0 -0
  338. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/tests/data/output/__init__.py +0 -0
  339. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/tests/data/output/example_output_1.out +0 -0
  340. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/tests/data/output/json_time_series.pickle +0 -0
  341. {openswmm-5.3.0.dev1 → openswmm-6.0.0a4.dev1}/tests/data/solver/site_drainage_example.inp +0 -0
@@ -0,0 +1,276 @@
1
+ # ============================================================================
2
+ # CMake entry point for the openswmm Python package (scikit-build-core)
3
+ #
4
+ # Invoked by `pip install .`, `pip install -e .`, or `python -m build`.
5
+ # Responsibilities:
6
+ # 1. Resolve the OpenSWMM engine (pre-built CI or from-source local dev).
7
+ # 2. Find Python, locate Cython, and discover NumPy include paths.
8
+ # 3. Include cmake/CythonHelpers.cmake (shared directives + helpers).
9
+ # 4. Delegate extension builds to openswmm/CMakeLists.txt.
10
+ # ============================================================================
11
+
12
+ cmake_minimum_required(VERSION 3.24)
13
+
14
+ # ============================================================================
15
+ # Source-distribution guard: the sdist on PyPI is metadata-only and does NOT
16
+ # carry the OpenSWMM C/C++ engine source tree. Detect that we have neither a
17
+ # pre-built engine prefix nor the parent project's CMakeLists.txt reachable
18
+ # via add_subdirectory(..) and fail with a clear, actionable error rather
19
+ # than letting vcpkg or the C compiler emit a confusing one. Without this
20
+ # guard, a stray VCPKG_ROOT in the user's environment causes the auto-load
21
+ # block below to fire and vcpkg then tries to read a vcpkg.json next to the
22
+ # unpacked sdist that does not exist.
23
+ # ============================================================================
24
+ if(NOT DEFINED OPENSWMM_ENGINE_INSTALL_PREFIX
25
+ AND NOT DEFINED ENV{OPENSWMM_ENGINE_INSTALL_PREFIX}
26
+ AND NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt")
27
+ message(FATAL_ERROR
28
+ "openswmm cannot be built from this source distribution: the sdist "
29
+ "does not bundle the OpenSWMM C/C++ engine sources, and no pre-built "
30
+ "engine was supplied via -DOPENSWMM_ENGINE_INSTALL_PREFIX=<path>.\n"
31
+ "\n"
32
+ "Install a pre-built wheel instead:\n"
33
+ " python -m pip install openswmm\n"
34
+ "\n"
35
+ "Wheels are published for Python 3.10-3.13 on Linux x86_64 and "
36
+ "aarch64 (manylinux and musllinux), macOS 11+ (arm64 and x86_64), "
37
+ "and Windows x64. If pip fell back to this "
38
+ "sdist, no wheel matched your platform/interpreter -- check the "
39
+ "available files at https://pypi.org/project/openswmm/#files and, "
40
+ "if needed, switch to a supported Python version.\n"
41
+ "\n"
42
+ "Source builds are supported only from a full git checkout of the "
43
+ "openswmm.engine repository:\n"
44
+ " git clone https://github.com/hydrocouple/openswmm.engine\n"
45
+ " cd openswmm.engine/python\n"
46
+ " pip install . --no-build-isolation")
47
+ endif()
48
+
49
+ # ============================================================================
50
+ # vcpkg manifest directory: the vcpkg.json lives one directory above python/.
51
+ # Set VCPKG_MANIFEST_DIR before project() so vcpkg's toolchain file sees it.
52
+ # Users who install without vcpkg (e.g. system-lib builds) can ignore this.
53
+ # ============================================================================
54
+ if(NOT DEFINED CACHE{VCPKG_MANIFEST_DIR})
55
+ set(VCPKG_MANIFEST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.."
56
+ CACHE PATH "Directory containing vcpkg.json" FORCE)
57
+ endif()
58
+
59
+ # ============================================================================
60
+ # Base wheel builds the Kokkos-OpenMP plugin, like every other build.
61
+ #
62
+ # The engine's vcpkg.json lists "gpu" in default-features (pulling Kokkos) and
63
+ # OPENSWMM_BUILD_GPU_PLUGIN defaults ON. The wheel follows that default rather
64
+ # than opting out of it: OpenMP acceleration of the 2D surface solver is a
65
+ # shipped default everywhere, not something a user has to go and find.
66
+ #
67
+ # The `openswmm-gpu-omp` companion wheel (packages/gpu-omp/) still exists and
68
+ # still builds the same plugin — it remains the way to add or refresh the
69
+ # plugin against an already-installed base. Both copies are the same artifact
70
+ # from the same source; the discovery shim in openswmm/__init__.py prefers the
71
+ # in-wheel one, so exactly one is ever dlopen()ed (see the note there about
72
+ # OpenMP runtimes).
73
+ #
74
+ # The features are still pinned explicitly rather than left to
75
+ # default-features, so the wheel's dependency set is stated here and does not
76
+ # silently follow a future edit of vcpkg.json.
77
+ # ============================================================================
78
+ if(NOT DEFINED CACHE{VCPKG_MANIFEST_NO_DEFAULT_FEATURES})
79
+ set(VCPKG_MANIFEST_NO_DEFAULT_FEATURES ON CACHE BOOL
80
+ "Wheel states its vcpkg features explicitly instead of following default-features" FORCE)
81
+ endif()
82
+ if(NOT DEFINED CACHE{VCPKG_MANIFEST_FEATURES})
83
+ # 2d → HDF5 for the CF-1.11/UGRID output of the explicit marcher (the only
84
+ # 2D integrator since the D2 retirement — no SUNDIALS, no hypre).
85
+ # gpu → Kokkos, for the OpenMP surface-solver plugin built below.
86
+ set(VCPKG_MANIFEST_FEATURES "2d;gpu" CACHE STRING
87
+ "Explicit vcpkg features for the base wheel (2d, gpu)" FORCE)
88
+ endif()
89
+
90
+ # Auto-load vcpkg toolchain when VCPKG_ROOT is set in the environment.
91
+ # Must be done before project() so the toolchain is processed at language
92
+ # enable time. Users can override by passing -DCMAKE_TOOLCHAIN_FILE=...
93
+ # on the command line or via CMAKE_ARGS / SKBUILD_CMAKE_ARGS.
94
+ if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{VCPKG_ROOT})
95
+ set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
96
+ CACHE PATH "vcpkg toolchain file (auto-detected from VCPKG_ROOT)")
97
+ message(STATUS "openswmm-python: auto-loaded vcpkg toolchain from $ENV{VCPKG_ROOT}")
98
+ endif()
99
+
100
+ project(
101
+ openswmm-python
102
+ VERSION 6.0.0
103
+ LANGUAGES C CXX
104
+ )
105
+
106
+ # ============================================================================
107
+ # 1. Engine library: find_package (CI pre-built) OR add_subdirectory (local)
108
+ # ============================================================================
109
+ if(NOT DEFINED OPENSWMM_ENGINE_INSTALL_PREFIX
110
+ AND DEFINED ENV{OPENSWMM_ENGINE_INSTALL_PREFIX})
111
+ set(OPENSWMM_ENGINE_INSTALL_PREFIX "$ENV{OPENSWMM_ENGINE_INSTALL_PREFIX}"
112
+ CACHE PATH "Install prefix of a pre-built OpenSWMM engine")
113
+ endif()
114
+
115
+ if(OPENSWMM_ENGINE_INSTALL_PREFIX)
116
+ message(STATUS "openswmm-python: using pre-built engine from ${OPENSWMM_ENGINE_INSTALL_PREFIX}")
117
+ set(OPENSWMM_USE_PREBUILT_ENGINE TRUE CACHE BOOL "" FORCE)
118
+
119
+ find_package(OpenSWMMEngine CONFIG REQUIRED
120
+ PATHS "${OPENSWMM_ENGINE_INSTALL_PREFIX}"
121
+ NO_DEFAULT_PATH
122
+ )
123
+
124
+ # Provide openswmm:: ALIAS names consumed by all sub-CMakeLists.
125
+ add_library(openswmm::engine ALIAS OpenSWMMEngine::openswmm_engine)
126
+ add_library(openswmm::legacy::engine ALIAS OpenSWMMEngine::openswmm_legacy_engine)
127
+ add_library(openswmm::legacy::output ALIAS OpenSWMMEngine::openswmm_legacy_output)
128
+ add_library(openswmm::common ALIAS OpenSWMMEngine::openswmm_common)
129
+ add_library(openswmm::plugin_sdk ALIAS OpenSWMMEngine::openswmm_plugin_sdk)
130
+
131
+ if(NOT DEFINED LIBRARY_VERSION)
132
+ set(LIBRARY_VERSION "${PROJECT_VERSION}")
133
+ set(LIBRARY_SOVERSION "${PROJECT_VERSION_MAJOR}")
134
+ endif()
135
+
136
+ else()
137
+ message(STATUS "openswmm-python: building engine from source")
138
+ set(OPENSWMM_USE_PREBUILT_ENGINE FALSE CACHE BOOL "" FORCE)
139
+
140
+ set(OPENSWMM_BUILD_TESTS OFF CACHE BOOL "" FORCE)
141
+ set(OPENSWMM_BUILD_UNIT_TESTS OFF CACHE BOOL "" FORCE)
142
+ set(OPENSWMM_BUILD_REGRESSION_TESTS OFF CACHE BOOL "" FORCE)
143
+ set(OPENSWMM_BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE)
144
+ set(OPENSWMM_BUILD_PYTHON OFF CACHE BOOL "" FORCE)
145
+ # Build the Kokkos-OpenMP surface plugin into the wheel. Pairs with the
146
+ # "gpu" vcpkg feature selected above.
147
+ if(NOT DEFINED CACHE{OPENSWMM_BUILD_GPU_PLUGIN})
148
+ set(OPENSWMM_BUILD_GPU_PLUGIN ON CACHE BOOL "" FORCE)
149
+ endif()
150
+ # The plugin is dlopen()ed by path, so it has to land inside the import
151
+ # package rather than at the engine's installed-tree default of lib/ (or
152
+ # bin/ on Windows) — src/engine/2d/gpu/CMakeLists.txt exposes this cache
153
+ # variable for exactly this purpose, and packages/gpu-omp/ overrides it the
154
+ # same way to its own package dir.
155
+ #
156
+ # openswmm/engine specifically: it is where openswmm_engine and its bundled
157
+ # runtime dependencies (libomp included) already install, so the plugin sits
158
+ # beside the one libomp copy the wheel carries — the arrangement the macOS
159
+ # @rpath rewrite in the engine's plugin CMake assumes — and the factory's
160
+ # engine-directory search finds it with no environment variable at all.
161
+ if(NOT DEFINED CACHE{OPENSWMM_GPU_PLUGIN_INSTALL_DESTINATION})
162
+ set(OPENSWMM_GPU_PLUGIN_INSTALL_DESTINATION "openswmm/engine"
163
+ CACHE STRING "" FORCE)
164
+ endif()
165
+
166
+ # Disable WINDOWS_EXPORT_ALL_SYMBOLS: the cmake -E __create_def step
167
+ # cannot parse /GL (LTCG) object files on Windows CI.
168
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS OFF)
169
+
170
+ add_subdirectory(
171
+ "${CMAKE_CURRENT_SOURCE_DIR}/.."
172
+ "${CMAKE_BINARY_DIR}/parent_build"
173
+ EXCLUDE_FROM_ALL
174
+ )
175
+ endif()
176
+
177
+ # ============================================================================
178
+ # 2. Global settings
179
+ # ============================================================================
180
+ set(CMAKE_MACOSX_RPATH ON)
181
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
182
+ # Append the linked engine dylib directory to each extension's install rpath
183
+ # automatically. For a pre-built engine install (OPENSWMM_ENGINE_INSTALL_PREFIX)
184
+ # this adds prefix/lib; for an editable build it adds the build-tree dir.
185
+ # delocate/auditwheel rewrite all rpaths for wheel distribution anyway.
186
+ if(NOT WIN32)
187
+ set(CMAKE_SKIP_BUILD_RPATH FALSE)
188
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
189
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
190
+ endif()
191
+ set(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE)
192
+ include(InstallRequiredSystemLibraries)
193
+
194
+ # ============================================================================
195
+ # 2a. OpenMP — use the same custom FindOpenMP.cmake as the parent project.
196
+ #
197
+ # In source mode the parent's src/engine/CMakeLists.txt already includes it,
198
+ # so the OpenMP::OpenMP_C/CXX targets exist when we reach here.
199
+ # In pre-built mode the parent is skipped, so we must ensure the targets exist
200
+ # ourselves before any Cython extension is linked.
201
+ # ============================================================================
202
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
203
+ if(NOT TARGET OpenMP::OpenMP_CXX)
204
+ include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/FindOpenMP.cmake")
205
+ endif()
206
+
207
+ # ============================================================================
208
+ # 3. Python (standard CMake FindPython — scikit-build-core populates hints)
209
+ # ============================================================================
210
+ find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
211
+ message(STATUS "Python executable : ${Python_EXECUTABLE}")
212
+ message(STATUS "Python version : ${Python_VERSION}")
213
+
214
+ # ============================================================================
215
+ # 4. Cython driver — invoked as `python -m cython` so the cython that runs
216
+ # is ALWAYS the one installed in the active interpreter. Calling a
217
+ # `cython` binary discovered on PATH is a footgun: the binary may shebang
218
+ # a different interpreter (e.g. a system / conda Python), in which case
219
+ # `cimport numpy` resolves to that interpreter's numpy/*.cython-3?.pxd
220
+ # instead of the venv's, producing ABI mismatches at compile time
221
+ # (e.g. _PyArray_Descr.subarray on numpy 2.x).
222
+ # ============================================================================
223
+ execute_process(
224
+ COMMAND "${Python_EXECUTABLE}" -c "import Cython, sys; sys.stdout.write(Cython.__version__)"
225
+ OUTPUT_VARIABLE _cython_version
226
+ RESULT_VARIABLE _cython_check_rc
227
+ OUTPUT_STRIP_TRAILING_WHITESPACE
228
+ )
229
+ if(NOT _cython_check_rc EQUAL 0)
230
+ message(FATAL_ERROR
231
+ "Cython is not importable from the active Python (${Python_EXECUTABLE}).\n"
232
+ "Install it with: ${Python_EXECUTABLE} -m pip install 'cython>=3.0.12'")
233
+ endif()
234
+ # OPENSWMM_CYTHON_EXECUTABLE is treated as a list so add_custom_command's
235
+ # COMMAND expansion runs `<python> -m cython ...`.
236
+ set(OPENSWMM_CYTHON_EXECUTABLE "${Python_EXECUTABLE};-m;cython"
237
+ CACHE STRING "Cython driver (python -m cython) for the active interpreter" FORCE)
238
+ message(STATUS "Cython driver : ${Python_EXECUTABLE} -m cython (Cython ${_cython_version})")
239
+
240
+ # ============================================================================
241
+ # 5. NumPy include directory + pxd patch
242
+ #
243
+ # numpy.get_include() returns the C headers used by the .cxx compiler.
244
+ # Separately, numpy ships Cython declaration files (numpy/__init__.cython-30.pxd
245
+ # etc.) that have a known incompatibility with numpy 2.x — see
246
+ # cmake/PatchNumpyPxd.cmake for the full story. We materialise patched
247
+ # copies into the build tree and prepend them to Cython's --include-dir so
248
+ # our extensions compile against numpy 2.x without modifying the user's
249
+ # numpy install.
250
+ # ============================================================================
251
+ execute_process(
252
+ COMMAND "${Python_EXECUTABLE}" -c "import numpy; print(numpy.get_include())"
253
+ OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
254
+ OUTPUT_STRIP_TRAILING_WHITESPACE
255
+ RESULT_VARIABLE _numpy_rc
256
+ )
257
+ if(NOT _numpy_rc EQUAL 0)
258
+ message(FATAL_ERROR "Could not determine NumPy include directory")
259
+ endif()
260
+ message(STATUS "NumPy include dir : ${NUMPY_INCLUDE_DIR}")
261
+ set(NUMPY_INCLUDE_DIR "${NUMPY_INCLUDE_DIR}" CACHE PATH "" FORCE)
262
+
263
+ include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PatchNumpyPxd.cmake")
264
+ openswmm_patch_numpy_pxd()
265
+ set(OPENSWMM_NUMPY_PATCHED_INCLUDE_DIR
266
+ "${OPENSWMM_NUMPY_PATCHED_INCLUDE_DIR}" CACHE PATH "" FORCE)
267
+
268
+ # ============================================================================
269
+ # 6. Cython helper functions (shared directives + add_cython_extension)
270
+ # ============================================================================
271
+ include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/CythonHelpers.cmake")
272
+
273
+ # ============================================================================
274
+ # 7. Cython extensions
275
+ # ============================================================================
276
+ add_subdirectory(openswmm)
@@ -0,0 +1,163 @@
1
+ {
2
+ "version": 3,
3
+ "configurePresets": [
4
+ {
5
+ "name": "base",
6
+ "hidden": true,
7
+ "generator": "Ninja",
8
+ "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
9
+ "cacheVariables": {
10
+ "CMAKE_EXPORT_COMPILE_COMMANDS": "YES"
11
+ }
12
+ },
13
+ {
14
+ "name": "base-debug",
15
+ "hidden": true,
16
+ "inherits": "base",
17
+ "cacheVariables": {
18
+ "CMAKE_BUILD_TYPE": "Debug"
19
+ }
20
+ },
21
+ {
22
+ "name": "Windows",
23
+ "inherits": "base",
24
+ "description": "Windows release build",
25
+ "generator": "Visual Studio 17 2022",
26
+ "toolset": {
27
+ "value": "v143",
28
+ "strategy": "external"
29
+ },
30
+ "cacheVariables": {
31
+ "CMAKE_BUILD_TYPE": "Release",
32
+ "CMAKE_C_FLAGS": "/O2 /GL /fp:precise /W4",
33
+ "CMAKE_CXX_FLAGS": "/O2 /GL /fp:precise /W4",
34
+ "CMAKE_EXE_LINKER_FLAGS": "/LTCG /OPT:REF /OPT:ICF",
35
+ "CMAKE_SHARED_LINKER_FLAGS": "/LTCG /OPT:REF /OPT:ICF",
36
+ "CMAKE_MODULE_LINKER_FLAGS": "/LTCG /OPT:REF /OPT:ICF",
37
+ "CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS": "OFF"
38
+ },
39
+ "condition": {
40
+ "type": "equals",
41
+ "lhs": "${hostSystemName}",
42
+ "rhs": "Windows"
43
+ }
44
+ },
45
+ {
46
+ "name": "Windows-debug",
47
+ "inherits": "base-debug",
48
+ "description": "Windows debug build",
49
+ "generator": "Visual Studio 17 2022",
50
+ "toolset": {
51
+ "value": "v143",
52
+ "strategy": "external"
53
+ },
54
+ "cacheVariables": {
55
+ "CMAKE_C_FLAGS": "/Zi /Od /DDEBUG /W4 /fp:precise",
56
+ "CMAKE_CXX_FLAGS": "/Zi /Od /DDEBUG /W4 /fp:precise",
57
+ "CMAKE_EXE_LINKER_FLAGS": "/DEBUG"
58
+ },
59
+ "condition": {
60
+ "type": "equals",
61
+ "lhs": "${hostSystemName}",
62
+ "rhs": "Windows"
63
+ }
64
+ },
65
+ {
66
+ "name": "Linux",
67
+ "inherits": "base",
68
+ "description": "Linux release build",
69
+ "cacheVariables": {
70
+ "CMAKE_BUILD_TYPE": "Release",
71
+ "CMAKE_C_FLAGS": "-O2 -fdata-sections -ffunction-sections -fno-fast-math -ffp-contract=off -fexcess-precision=standard -ffloat-store -Wall -Wextra",
72
+ "CMAKE_CXX_FLAGS": "-O2 -fdata-sections -ffunction-sections -fno-fast-math -ffp-contract=off -ffloat-store -Wall -Wextra",
73
+ "CMAKE_EXE_LINKER_FLAGS": "-Wl,--gc-sections",
74
+ "CMAKE_SHARED_LINKER_FLAGS": "-Wl,--gc-sections",
75
+ "CMAKE_MODULE_LINKER_FLAGS": ""
76
+ },
77
+ "condition": {
78
+ "type": "equals",
79
+ "lhs": "${hostSystemName}",
80
+ "rhs": "Linux"
81
+ }
82
+ },
83
+ {
84
+ "name": "Linux-debug",
85
+ "inherits": "base-debug",
86
+ "description": "Linux debug build",
87
+ "cacheVariables": {
88
+ "CMAKE_C_FLAGS": "-O0 -g -DDEBUG -fno-fast-math -ffp-contract=off -fexcess-precision=standard -ffloat-store -Wall -Wextra",
89
+ "CMAKE_CXX_FLAGS": "-O0 -g -DDEBUG -fno-fast-math -ffp-contract=off -ffloat-store -Wall -Wextra",
90
+ "CMAKE_EXE_LINKER_FLAGS": "-g"
91
+ },
92
+ "condition": {
93
+ "type": "equals",
94
+ "lhs": "${hostSystemName}",
95
+ "rhs": "Linux"
96
+ }
97
+ },
98
+ {
99
+ "name": "Darwin",
100
+ "inherits": "base",
101
+ "description": "macOS release build",
102
+ "cacheVariables": {
103
+ "CMAKE_BUILD_TYPE": "Release",
104
+ "CMAKE_C_FLAGS": "-O2 -flto -fdata-sections -ffunction-sections -fno-fast-math -ffp-contract=off -ffloat-store -Wall -Wextra",
105
+ "CMAKE_CXX_FLAGS": "-O2 -flto -fdata-sections -ffunction-sections -fno-fast-math -ffp-contract=off -ffloat-store -Wall -Wextra",
106
+ "CMAKE_EXE_LINKER_FLAGS": "-flto",
107
+ "CMAKE_SHARED_LINKER_FLAGS": "-flto -twolevel_namespace",
108
+ "CMAKE_MODULE_LINKER_FLAGS": "-flto -undefined dynamic_lookup"
109
+ },
110
+ "condition": {
111
+ "type": "equals",
112
+ "lhs": "${hostSystemName}",
113
+ "rhs": "Darwin"
114
+ }
115
+ },
116
+ {
117
+ "name": "Darwin-debug",
118
+ "inherits": "base-debug",
119
+ "description": "macOS debug build",
120
+ "cacheVariables": {
121
+ "CMAKE_C_FLAGS": "-O0 -g -DDEBUG -fno-fast-math -ffp-contract=off -ffloat-store -Wall -Wextra",
122
+ "CMAKE_CXX_FLAGS": "-O0 -g -DDEBUG -fno-fast-math -ffp-contract=off -ffloat-store -Wall -Wextra",
123
+ "CMAKE_EXE_LINKER_FLAGS": "-g",
124
+ "CMAKE_SHARED_LINKER_FLAGS": "-twolevel_namespace",
125
+ "CMAKE_MODULE_LINKER_FLAGS": "-undefined dynamic_lookup"
126
+ },
127
+ "condition": {
128
+ "type": "equals",
129
+ "lhs": "${hostSystemName}",
130
+ "rhs": "Darwin"
131
+ }
132
+ }
133
+ ],
134
+ "buildPresets": [
135
+ {
136
+ "name": "Windows",
137
+ "configurePreset": "Windows",
138
+ "targets": ["package"]
139
+ },
140
+ {
141
+ "name": "Windows-debug",
142
+ "configurePreset": "Windows-debug"
143
+ },
144
+ {
145
+ "name": "Linux",
146
+ "configurePreset": "Linux",
147
+ "targets": ["package"]
148
+ },
149
+ {
150
+ "name": "Linux-debug",
151
+ "configurePreset": "Linux-debug"
152
+ },
153
+ {
154
+ "name": "Darwin",
155
+ "configurePreset": "Darwin",
156
+ "targets": ["package"]
157
+ },
158
+ {
159
+ "name": "Darwin-debug",
160
+ "configurePreset": "Darwin-debug"
161
+ }
162
+ ]
163
+ }
@@ -0,0 +1,203 @@
1
+ Copyright 2026 HydroCouple Developers
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright [yyyy] [name of copyright owner]
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.