solverforge 0.7.1__tar.gz → 0.7.2__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.7.1 → solverforge-0.7.2}/Cargo.lock +1 -1
- {solverforge-0.7.1 → solverforge-0.7.2}/Cargo.toml +1 -1
- {solverforge-0.7.1 → solverforge-0.7.2}/PKG-INFO +5 -5
- {solverforge-0.7.1 → solverforge-0.7.2}/README.md +4 -4
- {solverforge-0.7.1 → solverforge-0.7.2}/pyproject.toml +1 -1
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/__init__.py +1 -1
- {solverforge-0.7.1 → solverforge-0.7.2}/src/bindings.rs +1 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/error.rs +18 -1
- {solverforge-0.7.1 → solverforge-0.7.2}/LICENSE +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/_native.pyi +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/config.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/console.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/constraints.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/decorators.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/errors.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/events.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/fields.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/groups.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/joiner.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/manager.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/model.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/py.typed +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/score.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/solver.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/typing.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/python/solverforge/ui.py +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/rust-toolchain.toml +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/callbacks/call.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/callbacks/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/callbacks/registry.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/callbacks/threading.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/config.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/compiled.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/compiled_dispatch_tests.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/evaluate.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/incremental.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/list_precedence.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/list_precedence_tests.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/matches.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/state.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/constraints/stream_plan.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/descriptor/extractor.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/descriptor/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/descriptor/variable.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/intern.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/lib.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/manager/candidate_trace.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/manager/events.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/manager/jobs.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/manager/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/manager/provenance.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/proxy/entity.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/proxy/list.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/proxy/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/proxy/solution.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/runtime/candidate_metric.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/runtime/dynamic_assignment_group.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/runtime/dynamic_provider.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/runtime/list_slots.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/runtime/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/runtime/scalar_slots.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/schema/build.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/schema/compiled.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/schema/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/schema/parse.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/schema/python.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/schema/runtime_plan.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/schema/types.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/schema/validate.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/score.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/solver/api.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/solver/console.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/solver/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/solver/progress.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/solver/result.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/solver/solvable.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/state/callback_view.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/state/clone.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/state/entity_table.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/state/marshal.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/state/mod.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/state/solution.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/state/variables.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/ui.rs +0 -0
- {solverforge-0.7.1 → solverforge-0.7.2}/src/value.rs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: solverforge
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -51,12 +51,12 @@ requirements, and other APIs that are not part of this package.
|
|
|
51
51
|
|
|
52
52
|
## Installation
|
|
53
53
|
|
|
54
|
-
The package version prepared by this checkout is `solverforge` `0.7.
|
|
54
|
+
The package version prepared by this checkout is `solverforge` `0.7.2`, targeting
|
|
55
55
|
the published and registry-locked SolverForge Rust `0.23.0` dependency base.
|
|
56
56
|
Install the matching package after its Python release with:
|
|
57
57
|
|
|
58
58
|
```sh
|
|
59
|
-
python3.14 -m pip install "solverforge==0.7.
|
|
59
|
+
python3.14 -m pip install "solverforge==0.7.2"
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
The installable wheel contains the core `solverforge` package, native extension,
|
|
@@ -76,12 +76,12 @@ make deliveries-run PORT=7861
|
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
The same source-checkout examples can be run against the matching published
|
|
79
|
-
package once `0.7.
|
|
79
|
+
package once `0.7.2` is released, without `PYTHONPATH` or an editable checkout:
|
|
80
80
|
|
|
81
81
|
```sh
|
|
82
82
|
python3.14 -m venv .venv-examples
|
|
83
83
|
. .venv-examples/bin/activate
|
|
84
|
-
python -m pip install "solverforge[examples]==0.7.
|
|
84
|
+
python -m pip install "solverforge[examples]==0.7.2"
|
|
85
85
|
python examples/nqueens.py
|
|
86
86
|
python -m examples.solverforge_hospital
|
|
87
87
|
python -m examples.solverforge_deliveries
|
|
@@ -20,12 +20,12 @@ requirements, and other APIs that are not part of this package.
|
|
|
20
20
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
23
|
-
The package version prepared by this checkout is `solverforge` `0.7.
|
|
23
|
+
The package version prepared by this checkout is `solverforge` `0.7.2`, targeting
|
|
24
24
|
the published and registry-locked SolverForge Rust `0.23.0` dependency base.
|
|
25
25
|
Install the matching package after its Python release with:
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
|
-
python3.14 -m pip install "solverforge==0.7.
|
|
28
|
+
python3.14 -m pip install "solverforge==0.7.2"
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
The installable wheel contains the core `solverforge` package, native extension,
|
|
@@ -45,12 +45,12 @@ make deliveries-run PORT=7861
|
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
The same source-checkout examples can be run against the matching published
|
|
48
|
-
package once `0.7.
|
|
48
|
+
package once `0.7.2` is released, without `PYTHONPATH` or an editable checkout:
|
|
49
49
|
|
|
50
50
|
```sh
|
|
51
51
|
python3.14 -m venv .venv-examples
|
|
52
52
|
. .venv-examples/bin/activate
|
|
53
|
-
python -m pip install "solverforge[examples]==0.7.
|
|
53
|
+
python -m pip install "solverforge[examples]==0.7.2"
|
|
54
54
|
python examples/nqueens.py
|
|
55
55
|
python -m examples.solverforge_hospital
|
|
56
56
|
python -m examples.solverforge_deliveries
|
|
@@ -12,6 +12,7 @@ fn init_console() {
|
|
|
12
12
|
|
|
13
13
|
#[pymodule(gil_used = false)]
|
|
14
14
|
fn _native(py: Python<'_>, module: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
15
|
+
crate::error::install_callback_panic_hook();
|
|
15
16
|
module.add(
|
|
16
17
|
"NativeSolverError",
|
|
17
18
|
py.get_type::<crate::error::NativeSolverError>(),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
use std::any::Any;
|
|
2
|
-
use std::panic::panic_any;
|
|
2
|
+
use std::panic::{panic_any, set_hook, take_hook};
|
|
3
|
+
use std::sync::Once;
|
|
3
4
|
|
|
4
5
|
use pyo3::create_exception;
|
|
5
6
|
use pyo3::exceptions::PyRuntimeError;
|
|
@@ -23,6 +24,22 @@ pub fn panic_with_py_err<T>(error: PyErr) -> T {
|
|
|
23
24
|
panic_any(SolverPanicPayload::new(message, error))
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
/// Keeps std's default hook from printing `thread panicked at src/error.rs`
|
|
28
|
+
/// for a callback error unwinding through the solver. That panic only carries
|
|
29
|
+
/// the Python error to `panic_to_py_err` (or the retained job's failure
|
|
30
|
+
/// status), which reports it once; every other panic reaches the previous hook.
|
|
31
|
+
pub fn install_callback_panic_hook() {
|
|
32
|
+
static INSTALL: Once = Once::new();
|
|
33
|
+
INSTALL.call_once(|| {
|
|
34
|
+
let previous = take_hook();
|
|
35
|
+
set_hook(Box::new(move |info| {
|
|
36
|
+
if !info.payload().is::<SolverPanicPayload>() {
|
|
37
|
+
previous(info);
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
pub fn panic_to_py_err(payload: Box<dyn Any + Send>) -> PyErr {
|
|
27
44
|
let payload = match payload.downcast::<SolverPanicPayload>() {
|
|
28
45
|
Ok(payload) => {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|