solverforge 0.2.6__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.
- solverforge-0.4.0/.github/workflows/ci.yml +46 -0
- solverforge-0.4.0/.github/workflows/release.yml +205 -0
- solverforge-0.4.0/.gitignore +11 -0
- solverforge-0.4.0/.pre-commit-config.yaml +31 -0
- solverforge-0.4.0/.python-version +1 -0
- solverforge-0.4.0/AGENTS.md +62 -0
- solverforge-0.4.0/Cargo.lock +1173 -0
- solverforge-0.4.0/Cargo.toml +51 -0
- solverforge-0.4.0/LICENSE +201 -0
- solverforge-0.4.0/Makefile +363 -0
- solverforge-0.4.0/PKG-INFO +187 -0
- solverforge-0.4.0/README.md +155 -0
- solverforge-0.4.0/WIREFRAME.md +152 -0
- solverforge-0.4.0/docs/callback-contract.md +18 -0
- solverforge-0.4.0/docs/dynamic-move-parity-plan.md +203 -0
- solverforge-0.4.0/docs/goal.md +305 -0
- solverforge-0.4.0/docs/non-goals.md +9 -0
- solverforge-0.4.0/docs/release.md +90 -0
- solverforge-0.4.0/docs/threading.md +12 -0
- solverforge-0.4.0/docs/upstream-contract.md +33 -0
- solverforge-0.4.0/examples/list_tsp.py +20 -0
- solverforge-0.4.0/examples/mixed_job_shop.py +30 -0
- solverforge-0.4.0/examples/nqueens.py +36 -0
- solverforge-0.4.0/examples/shift_scheduling.py +45 -0
- solverforge-0.4.0/examples/solverforge_hospital/README.md +63 -0
- solverforge-0.4.0/examples/solverforge_hospital/__init__.py +43 -0
- solverforge-0.4.0/examples/solverforge_hospital/__main__.py +32 -0
- solverforge-0.4.0/examples/solverforge_hospital/solver.toml +38 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/__init__.py +41 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/api/__init__.py +20 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/api/dto.py +261 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/api/mod.py +20 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/api/routes.py +173 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/api/sse.py +42 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/__init__.py +3 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/assigned_shift.py +14 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/balance_assignments.py +20 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/desired_day.py +24 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/minimum_rest.py +33 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/mod.py +42 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/one_shift_per_day.py +16 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/overlapping_shift.py +28 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/required_skill.py +20 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/unavailable_employee.py +32 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/constraints/undesired_day.py +24 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/__init__.py +23 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/LARGE.json +1 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/__init__.py +13 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/availability.py +16 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/cohorts.py +14 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/coverage.py +14 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/demand.py +9 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/employees.py +18 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/entrypoints.py +32 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/large.py +16 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/preferences.py +17 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/shifts.py +20 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/skills.py +15 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/time_utils.py +5 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/validation.py +12 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/vocabulary.py +10 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/data_seed/witness.py +10 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/data/mod.py +3 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/domain/__init__.py +59 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/domain/care_hub.py +63 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/domain/employee.py +32 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/domain/mod.py +19 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/domain/plan.py +256 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/lib.py +56 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/main.py +22 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/solver/__init__.py +8 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/solver/mod.py +8 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/solver/service/__init__.py +202 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/solver/service/mod.py +8 -0
- solverforge-0.4.0/examples/solverforge_hospital/src/solver/service/payload.py +72 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/main.mjs +130 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/analysis-modal.mjs +79 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/datetime.mjs +60 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/employee-view.mjs +95 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/grouping.mjs +77 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/identity.mjs +33 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/location-view.mjs +42 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/presentation.mjs +116 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/schedule/rail-renderer.mjs +154 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/api-guide.mjs +104 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/app-shell.mjs +103 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/app-state.mjs +7 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/config-loader.mjs +63 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/data-panel.mjs +22 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/shell/solver-controller.mjs +134 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/app/views/registry.mjs +10 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/generated/ui-model.json +41 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/index.html +23 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/fonts/jetbrains-mono.woff2 +0 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/fonts/space-grotesk.woff2 +0 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/img/ouroboros.svg +60 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/modules/sf-map.css +77 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/modules/sf-map.js +165 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.0.6.5.css +2490 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.0.6.5.js +4012 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.0.6.5.mjs +3987 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.css +2490 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.js +4012 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/sf.mjs +3987 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/fontawesome/css/fontawesome.min.css +9 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/fontawesome/css/solid.min.css +6 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/frappe-gantt/frappe-gantt.min.css +1 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/frappe-gantt/frappe-gantt.min.js +2 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/leaflet/leaflet.css +661 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/leaflet/leaflet.js +6 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf/vendor/split/split.min.js +3 -0
- solverforge-0.4.0/examples/solverforge_hospital/static/sf-config.json +5 -0
- solverforge-0.4.0/examples/vrp_owner_hooks.py +21 -0
- solverforge-0.4.0/pyproject.toml +61 -0
- solverforge-0.4.0/python/solverforge/__init__.py +47 -0
- solverforge-0.4.0/python/solverforge/_native.pyi +20 -0
- solverforge-0.4.0/python/solverforge/config.py +160 -0
- solverforge-0.4.0/python/solverforge/console.py +7 -0
- solverforge-0.4.0/python/solverforge/constraints.py +293 -0
- solverforge-0.4.0/python/solverforge/decorators.py +97 -0
- solverforge-0.4.0/python/solverforge/errors.py +15 -0
- solverforge-0.4.0/python/solverforge/events.py +13 -0
- solverforge-0.4.0/python/solverforge/fields.py +61 -0
- solverforge-0.4.0/python/solverforge/joiner.py +28 -0
- solverforge-0.4.0/python/solverforge/manager.py +58 -0
- solverforge-0.4.0/python/solverforge/model.py +132 -0
- solverforge-0.4.0/python/solverforge/py.typed +1 -0
- solverforge-0.4.0/python/solverforge/score.py +171 -0
- solverforge-0.4.0/python/solverforge/solver.py +19 -0
- solverforge-0.4.0/python/solverforge/typing.py +17 -0
- solverforge-0.4.0/rust-toolchain.toml +3 -0
- solverforge-0.4.0/scripts/verify_release_artifacts.py +176 -0
- solverforge-0.4.0/scripts/verify_solverforge_release_base.py +124 -0
- solverforge-0.4.0/src/bindings.rs +32 -0
- solverforge-0.4.0/src/callbacks/call.rs +5 -0
- solverforge-0.4.0/src/callbacks/mod.rs +3 -0
- solverforge-0.4.0/src/callbacks/registry.rs +14 -0
- solverforge-0.4.0/src/callbacks/threading.rs +3 -0
- solverforge-0.4.0/src/config.rs +58 -0
- solverforge-0.4.0/src/constraints/evaluate.rs +80 -0
- solverforge-0.4.0/src/constraints/incremental.rs +6 -0
- solverforge-0.4.0/src/constraints/matches.rs +5 -0
- solverforge-0.4.0/src/constraints/mod.rs +23 -0
- solverforge-0.4.0/src/constraints/state.rs +1869 -0
- solverforge-0.4.0/src/constraints/stream_plan.rs +7 -0
- solverforge-0.4.0/src/descriptor/extractor.rs +89 -0
- solverforge-0.4.0/src/descriptor/mod.rs +2 -0
- solverforge-0.4.0/src/descriptor/variable.rs +5 -0
- solverforge-0.4.0/src/error.rs +9 -0
- solverforge-0.4.0/src/intern.rs +3 -0
- solverforge-0.4.0/src/lib.rs +16 -0
- solverforge-0.4.0/src/manager/events.rs +154 -0
- solverforge-0.4.0/src/manager/jobs.rs +156 -0
- solverforge-0.4.0/src/manager/mod.rs +4 -0
- solverforge-0.4.0/src/proxy/entity.rs +10 -0
- solverforge-0.4.0/src/proxy/list.rs +2 -0
- solverforge-0.4.0/src/proxy/mod.rs +3 -0
- solverforge-0.4.0/src/proxy/solution.rs +2 -0
- solverforge-0.4.0/src/runtime/distance.rs +17 -0
- solverforge-0.4.0/src/runtime/dynamic_scalar_search.rs +4169 -0
- solverforge-0.4.0/src/runtime/list_slots.rs +28 -0
- solverforge-0.4.0/src/runtime/mod.rs +30 -0
- solverforge-0.4.0/src/runtime/scalar_slots.rs +29 -0
- solverforge-0.4.0/src/runtime/static_fns.rs +21 -0
- solverforge-0.4.0/src/runtime/thread_local.rs +21 -0
- solverforge-0.4.0/src/schema/build.rs +43 -0
- solverforge-0.4.0/src/schema/mod.rs +8 -0
- solverforge-0.4.0/src/schema/parse.rs +119 -0
- solverforge-0.4.0/src/schema/python.rs +15 -0
- solverforge-0.4.0/src/schema/types.rs +44 -0
- solverforge-0.4.0/src/schema/validate.rs +20 -0
- solverforge-0.4.0/src/score.rs +132 -0
- solverforge-0.4.0/src/solver/api.rs +113 -0
- solverforge-0.4.0/src/solver/console.rs +78 -0
- solverforge-0.4.0/src/solver/mod.rs +7 -0
- solverforge-0.4.0/src/solver/progress.rs +5 -0
- solverforge-0.4.0/src/solver/result.rs +6 -0
- solverforge-0.4.0/src/solver/solvable.rs +55 -0
- solverforge-0.4.0/src/state/clone.rs +5 -0
- solverforge-0.4.0/src/state/entity_table.rs +49 -0
- solverforge-0.4.0/src/state/marshal.rs +155 -0
- solverforge-0.4.0/src/state/mod.rs +7 -0
- solverforge-0.4.0/src/state/solution.rs +233 -0
- solverforge-0.4.0/src/state/variables.rs +22 -0
- solverforge-0.4.0/src/value.rs +64 -0
- solverforge-0.4.0/tests/python/test_config.py +196 -0
- solverforge-0.4.0/tests/python/test_constraints.py +341 -0
- solverforge-0.4.0/tests/python/test_decorators.py +53 -0
- solverforge-0.4.0/tests/python/test_hospital_example.py +169 -0
- solverforge-0.4.0/tests/python/test_hospital_frontend_app.py +262 -0
- solverforge-0.4.0/tests/python/test_list_solving.py +336 -0
- solverforge-0.4.0/tests/python/test_manager.py +47 -0
- solverforge-0.4.0/tests/python/test_mixed_solving.py +8 -0
- solverforge-0.4.0/tests/python/test_release_metadata.py +124 -0
- solverforge-0.4.0/tests/python/test_scalar_solving.py +851 -0
- solverforge-0.4.0/tests/python/test_threading.py +11 -0
- solverforge-0.4.0/tests/python/test_tracebacks.py +40 -0
- solverforge-0.4.0/tests/rust/constraint_set.rs +33 -0
- solverforge-0.4.0/tests/rust/descriptor.rs +73 -0
- solverforge-0.4.0/tests/rust/manager.rs +6 -0
- solverforge-0.4.0/tests/rust/runtime_slots.rs +92 -0
- solverforge-0.4.0/tests/rust/score.rs +8 -0
- solverforge-0.4.0/tests/rust/state_clone.rs +97 -0
- solverforge-0.4.0/tests/rust.rs +16 -0
- solverforge-0.2.6/Cargo.lock +0 -2427
- solverforge-0.2.6/Cargo.toml +0 -59
- solverforge-0.2.6/PKG-INFO +0 -83
- solverforge-0.2.6/README.md +0 -57
- solverforge-0.2.6/pyproject.toml +0 -38
- solverforge-0.2.6/python/solverforge/__init__.py +0 -156
- solverforge-0.2.6/python/solverforge/solver/__init__.py +0 -376
- solverforge-0.2.6/python/solverforge/solver/config.py +0 -221
- solverforge-0.2.6/python/solverforge/solver/domain.py +0 -45
- solverforge-0.2.6/python/solverforge/solver/score.py +0 -51
- solverforge-0.2.6/python/solverforge/test/__init__.py +0 -746
- solverforge-0.2.6/solverforge-core/Cargo.toml +0 -43
- solverforge-0.2.6/solverforge-core/README.md +0 -64
- solverforge-0.2.6/solverforge-core/src/analysis/explanation.rs +0 -406
- solverforge-0.2.6/solverforge-core/src/analysis/manager.rs +0 -329
- solverforge-0.2.6/solverforge-core/src/analysis/mod.rs +0 -5
- solverforge-0.2.6/solverforge-core/src/bridge.rs +0 -315
- solverforge-0.2.6/solverforge-core/src/constraints/collectors.rs +0 -445
- solverforge-0.2.6/solverforge-core/src/constraints/constraint.rs +0 -315
- solverforge-0.2.6/solverforge-core/src/constraints/joiners.rs +0 -597
- solverforge-0.2.6/solverforge-core/src/constraints/mod.rs +0 -9
- solverforge-0.2.6/solverforge-core/src/constraints/stream.rs +0 -587
- solverforge-0.2.6/solverforge-core/src/domain/annotations.rs +0 -305
- solverforge-0.2.6/solverforge-core/src/domain/class.rs +0 -431
- solverforge-0.2.6/solverforge-core/src/domain/constraint_config.rs +0 -100
- solverforge-0.2.6/solverforge-core/src/domain/mod.rs +0 -13
- solverforge-0.2.6/solverforge-core/src/domain/model.rs +0 -441
- solverforge-0.2.6/solverforge-core/src/domain/shadow.rs +0 -331
- solverforge-0.2.6/solverforge-core/src/error.rs +0 -100
- solverforge-0.2.6/solverforge-core/src/handles.rs +0 -171
- solverforge-0.2.6/solverforge-core/src/lib.rs +0 -80
- solverforge-0.2.6/solverforge-core/src/score/bendable.rs +0 -554
- solverforge-0.2.6/solverforge-core/src/score/hard_soft.rs +0 -506
- solverforge-0.2.6/solverforge-core/src/score/hard_soft_decimal.rs +0 -481
- solverforge-0.2.6/solverforge-core/src/score/mod.rs +0 -25
- solverforge-0.2.6/solverforge-core/src/score/simple.rs +0 -168
- solverforge-0.2.6/solverforge-core/src/score/simple_decimal.rs +0 -188
- solverforge-0.2.6/solverforge-core/src/solver/builder.rs +0 -857
- solverforge-0.2.6/solverforge-core/src/solver/client.rs +0 -191
- solverforge-0.2.6/solverforge-core/src/solver/config.rs +0 -216
- solverforge-0.2.6/solverforge-core/src/solver/environment.rs +0 -195
- solverforge-0.2.6/solverforge-core/src/solver/factory.rs +0 -284
- solverforge-0.2.6/solverforge-core/src/solver/mod.rs +0 -22
- solverforge-0.2.6/solverforge-core/src/solver/request.rs +0 -641
- solverforge-0.2.6/solverforge-core/src/solver/response.rs +0 -467
- solverforge-0.2.6/solverforge-core/src/solver/termination.rs +0 -249
- solverforge-0.2.6/solverforge-core/src/traits.rs +0 -495
- solverforge-0.2.6/solverforge-core/src/value.rs +0 -402
- solverforge-0.2.6/solverforge-core/src/wasm/expr_builder.rs +0 -534
- solverforge-0.2.6/solverforge-core/src/wasm/expression.rs +0 -614
- solverforge-0.2.6/solverforge-core/src/wasm/generator.rs +0 -1617
- solverforge-0.2.6/solverforge-core/src/wasm/host_functions.rs +0 -240
- solverforge-0.2.6/solverforge-core/src/wasm/memory.rs +0 -300
- solverforge-0.2.6/solverforge-core/src/wasm/mod.rs +0 -16
- solverforge-0.2.6/solverforge-python/Cargo.toml +0 -37
- solverforge-0.2.6/solverforge-python/README.md +0 -57
- solverforge-0.2.6/solverforge-python/python/solverforge/__init__.py +0 -156
- solverforge-0.2.6/solverforge-python/python/solverforge/solver/__init__.py +0 -376
- solverforge-0.2.6/solverforge-python/python/solverforge/solver/config.py +0 -221
- solverforge-0.2.6/solverforge-python/python/solverforge/solver/domain.py +0 -45
- solverforge-0.2.6/solverforge-python/python/solverforge/solver/score.py +0 -51
- solverforge-0.2.6/solverforge-python/python/solverforge/test/__init__.py +0 -746
- solverforge-0.2.6/solverforge-python/src/analysis.rs +0 -414
- solverforge-0.2.6/solverforge-python/src/annotations.rs +0 -747
- solverforge-0.2.6/solverforge-python/src/bridge.rs +0 -1031
- solverforge-0.2.6/solverforge-python/src/collectors.rs +0 -531
- solverforge-0.2.6/solverforge-python/src/decorators.rs +0 -760
- solverforge-0.2.6/solverforge-python/src/joiners.rs +0 -400
- solverforge-0.2.6/solverforge-python/src/lambda_analyzer.rs +0 -1578
- solverforge-0.2.6/solverforge-python/src/lib.rs +0 -195
- solverforge-0.2.6/solverforge-python/src/score.rs +0 -1714
- solverforge-0.2.6/solverforge-python/src/service.rs +0 -299
- solverforge-0.2.6/solverforge-python/src/solver.rs +0 -1644
- solverforge-0.2.6/solverforge-python/src/stream.rs +0 -2017
- solverforge-0.2.6/solverforge-service/Cargo.toml +0 -33
- solverforge-0.2.6/solverforge-service/README.md +0 -89
- solverforge-0.2.6/solverforge-service/src/config.rs +0 -106
- solverforge-0.2.6/solverforge-service/src/error.rs +0 -51
- solverforge-0.2.6/solverforge-service/src/jar.rs +0 -246
- solverforge-0.2.6/solverforge-service/src/lib.rs +0 -18
- solverforge-0.2.6/solverforge-service/src/service.rs +0 -242
- solverforge-0.2.6/solverforge-service/src/util.rs +0 -171
- solverforge-0.2.6/solverforge-service/tests/employee_scheduling_integration.rs +0 -984
- solverforge-0.2.6/solverforge-service/tests/integration.rs +0 -61
- solverforge-0.2.6/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,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.
|