solverforge 0.3.0__tar.gz → 0.4.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 (316) hide show
  1. solverforge-0.4.0/.github/workflows/ci.yml +46 -0
  2. solverforge-0.4.0/.github/workflows/release.yml +205 -0
  3. solverforge-0.4.0/.gitignore +11 -0
  4. solverforge-0.4.0/.pre-commit-config.yaml +31 -0
  5. solverforge-0.4.0/.python-version +1 -0
  6. solverforge-0.4.0/AGENTS.md +62 -0
  7. solverforge-0.4.0/Cargo.lock +1173 -0
  8. solverforge-0.4.0/Cargo.toml +51 -0
  9. solverforge-0.4.0/LICENSE +201 -0
  10. solverforge-0.4.0/Makefile +363 -0
  11. solverforge-0.4.0/PKG-INFO +187 -0
  12. solverforge-0.4.0/README.md +155 -0
  13. solverforge-0.4.0/WIREFRAME.md +152 -0
  14. solverforge-0.4.0/docs/callback-contract.md +18 -0
  15. solverforge-0.4.0/docs/dynamic-move-parity-plan.md +203 -0
  16. solverforge-0.4.0/docs/goal.md +305 -0
  17. solverforge-0.4.0/docs/non-goals.md +9 -0
  18. solverforge-0.4.0/docs/release.md +90 -0
  19. solverforge-0.4.0/docs/threading.md +12 -0
  20. solverforge-0.4.0/docs/upstream-contract.md +33 -0
  21. solverforge-0.4.0/examples/list_tsp.py +20 -0
  22. solverforge-0.4.0/examples/mixed_job_shop.py +30 -0
  23. solverforge-0.4.0/examples/nqueens.py +36 -0
  24. solverforge-0.4.0/examples/shift_scheduling.py +45 -0
  25. solverforge-0.4.0/examples/solverforge_hospital/README.md +63 -0
  26. solverforge-0.4.0/examples/solverforge_hospital/__init__.py +43 -0
  27. solverforge-0.4.0/examples/solverforge_hospital/__main__.py +32 -0
  28. solverforge-0.4.0/examples/solverforge_hospital/solver.toml +38 -0
  29. solverforge-0.4.0/examples/solverforge_hospital/src/__init__.py +41 -0
  30. solverforge-0.4.0/examples/solverforge_hospital/src/api/__init__.py +20 -0
  31. solverforge-0.4.0/examples/solverforge_hospital/src/api/dto.py +261 -0
  32. solverforge-0.4.0/examples/solverforge_hospital/src/api/mod.py +20 -0
  33. solverforge-0.4.0/examples/solverforge_hospital/src/api/routes.py +173 -0
  34. solverforge-0.4.0/examples/solverforge_hospital/src/api/sse.py +42 -0
  35. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/__init__.py +3 -0
  36. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/assigned_shift.py +14 -0
  37. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/balance_assignments.py +20 -0
  38. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/desired_day.py +24 -0
  39. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/minimum_rest.py +33 -0
  40. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/mod.py +42 -0
  41. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/one_shift_per_day.py +16 -0
  42. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/overlapping_shift.py +28 -0
  43. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/required_skill.py +20 -0
  44. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/unavailable_employee.py +32 -0
  45. solverforge-0.4.0/examples/solverforge_hospital/src/constraints/undesired_day.py +24 -0
  46. solverforge-0.4.0/examples/solverforge_hospital/src/data/__init__.py +23 -0
  47. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/LARGE.json +1 -0
  48. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/__init__.py +13 -0
  49. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/availability.py +16 -0
  50. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/cohorts.py +14 -0
  51. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/coverage.py +14 -0
  52. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/demand.py +9 -0
  53. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/employees.py +18 -0
  54. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/entrypoints.py +32 -0
  55. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/large.py +16 -0
  56. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/preferences.py +17 -0
  57. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/shifts.py +20 -0
  58. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/skills.py +15 -0
  59. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/time_utils.py +5 -0
  60. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/validation.py +12 -0
  61. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/vocabulary.py +10 -0
  62. solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/witness.py +10 -0
  63. solverforge-0.4.0/examples/solverforge_hospital/src/data/mod.py +3 -0
  64. solverforge-0.4.0/examples/solverforge_hospital/src/domain/__init__.py +59 -0
  65. solverforge-0.4.0/examples/solverforge_hospital/src/domain/care_hub.py +63 -0
  66. solverforge-0.4.0/examples/solverforge_hospital/src/domain/employee.py +32 -0
  67. solverforge-0.4.0/examples/solverforge_hospital/src/domain/mod.py +19 -0
  68. solverforge-0.4.0/examples/solverforge_hospital/src/domain/plan.py +256 -0
  69. solverforge-0.4.0/examples/solverforge_hospital/src/lib.py +56 -0
  70. solverforge-0.4.0/examples/solverforge_hospital/src/main.py +22 -0
  71. solverforge-0.4.0/examples/solverforge_hospital/src/solver/__init__.py +8 -0
  72. solverforge-0.4.0/examples/solverforge_hospital/src/solver/mod.py +8 -0
  73. solverforge-0.4.0/examples/solverforge_hospital/src/solver/service/__init__.py +202 -0
  74. solverforge-0.4.0/examples/solverforge_hospital/src/solver/service/mod.py +8 -0
  75. solverforge-0.4.0/examples/solverforge_hospital/src/solver/service/payload.py +72 -0
  76. solverforge-0.4.0/examples/solverforge_hospital/static/app/main.mjs +130 -0
  77. solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/analysis-modal.mjs +79 -0
  78. solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/datetime.mjs +60 -0
  79. solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/employee-view.mjs +95 -0
  80. solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/grouping.mjs +77 -0
  81. solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/identity.mjs +33 -0
  82. solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/location-view.mjs +42 -0
  83. solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/presentation.mjs +116 -0
  84. solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/rail-renderer.mjs +154 -0
  85. solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/api-guide.mjs +104 -0
  86. solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/app-shell.mjs +103 -0
  87. solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/app-state.mjs +7 -0
  88. solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/config-loader.mjs +63 -0
  89. solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/data-panel.mjs +22 -0
  90. solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/solver-controller.mjs +134 -0
  91. solverforge-0.4.0/examples/solverforge_hospital/static/app/views/registry.mjs +10 -0
  92. solverforge-0.4.0/examples/solverforge_hospital/static/generated/ui-model.json +41 -0
  93. solverforge-0.4.0/examples/solverforge_hospital/static/index.html +23 -0
  94. solverforge-0.4.0/examples/solverforge_hospital/static/sf/fonts/jetbrains-mono.woff2 +0 -0
  95. solverforge-0.4.0/examples/solverforge_hospital/static/sf/fonts/space-grotesk.woff2 +0 -0
  96. solverforge-0.4.0/examples/solverforge_hospital/static/sf/img/ouroboros.svg +60 -0
  97. solverforge-0.4.0/examples/solverforge_hospital/static/sf/modules/sf-map.css +77 -0
  98. solverforge-0.4.0/examples/solverforge_hospital/static/sf/modules/sf-map.js +165 -0
  99. solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.0.6.5.css +2490 -0
  100. solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.0.6.5.js +4012 -0
  101. solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.0.6.5.mjs +3987 -0
  102. solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.css +2490 -0
  103. solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.js +4012 -0
  104. solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.mjs +3987 -0
  105. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/fontawesome/css/fontawesome.min.css +9 -0
  106. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/fontawesome/css/solid.min.css +6 -0
  107. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/fontawesome/webfonts/fa-solid-900.ttf +0 -0
  108. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
  109. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/frappe-gantt/frappe-gantt.min.css +1 -0
  110. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/frappe-gantt/frappe-gantt.min.js +2 -0
  111. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/leaflet/leaflet.css +661 -0
  112. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/leaflet/leaflet.js +6 -0
  113. solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/split/split.min.js +3 -0
  114. solverforge-0.4.0/examples/solverforge_hospital/static/sf-config.json +5 -0
  115. solverforge-0.4.0/examples/vrp_owner_hooks.py +21 -0
  116. solverforge-0.4.0/pyproject.toml +61 -0
  117. solverforge-0.4.0/python/solverforge/__init__.py +47 -0
  118. solverforge-0.4.0/python/solverforge/_native.pyi +20 -0
  119. solverforge-0.4.0/python/solverforge/config.py +160 -0
  120. solverforge-0.4.0/python/solverforge/console.py +7 -0
  121. solverforge-0.4.0/python/solverforge/constraints.py +293 -0
  122. solverforge-0.4.0/python/solverforge/decorators.py +97 -0
  123. solverforge-0.4.0/python/solverforge/errors.py +15 -0
  124. solverforge-0.4.0/python/solverforge/events.py +13 -0
  125. solverforge-0.4.0/python/solverforge/fields.py +61 -0
  126. solverforge-0.4.0/python/solverforge/joiner.py +28 -0
  127. solverforge-0.4.0/python/solverforge/manager.py +58 -0
  128. solverforge-0.4.0/python/solverforge/model.py +132 -0
  129. solverforge-0.4.0/python/solverforge/py.typed +1 -0
  130. solverforge-0.4.0/python/solverforge/score.py +171 -0
  131. solverforge-0.4.0/python/solverforge/solver.py +19 -0
  132. solverforge-0.4.0/python/solverforge/typing.py +17 -0
  133. solverforge-0.4.0/rust-toolchain.toml +3 -0
  134. solverforge-0.4.0/scripts/verify_release_artifacts.py +176 -0
  135. solverforge-0.4.0/scripts/verify_solverforge_release_base.py +124 -0
  136. solverforge-0.4.0/src/bindings.rs +32 -0
  137. solverforge-0.4.0/src/callbacks/call.rs +5 -0
  138. solverforge-0.4.0/src/callbacks/mod.rs +3 -0
  139. solverforge-0.4.0/src/callbacks/registry.rs +14 -0
  140. solverforge-0.4.0/src/callbacks/threading.rs +3 -0
  141. solverforge-0.4.0/src/config.rs +58 -0
  142. solverforge-0.4.0/src/constraints/evaluate.rs +80 -0
  143. solverforge-0.4.0/src/constraints/incremental.rs +6 -0
  144. solverforge-0.4.0/src/constraints/matches.rs +5 -0
  145. solverforge-0.4.0/src/constraints/mod.rs +23 -0
  146. solverforge-0.4.0/src/constraints/state.rs +1869 -0
  147. solverforge-0.4.0/src/constraints/stream_plan.rs +7 -0
  148. solverforge-0.4.0/src/descriptor/extractor.rs +89 -0
  149. solverforge-0.4.0/src/descriptor/mod.rs +2 -0
  150. solverforge-0.4.0/src/descriptor/variable.rs +5 -0
  151. solverforge-0.4.0/src/error.rs +9 -0
  152. solverforge-0.4.0/src/intern.rs +3 -0
  153. solverforge-0.4.0/src/lib.rs +16 -0
  154. solverforge-0.4.0/src/manager/events.rs +154 -0
  155. solverforge-0.4.0/src/manager/jobs.rs +156 -0
  156. solverforge-0.4.0/src/manager/mod.rs +4 -0
  157. solverforge-0.4.0/src/proxy/entity.rs +10 -0
  158. solverforge-0.4.0/src/proxy/list.rs +2 -0
  159. solverforge-0.4.0/src/proxy/mod.rs +3 -0
  160. solverforge-0.4.0/src/proxy/solution.rs +2 -0
  161. solverforge-0.4.0/src/runtime/distance.rs +17 -0
  162. solverforge-0.4.0/src/runtime/dynamic_scalar_search.rs +4169 -0
  163. solverforge-0.4.0/src/runtime/list_slots.rs +28 -0
  164. solverforge-0.4.0/src/runtime/mod.rs +30 -0
  165. solverforge-0.4.0/src/runtime/scalar_slots.rs +29 -0
  166. solverforge-0.4.0/src/runtime/static_fns.rs +21 -0
  167. solverforge-0.4.0/src/runtime/thread_local.rs +21 -0
  168. solverforge-0.4.0/src/schema/build.rs +43 -0
  169. solverforge-0.4.0/src/schema/mod.rs +8 -0
  170. solverforge-0.4.0/src/schema/parse.rs +119 -0
  171. solverforge-0.4.0/src/schema/python.rs +15 -0
  172. solverforge-0.4.0/src/schema/types.rs +44 -0
  173. solverforge-0.4.0/src/schema/validate.rs +20 -0
  174. solverforge-0.4.0/src/score.rs +132 -0
  175. solverforge-0.4.0/src/solver/api.rs +113 -0
  176. solverforge-0.4.0/src/solver/console.rs +78 -0
  177. solverforge-0.4.0/src/solver/mod.rs +7 -0
  178. solverforge-0.4.0/src/solver/progress.rs +5 -0
  179. solverforge-0.4.0/src/solver/result.rs +6 -0
  180. solverforge-0.4.0/src/solver/solvable.rs +55 -0
  181. solverforge-0.4.0/src/state/clone.rs +5 -0
  182. solverforge-0.4.0/src/state/entity_table.rs +49 -0
  183. solverforge-0.4.0/src/state/marshal.rs +155 -0
  184. solverforge-0.4.0/src/state/mod.rs +7 -0
  185. solverforge-0.4.0/src/state/solution.rs +233 -0
  186. solverforge-0.4.0/src/state/variables.rs +22 -0
  187. solverforge-0.4.0/src/value.rs +64 -0
  188. solverforge-0.4.0/tests/python/test_config.py +196 -0
  189. solverforge-0.4.0/tests/python/test_constraints.py +341 -0
  190. solverforge-0.4.0/tests/python/test_decorators.py +53 -0
  191. solverforge-0.4.0/tests/python/test_hospital_example.py +169 -0
  192. solverforge-0.4.0/tests/python/test_hospital_frontend_app.py +262 -0
  193. solverforge-0.4.0/tests/python/test_list_solving.py +336 -0
  194. solverforge-0.4.0/tests/python/test_manager.py +47 -0
  195. solverforge-0.4.0/tests/python/test_mixed_solving.py +8 -0
  196. solverforge-0.4.0/tests/python/test_release_metadata.py +124 -0
  197. solverforge-0.4.0/tests/python/test_scalar_solving.py +851 -0
  198. solverforge-0.4.0/tests/python/test_threading.py +11 -0
  199. solverforge-0.4.0/tests/python/test_tracebacks.py +40 -0
  200. solverforge-0.4.0/tests/rust/constraint_set.rs +33 -0
  201. solverforge-0.4.0/tests/rust/descriptor.rs +73 -0
  202. solverforge-0.4.0/tests/rust/manager.rs +6 -0
  203. solverforge-0.4.0/tests/rust/runtime_slots.rs +92 -0
  204. solverforge-0.4.0/tests/rust/score.rs +8 -0
  205. solverforge-0.4.0/tests/rust/state_clone.rs +97 -0
  206. solverforge-0.4.0/tests/rust.rs +16 -0
  207. solverforge-0.3.0/Cargo.lock +0 -2437
  208. solverforge-0.3.0/Cargo.toml +0 -59
  209. solverforge-0.3.0/PKG-INFO +0 -232
  210. solverforge-0.3.0/README.md +0 -208
  211. solverforge-0.3.0/pyproject.toml +0 -36
  212. solverforge-0.3.0/python/solverforge/__init__.py +0 -162
  213. solverforge-0.3.0/python/solverforge/solver/__init__.py +0 -379
  214. solverforge-0.3.0/python/solverforge/solver/config.py +0 -221
  215. solverforge-0.3.0/python/solverforge/solver/domain.py +0 -45
  216. solverforge-0.3.0/python/solverforge/solver/score.py +0 -51
  217. solverforge-0.3.0/python/solverforge/test/__init__.py +0 -746
  218. solverforge-0.3.0/solverforge-core/Cargo.toml +0 -43
  219. solverforge-0.3.0/solverforge-core/README.md +0 -118
  220. solverforge-0.3.0/solverforge-core/src/analysis/explanation.rs +0 -406
  221. solverforge-0.3.0/solverforge-core/src/analysis/manager.rs +0 -323
  222. solverforge-0.3.0/solverforge-core/src/analysis/mod.rs +0 -5
  223. solverforge-0.3.0/solverforge-core/src/bridge.rs +0 -315
  224. solverforge-0.3.0/solverforge-core/src/constraints/collectors.rs +0 -739
  225. solverforge-0.3.0/solverforge-core/src/constraints/constraint.rs +0 -541
  226. solverforge-0.3.0/solverforge-core/src/constraints/joiners.rs +0 -632
  227. solverforge-0.3.0/solverforge-core/src/constraints/mod.rs +0 -11
  228. solverforge-0.3.0/solverforge-core/src/constraints/named_expr.rs +0 -221
  229. solverforge-0.3.0/solverforge-core/src/constraints/stream.rs +0 -1048
  230. solverforge-0.3.0/solverforge-core/src/domain/annotations.rs +0 -1057
  231. solverforge-0.3.0/solverforge-core/src/domain/class.rs +0 -422
  232. solverforge-0.3.0/solverforge-core/src/domain/constraint_config.rs +0 -100
  233. solverforge-0.3.0/solverforge-core/src/domain/listener.rs +0 -981
  234. solverforge-0.3.0/solverforge-core/src/domain/mod.rs +0 -19
  235. solverforge-0.3.0/solverforge-core/src/domain/model.rs +0 -520
  236. solverforge-0.3.0/solverforge-core/src/domain/shadow.rs +0 -331
  237. solverforge-0.3.0/solverforge-core/src/entity_context.rs +0 -193
  238. solverforge-0.3.0/solverforge-core/src/error.rs +0 -100
  239. solverforge-0.3.0/solverforge-core/src/handles.rs +0 -171
  240. solverforge-0.3.0/solverforge-core/src/lib.rs +0 -85
  241. solverforge-0.3.0/solverforge-core/src/score/bendable.rs +0 -554
  242. solverforge-0.3.0/solverforge-core/src/score/hard_soft.rs +0 -583
  243. solverforge-0.3.0/solverforge-core/src/score/hard_soft_decimal.rs +0 -481
  244. solverforge-0.3.0/solverforge-core/src/score/mod.rs +0 -25
  245. solverforge-0.3.0/solverforge-core/src/score/simple.rs +0 -168
  246. solverforge-0.3.0/solverforge-core/src/score/simple_decimal.rs +0 -188
  247. solverforge-0.3.0/solverforge-core/src/solver/builder.rs +0 -806
  248. solverforge-0.3.0/solverforge-core/src/solver/change.rs +0 -1139
  249. solverforge-0.3.0/solverforge-core/src/solver/client.rs +0 -191
  250. solverforge-0.3.0/solverforge-core/src/solver/config.rs +0 -216
  251. solverforge-0.3.0/solverforge-core/src/solver/environment.rs +0 -195
  252. solverforge-0.3.0/solverforge-core/src/solver/factory.rs +0 -277
  253. solverforge-0.3.0/solverforge-core/src/solver/manager.rs +0 -253
  254. solverforge-0.3.0/solverforge-core/src/solver/mod.rs +0 -29
  255. solverforge-0.3.0/solverforge-core/src/solver/request.rs +0 -622
  256. solverforge-0.3.0/solverforge-core/src/solver/response.rs +0 -467
  257. solverforge-0.3.0/solverforge-core/src/solver/termination.rs +0 -273
  258. solverforge-0.3.0/solverforge-core/src/traits.rs +0 -488
  259. solverforge-0.3.0/solverforge-core/src/value.rs +0 -402
  260. solverforge-0.3.0/solverforge-core/src/wasm/expression/builder.rs +0 -672
  261. solverforge-0.3.0/solverforge-core/src/wasm/expression/mod.rs +0 -349
  262. solverforge-0.3.0/solverforge-core/src/wasm/expression/substitution.rs +0 -199
  263. solverforge-0.3.0/solverforge-core/src/wasm/expression/tests.rs +0 -761
  264. solverforge-0.3.0/solverforge-core/src/wasm/generator/codegen.rs +0 -317
  265. solverforge-0.3.0/solverforge-core/src/wasm/generator/compiler.rs +0 -801
  266. solverforge-0.3.0/solverforge-core/src/wasm/generator/mod.rs +0 -469
  267. solverforge-0.3.0/solverforge-core/src/wasm/generator/predicate.rs +0 -38
  268. solverforge-0.3.0/solverforge-core/src/wasm/generator/tests.rs +0 -280
  269. solverforge-0.3.0/solverforge-core/src/wasm/host_functions.rs +0 -302
  270. solverforge-0.3.0/solverforge-core/src/wasm/memory.rs +0 -300
  271. solverforge-0.3.0/solverforge-core/src/wasm/mod.rs +0 -12
  272. solverforge-0.3.0/solverforge-python/Cargo.toml +0 -38
  273. solverforge-0.3.0/solverforge-python/README.md +0 -208
  274. solverforge-0.3.0/solverforge-python/python/solverforge/__init__.py +0 -162
  275. solverforge-0.3.0/solverforge-python/python/solverforge/solver/__init__.py +0 -379
  276. solverforge-0.3.0/solverforge-python/python/solverforge/solver/config.py +0 -221
  277. solverforge-0.3.0/solverforge-python/python/solverforge/solver/domain.py +0 -45
  278. solverforge-0.3.0/solverforge-python/python/solverforge/solver/score.py +0 -51
  279. solverforge-0.3.0/solverforge-python/python/solverforge/test/__init__.py +0 -746
  280. solverforge-0.3.0/solverforge-python/src/analysis.rs +0 -414
  281. solverforge-0.3.0/solverforge-python/src/annotations.rs +0 -758
  282. solverforge-0.3.0/solverforge-python/src/bridge.rs +0 -1063
  283. solverforge-0.3.0/solverforge-python/src/collectors.rs +0 -630
  284. solverforge-0.3.0/solverforge-python/src/decorators.rs +0 -922
  285. solverforge-0.3.0/solverforge-python/src/joiners.rs +0 -274
  286. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/ast_convert/guards.rs +0 -116
  287. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/ast_convert/inference.rs +0 -549
  288. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/ast_convert/mod.rs +0 -1035
  289. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/ast_convert/types.rs +0 -65
  290. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/conditionals.rs +0 -491
  291. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/constants.rs +0 -370
  292. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/lambda_parsing.rs +0 -183
  293. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/loops.rs +0 -729
  294. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/method_analysis.rs +0 -248
  295. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/mod.rs +0 -269
  296. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/patterns.rs +0 -36
  297. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/registry.rs +0 -155
  298. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/sequential.rs +0 -353
  299. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/tests.rs +0 -428
  300. solverforge-0.3.0/solverforge-python/src/lambda_analyzer/type_inference.rs +0 -447
  301. solverforge-0.3.0/solverforge-python/src/lib.rs +0 -201
  302. solverforge-0.3.0/solverforge-python/src/score.rs +0 -1714
  303. solverforge-0.3.0/solverforge-python/src/service.rs +0 -325
  304. solverforge-0.3.0/solverforge-python/src/solver.rs +0 -2174
  305. solverforge-0.3.0/solverforge-python/src/stream.rs +0 -4089
  306. solverforge-0.3.0/solverforge-service/Cargo.toml +0 -33
  307. solverforge-0.3.0/solverforge-service/README.md +0 -89
  308. solverforge-0.3.0/solverforge-service/src/config.rs +0 -106
  309. solverforge-0.3.0/solverforge-service/src/error.rs +0 -51
  310. solverforge-0.3.0/solverforge-service/src/jar.rs +0 -348
  311. solverforge-0.3.0/solverforge-service/src/lib.rs +0 -18
  312. solverforge-0.3.0/solverforge-service/src/service.rs +0 -309
  313. solverforge-0.3.0/solverforge-service/src/util.rs +0 -146
  314. solverforge-0.3.0/solverforge-service/tests/employee_scheduling_integration.rs +0 -943
  315. solverforge-0.3.0/solverforge-service/tests/integration.rs +0 -61
  316. solverforge-0.3.0/solverforge-service/tests/solve_integration.rs +0 -393
@@ -0,0 +1,46 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ env:
12
+ PYTHON_VERSION: "3.14"
13
+ RUST_VERSION: "1.95.0"
14
+
15
+ jobs:
16
+ ci-local:
17
+ name: local CI gate
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: Checkout solverforge-py
21
+ uses: actions/checkout@v6
22
+ with:
23
+ path: solverforge-py
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v6
27
+ with:
28
+ python-version: ${{ env.PYTHON_VERSION }}
29
+
30
+ - name: Set up Rust
31
+ uses: dtolnay/rust-toolchain@stable
32
+ with:
33
+ toolchain: ${{ env.RUST_VERSION }}
34
+ components: rustfmt, clippy
35
+
36
+ - name: Validate SolverForge release base
37
+ working-directory: solverforge-py
38
+ run: make release-base-check
39
+
40
+ - name: Run local CI
41
+ working-directory: solverforge-py
42
+ run: make ci-local
43
+
44
+ - name: Build and verify local distributions
45
+ working-directory: solverforge-py
46
+ run: make build-dist dist-check smoke-wheel
@@ -0,0 +1,205 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ repository:
7
+ description: Publish target
8
+ required: true
9
+ default: testpypi
10
+ type: choice
11
+ options:
12
+ - testpypi
13
+ - pypi
14
+ push:
15
+ tags:
16
+ - "v*.*.*"
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ env:
22
+ PYTHON_VERSION: "3.14"
23
+ RUST_VERSION: "1.95.0"
24
+
25
+ jobs:
26
+ sdist:
27
+ name: source distribution
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - name: Checkout solverforge-py
31
+ uses: actions/checkout@v6
32
+ with:
33
+ path: solverforge-py
34
+
35
+ - name: Set up Python
36
+ uses: actions/setup-python@v6
37
+ with:
38
+ python-version: ${{ env.PYTHON_VERSION }}
39
+
40
+ - name: Set up Rust
41
+ uses: dtolnay/rust-toolchain@stable
42
+ with:
43
+ toolchain: ${{ env.RUST_VERSION }}
44
+ components: rustfmt, clippy
45
+
46
+ - name: Build sdist
47
+ working-directory: solverforge-py
48
+ run: make build-sdist
49
+
50
+ - name: Upload sdist
51
+ uses: actions/upload-artifact@v7
52
+ with:
53
+ name: sdist
54
+ path: solverforge-py/dist/*.tar.gz
55
+
56
+ wheels:
57
+ name: wheel ${{ matrix.os }} ${{ matrix.target }}
58
+ runs-on: ${{ matrix.os }}
59
+ strategy:
60
+ fail-fast: false
61
+ matrix:
62
+ include:
63
+ - os: ubuntu-latest
64
+ target: x86_64
65
+ manylinux: "2014"
66
+ interpreter: python3.14
67
+ - os: macos-14
68
+ target: aarch64
69
+ manylinux: ""
70
+ interpreter: python3.14
71
+ - os: windows-latest
72
+ target: x64
73
+ manylinux: ""
74
+ interpreter: python
75
+ steps:
76
+ - name: Checkout solverforge-py
77
+ uses: actions/checkout@v6
78
+ with:
79
+ path: solverforge-py
80
+
81
+ - name: Set up Python
82
+ uses: actions/setup-python@v6
83
+ with:
84
+ python-version: ${{ env.PYTHON_VERSION }}
85
+
86
+ - name: Build wheels
87
+ uses: PyO3/maturin-action@v1
88
+ with:
89
+ command: build
90
+ args: --release --locked --strip --compatibility pypi -i ${{ matrix.interpreter }} --out dist
91
+ manylinux: ${{ matrix.manylinux }}
92
+ target: ${{ matrix.target }}
93
+ rust-toolchain: ${{ env.RUST_VERSION }}
94
+ working-directory: solverforge-py
95
+
96
+ - name: Upload wheels
97
+ uses: actions/upload-artifact@v7
98
+ with:
99
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
100
+ path: solverforge-py/dist/*.whl
101
+
102
+ verify:
103
+ name: verify artifacts
104
+ runs-on: ubuntu-latest
105
+ needs: [sdist, wheels]
106
+ steps:
107
+ - name: Checkout solverforge-py
108
+ uses: actions/checkout@v6
109
+
110
+ - name: Set up Python
111
+ uses: actions/setup-python@v6
112
+ with:
113
+ python-version: ${{ env.PYTHON_VERSION }}
114
+
115
+ - name: Download artifacts
116
+ uses: actions/download-artifact@v8
117
+ with:
118
+ path: artifact-download
119
+
120
+ - name: Collect distributions
121
+ run: |
122
+ mkdir dist
123
+ find artifact-download -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec cp '{}' dist/ \;
124
+
125
+ - name: Install release tools
126
+ run: python -m pip install --disable-pip-version-check twine
127
+
128
+ - name: Check metadata
129
+ run: |
130
+ python -m twine check dist/*
131
+ python scripts/verify_release_artifacts.py --dist dist
132
+
133
+ - name: Upload verified distributions
134
+ uses: actions/upload-artifact@v7
135
+ with:
136
+ name: release-dist
137
+ path: dist/*
138
+
139
+ publish-testpypi:
140
+ name: publish to TestPyPI
141
+ runs-on: ubuntu-latest
142
+ needs: verify
143
+ if: github.event_name == 'workflow_dispatch' && github.event.inputs.repository == 'testpypi'
144
+ environment: testpypi
145
+ permissions:
146
+ contents: read
147
+ steps:
148
+ - name: Download verified distributions
149
+ uses: actions/download-artifact@v8
150
+ with:
151
+ name: release-dist
152
+ path: dist
153
+
154
+ - name: Publish to TestPyPI
155
+ uses: pypa/gh-action-pypi-publish@release/v1
156
+ with:
157
+ repository-url: https://test.pypi.org/legacy/
158
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
159
+
160
+ publish-pypi:
161
+ name: publish to PyPI
162
+ runs-on: ubuntu-latest
163
+ needs: verify
164
+ if: >-
165
+ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) ||
166
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.repository == 'pypi')
167
+ environment: pypi
168
+ permissions:
169
+ contents: read
170
+ steps:
171
+ - name: Checkout solverforge-py
172
+ uses: actions/checkout@v6
173
+
174
+ - name: Set up Python
175
+ uses: actions/setup-python@v6
176
+ with:
177
+ python-version: ${{ env.PYTHON_VERSION }}
178
+
179
+ - name: Validate tag version
180
+ run: |
181
+ python - <<'PY'
182
+ import os
183
+ import tomllib
184
+
185
+ with open("pyproject.toml", "rb") as handle:
186
+ version = tomllib.load(handle)["project"]["version"]
187
+
188
+ expected = f"v{version}"
189
+ actual = os.environ["GITHUB_REF_NAME"]
190
+ if os.environ["GITHUB_EVENT_NAME"] == "workflow_dispatch":
191
+ raise SystemExit(0)
192
+ if actual != expected:
193
+ raise SystemExit(f"tag {actual} does not match package version {expected}")
194
+ PY
195
+
196
+ - name: Download verified distributions
197
+ uses: actions/download-artifact@v8
198
+ with:
199
+ name: release-dist
200
+ path: dist
201
+
202
+ - name: Publish to PyPI
203
+ uses: pypa/gh-action-pypi-publish@release/v1
204
+ with:
205
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,11 @@
1
+ /target/
2
+ /.venv/
3
+ /.mypy_cache/
4
+ /.pytest_cache/
5
+ /.ruff_cache/
6
+ /dist/
7
+ /wheelhouse/
8
+ *.egg-info/
9
+ __pycache__/
10
+ *.py[cod]
11
+ python/solverforge/_native*.so
@@ -0,0 +1,31 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.5.0
4
+ hooks:
5
+ - id: check-yaml
6
+ - id: end-of-file-fixer
7
+ - id: trailing-whitespace
8
+ - id: check-merge-conflict
9
+ - id: check-added-large-files
10
+
11
+ - repo: https://github.com/gitleaks/gitleaks
12
+ rev: v8.18.0
13
+ hooks:
14
+ - id: gitleaks
15
+ - repo: https://github.com/psf/black
16
+ rev: 26.5.1
17
+ hooks:
18
+ - id: black
19
+
20
+ - repo: https://github.com/astral-sh/ruff-pre-commit
21
+ rev: v0.15.14
22
+ hooks:
23
+ - id: ruff
24
+ args: [--fix, --exit-non-zero-on-fix]
25
+ - repo: https://github.com/doublify/pre-commit-rust
26
+ rev: v1.0
27
+ hooks:
28
+ - id: fmt
29
+ args: ["--", "--check"]
30
+ - id: clippy
31
+ args: ["--", "-D", "warnings"]
@@ -0,0 +1 @@
1
+ 3.14t
@@ -0,0 +1,62 @@
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+
5
+ `solverforge-py` is a mixed Python/Rust binding package built with PyO3 and
6
+ maturin. Python package code lives under `python/solverforge/`; the native
7
+ extension, dynamic runtime bridge, callbacks, manager, and schema code live under
8
+ `src/`. Python tests are in `tests/python/`, Rust tests are in `tests/rust/`, and
9
+ examples are in `examples/`. The hospital demo owns its FastAPI app, static UI,
10
+ generated UI model, and seed data under `examples/solverforge_hospital/`.
11
+ `WIREFRAME.md` is the as-built API/UI map; `docs/` contains bridge and callback
12
+ contracts.
13
+
14
+ ## Build, Test, and Development Commands
15
+
16
+ - `make develop`: create `.venv`, install tools, and install the release native extension.
17
+ - `make test`: run `cargo test --locked` plus pytest.
18
+ - `make test-quick`: run fast Python regressions without the hospital app tests.
19
+ - `make test-hospital`: run the hospital model and FastAPI/frontend lifecycle tests.
20
+ - `make lint`: run rustfmt check, ruff, strict mypy, and clippy with warnings denied.
21
+ - `make docs-check`: verify the README, AGENTS, and WIREFRAME surface exists and avoids known stale claims.
22
+ - `make ci-local` or `make audit`: run the local CI simulation.
23
+ - `make pre-release`: run `ci-local` and build the release wheel.
24
+ - `make hospital-run`: serve the hospital app on `APP_HOST=127.0.0.1 PORT=7860`.
25
+
26
+ Use Rust `1.95.0` from `rust-toolchain.toml`. Python code targets Python `3.14`.
27
+
28
+ ## Coding Style & Naming Conventions
29
+
30
+ Python uses Ruff linting, strict mypy, and the 100-character line limit from
31
+ `pyproject.toml`; `make py-format` is available for an intentional Black pass.
32
+ Prefer typed public APIs and keep exports in `python/solverforge/__init__.py`
33
+ intentional. Use snake_case for Python modules, functions, and variables; use
34
+ PascalCase for classes. Rust follows rustfmt and clippy with `-D warnings`; keep
35
+ module names snake_case and public types descriptive.
36
+
37
+ ## Testing Guidelines
38
+
39
+ Add Python regression tests as `tests/python/test_*.py`. Add Rust integration or
40
+ unit coverage under `tests/rust/` or the relevant `src/` module. For binding
41
+ changes, prefer tests that prove Python behavior through the public `solverforge`
42
+ API, then add Rust tests only where native runtime behavior is directly changed.
43
+ Run the narrow suite first, then `make ci-local` for cross-language or
44
+ integration changes. Binding changes should normally prove behavior through the
45
+ public Python API and add Rust coverage only when native runtime behavior changes
46
+ directly.
47
+
48
+ ## Commit & Pull Request Guidelines
49
+
50
+ This checkout has no committed history yet, so no project-specific convention can
51
+ be inferred from Git. Use concise Conventional Commit-style subjects such as
52
+ `fix(runtime): preserve scalar snapshots` or `test(manager): cover retained jobs`.
53
+ Pull requests should include the motivation, user-visible behavior, tests run,
54
+ and any linked issue. Include screenshots or short recordings for changes under
55
+ `examples/solverforge_hospital/static/`.
56
+
57
+ ## Agent-Specific Instructions
58
+
59
+ Keep changes scoped to the requested surface. Do not rewrite runtime, callback,
60
+ manager, or API payload paths for a simple documentation, UI, naming, or wiring
61
+ task unless live evidence proves that path is the failing layer. Verify assumptions
62
+ from the repo before changing critical integration code.