laprust 1.1.1__tar.gz → 1.2.1__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.
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/README.md +24 -17
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/check_wheel.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/conftest.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/test_benchmarks.py +38 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/test_editable_install.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/.github/workflows/benchmark_batch.yaml +5 -15
- {laprust-1.1.1 → laprust-1.2.1}/.github/workflows/benchmark_single.yaml +5 -15
- {laprust-1.1.1 → laprust-1.2.1}/.github/workflows/benchmark_tracking.yaml +5 -15
- {laprust-1.1.1 → laprust-1.2.1}/.github/workflows/prepublish.yaml +4 -4
- laprust-1.2.1/CHANGELOG.md +104 -0
- laprust-1.2.1/CONTRIBUTING.md +117 -0
- {laprust-1.1.1 → laprust-1.2.1}/NOTICE +1 -1
- laprust-1.2.1/PKG-INFO +273 -0
- laprust-1.2.1/README.md +198 -0
- laprust-1.2.1/benchmarks/README.md +153 -0
- {laprust-1.1.1 → laprust-1.2.1}/benchmarks/_common.py +33 -15
- {laprust-1.1.1 → laprust-1.2.1}/benchmarks/benchmark_single.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/benchmarks/benchmark_tracking.py +2 -2
- laprust-1.2.1/benchmarks/initialization-policy.md +22 -0
- laprust-1.2.1/docs/api.md +96 -0
- {laprust-1.1.1 → laprust-1.2.1}/examples/basic.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/laprust/__init__.py +2 -2
- {laprust-1.1.1 → laprust-1.2.1}/laprust/_lapjv.pyi +8 -6
- laprust-1.2.1/laprust/py.typed +3 -0
- laprust-1.2.1/laprust.egg-info/PKG-INFO +273 -0
- {laprust-1.1.1 → laprust-1.2.1}/laprust.egg-info/SOURCES.txt +1 -0
- {laprust-1.1.1 → laprust-1.2.1}/laprust.egg-info/requires.txt +3 -1
- {laprust-1.1.1 → laprust-1.2.1}/setup.py +28 -12
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/_lapjv.cpp +553 -492
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/_lapjv.pyx +92 -67
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/src/ffi.rs +4 -3
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/src/profile.rs +2 -1
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/src/rectangular.rs +59 -31
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/src/square.rs +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/src/test_faults.rs +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/README.md +50 -41
- {laprust-1.1.1 → laprust-1.2.1}/tests/assignment_checks.py +3 -3
- {laprust-1.1.1 → laprust-1.2.1}/tests/check_native_errors.py +4 -3
- {laprust-1.1.1 → laprust-1.2.1}/tests/check_scipy_free.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/conftest.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/lapjv_cases.py +3 -3
- {laprust-1.1.1 → laprust-1.2.1}/tests/test_batch_paths.py +4 -4
- {laprust-1.1.1 → laprust-1.2.1}/tests/test_core.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/test_cross_package.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/test_edge_cases.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/test_float32_working_precision.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/test_lapjv.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/test_package.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/test_regressions.py +1 -1
- {laprust-1.1.1 → laprust-1.2.1}/tests/typing/return_types.py +1 -1
- laprust-1.1.1/CHANGELOG.md +0 -70
- laprust-1.1.1/CONTRIBUTING.md +0 -110
- laprust-1.1.1/PKG-INFO +0 -219
- laprust-1.1.1/README.md +0 -152
- laprust-1.1.1/benchmarks/README.md +0 -119
- laprust-1.1.1/docs/api.md +0 -72
- laprust-1.1.1/laprust/py.typed +0 -3
- laprust-1.1.1/laprust.egg-info/PKG-INFO +0 -219
- {laprust-1.1.1 → laprust-1.2.1}/.github/constraints/numpy-armv7-build.txt +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/check_dist.py +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/install_numpy_compat.py +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/pytest.ini +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/requirements.txt +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/tests/test_setup.py +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/workflows/integration.yaml +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/workflows/native.yaml +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/workflows/publish.yaml +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/.github/workflows/tests.yaml +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/LICENSE +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/MANIFEST.in +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/benchmarks/benchmark_batch.py +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/benchmarks/ci_run.py +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/laprust/__init__.pyi +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/laprust.egg-info/dependency_links.txt +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/laprust.egg-info/top_level.txt +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/pyproject.toml +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/setup.cfg +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/Cargo.lock +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/Cargo.toml +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/LICENSE +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/THIRD_PARTY_NOTICES +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/examples/profile.rs +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/lapjv.h +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/src/ffi_tests.rs +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/src/_lapjv/src/lib.rs +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/tests/LICENSE +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/tests/cost_eps.csv.gz +0 -0
- {laprust-1.1.1 → laprust-1.2.1}/tests/regression_cases.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Build, packaging, and benchmark-tool checks
|
|
2
2
|
|
|
3
3
|
Solver behavior, native error handling, cross-package solver comparisons, and
|
|
4
|
-
public API typing checks
|
|
5
|
-
This directory
|
|
6
|
-
benchmark-tool checks
|
|
4
|
+
public API typing checks are in [tests/](../../tests/README.md).
|
|
5
|
+
This directory contains build configuration, installation, distribution, and
|
|
6
|
+
benchmark-tool checks. It has its own pytest configuration and dependencies.
|
|
7
7
|
|
|
8
8
|
## Routine checks
|
|
9
9
|
|
|
@@ -29,7 +29,9 @@ The portable solver suite runs separately with `python tests/check_scipy_free.py
|
|
|
29
29
|
|
|
30
30
|
## Distributions and runtime compatibility
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
1. Build the source archive and wheel.
|
|
33
|
+
2. Install the wheel.
|
|
34
|
+
3. Run these checks from the repository root:
|
|
33
35
|
|
|
34
36
|
```sh
|
|
35
37
|
python .github/tests/check_dist.py
|
|
@@ -37,37 +39,42 @@ python .github/tests/check_wheel.py
|
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
`check_dist.py` verifies metadata, namespaces, licenses, and source-archive
|
|
40
|
-
contents.
|
|
41
|
-
|
|
42
|
+
contents. Source archives include the solver suite and these CI checks.
|
|
43
|
+
Full CI runs can therefore validate wheels built from source archives.
|
|
42
44
|
`check_wheel.py` checks the installed package and rejects imports from the source
|
|
43
|
-
checkout.
|
|
45
|
+
checkout. With NumPy and the wheel installed, run the command with the path shown above.
|
|
44
46
|
`install_numpy_compat.py` installs the NumPy/SciPy versions selected by CI and
|
|
45
47
|
checks the built wheel against that runtime.
|
|
46
48
|
|
|
47
49
|
## Isolated editable installs
|
|
48
50
|
|
|
49
|
-
These checks require access to the package index
|
|
50
|
-
|
|
51
|
+
These checks require access to the package index, a native C++17 compiler, Rust, and Cargo.
|
|
52
|
+
Run from the repository root:
|
|
51
53
|
|
|
52
54
|
```sh
|
|
53
55
|
python -m pytest -q .github/tests/test_editable_install.py --run-editable
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
virtual environment without system site packages.
|
|
58
|
-
and compatibility modes, visible source edits,
|
|
59
|
-
dependencies, type stubs, wheel replacement, and
|
|
60
|
-
They do not modify the working checkout or the
|
|
58
|
+
These checks copy the current source into a temporary checkout.
|
|
59
|
+
They create a fresh virtual environment without system site packages.
|
|
60
|
+
They check default, strict, and compatibility modes, visible source edits,
|
|
61
|
+
native imports, standalone dependencies, type stubs, wheel replacement, and
|
|
62
|
+
editable reinstallation. They do not modify the working checkout or the
|
|
63
|
+
environment from which you run them.
|
|
61
64
|
Without `--run-editable`, pytest skips this group.
|
|
62
65
|
|
|
63
66
|
The [tests workflow](../workflows/tests.yaml) runs solver and build/tool checks
|
|
64
67
|
in separate steps, including the older-NumPy jobs. The
|
|
65
68
|
[integration workflow](../workflows/integration.yaml) runs the editable group
|
|
66
|
-
separately from cross-package solver checks.
|
|
69
|
+
separately from cross-package solver checks.
|
|
70
|
+
|
|
71
|
+
Publish and prepublish run only
|
|
67
72
|
the NumPy-only installed-wheel smoke check for each cibuildwheel target.
|
|
68
|
-
Manual prepublish runs default to Python 3.9 and 3.15, matching LAPX
|
|
69
|
-
|
|
73
|
+
Manual prepublish runs default to Python 3.9 and 3.15, matching LAPX.
|
|
74
|
+
To build every supported Python version, select `full`.
|
|
75
|
+
Publishing always requests
|
|
70
76
|
the full Python 3.9-3.15 wheel set. Release builds run in two Python groups,
|
|
71
77
|
with separate jobs for each architecture and Linux wheel type.
|
|
78
|
+
|
|
72
79
|
Integration and native/sanitizer workflows run on pull requests or manual
|
|
73
80
|
dispatch, separately from publishing, matching LAPX's release workflow.
|
|
@@ -153,6 +153,44 @@ def test_inputs_and_default_precision_match_pinned_reference():
|
|
|
153
153
|
assert args.dtype == "float64" and args.seed == 2026 and args.repeats == 3
|
|
154
154
|
|
|
155
155
|
|
|
156
|
+
@pytest.mark.parametrize("installed, loaded", [
|
|
157
|
+
("0.12.0", "0.12.0"), ("0.13.0", "0.12.0"), ("0.12.0", "0.13.0"),
|
|
158
|
+
("0.9.0", "0.9.0"), ("0.13.0rc1", "0.13.0rc1"),
|
|
159
|
+
("0.14.0", "0.13.0"), ("0.13.0", "0.14.0"), ("1.0.0", "0.14.0"),
|
|
160
|
+
])
|
|
161
|
+
def test_environment_rejects_wrong_lapx_distribution_or_shadowed_module(monkeypatch, installed, loaded):
|
|
162
|
+
monkeypatch.setattr(bench.importlib.metadata, "distribution",
|
|
163
|
+
lambda name: SimpleNamespace(version=installed))
|
|
164
|
+
modules = {"lapx": SimpleNamespace(__version__=loaded)}
|
|
165
|
+
with pytest.raises(RuntimeError, match=r"require lapx>=0\.13\.0"):
|
|
166
|
+
bench.environment("single", SimpleNamespace(), modules, {})
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
@pytest.mark.parametrize("installed, loaded", [("unknown", "0.13.0"), ("0.13.0", "unknown")])
|
|
170
|
+
def test_environment_reports_unparseable_lapx_versions(monkeypatch, installed, loaded):
|
|
171
|
+
monkeypatch.setattr(bench.importlib.metadata, "distribution",
|
|
172
|
+
lambda name: SimpleNamespace(version=installed))
|
|
173
|
+
modules = {"lapx": SimpleNamespace(__version__=loaded)}
|
|
174
|
+
with pytest.raises(RuntimeError, match="Cannot verify LAPX versions"):
|
|
175
|
+
bench.environment("single", SimpleNamespace(), modules, {})
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
@pytest.mark.parametrize("installed, loaded", [
|
|
179
|
+
("0.13.0", "0.13.0"), ("0.13.1", "0.13.1"), ("0.14.0", "0.14.0"),
|
|
180
|
+
("1.0.0", "1.0.0"), ("0.13.0.post1", "0.13.0.post1"), ("0.13.0", "0.13"),
|
|
181
|
+
])
|
|
182
|
+
@pytest.mark.parametrize("provenance", [None, '{"url": "file:///example/lapx"}'])
|
|
183
|
+
def test_environment_accepts_supported_lapx_and_records_actual_provenance(monkeypatch, installed, loaded, provenance):
|
|
184
|
+
monkeypatch.setattr(bench.importlib.metadata, "distribution", lambda name: SimpleNamespace(
|
|
185
|
+
version=installed, read_text=lambda filename: provenance))
|
|
186
|
+
modules = {"lapx": SimpleNamespace(__version__=loaded, __file__="example/lap/__init__.py")}
|
|
187
|
+
metadata = bench.environment("single", SimpleNamespace(dtype="float64"), modules, {})
|
|
188
|
+
assert metadata["reference_release"] == "v0.13.0"
|
|
189
|
+
assert metadata["versions"]["lapx"] == loaded
|
|
190
|
+
assert metadata["modules"]["lapx"] == "example/lap/__init__.py"
|
|
191
|
+
assert metadata["lapx_source"] == (None if provenance is None else {"url": "file:///example/lapx"})
|
|
192
|
+
|
|
193
|
+
|
|
156
194
|
def test_timing_excludes_generation_warmup_checks_and_dispatch(monkeypatch):
|
|
157
195
|
clock = [0.]
|
|
158
196
|
in_timer = [False]
|
|
@@ -6,10 +6,6 @@ on:
|
|
|
6
6
|
description: lapcpp branch, tag, or commit to compare
|
|
7
7
|
required: true
|
|
8
8
|
default: main
|
|
9
|
-
lapx_ref:
|
|
10
|
-
description: LAPX branch, tag, or commit to compare
|
|
11
|
-
required: true
|
|
12
|
-
default: v0.11.1
|
|
13
9
|
repeats:
|
|
14
10
|
description: Timing rounds (sub-millisecond cases use at least 7)
|
|
15
11
|
required: true
|
|
@@ -36,12 +32,6 @@ jobs:
|
|
|
36
32
|
repository: rathaROG/lapcpp
|
|
37
33
|
ref: ${{ inputs.counterpart_ref }}
|
|
38
34
|
path: lapcpp
|
|
39
|
-
- name: Check out LAPX from GitHub
|
|
40
|
-
uses: actions/checkout@v7
|
|
41
|
-
with:
|
|
42
|
-
repository: rathaROG/lapx
|
|
43
|
-
ref: ${{ inputs.lapx_ref }}
|
|
44
|
-
path: lapx
|
|
45
35
|
- uses: actions/setup-python@v7
|
|
46
36
|
with:
|
|
47
37
|
python-version: '3.11'
|
|
@@ -49,18 +39,18 @@ jobs:
|
|
|
49
39
|
run: |
|
|
50
40
|
rustup toolchain install stable --profile minimal
|
|
51
41
|
rustup default stable
|
|
52
|
-
- name: Install
|
|
42
|
+
- name: Install source checkouts and benchmark dependencies
|
|
53
43
|
run: >-
|
|
54
44
|
python -m pip install
|
|
55
45
|
"${{ github.workspace }}/lapcpp"
|
|
56
46
|
"${{ github.workspace }}/laprust"
|
|
57
|
-
"
|
|
58
|
-
scipy
|
|
59
|
-
- name: Record revisions
|
|
47
|
+
"lapx>=0.13.0"
|
|
48
|
+
scipy packaging
|
|
49
|
+
- name: Record source revisions and LAPX version
|
|
60
50
|
run: |
|
|
61
51
|
git -C "${{ github.workspace }}/lapcpp" rev-parse HEAD
|
|
62
52
|
git -C "${{ github.workspace }}/laprust" rev-parse HEAD
|
|
63
|
-
|
|
53
|
+
python -c "from importlib.metadata import version; print('lapx==' + version('lapx'))"
|
|
64
54
|
- name: Run five-candidate benchmark
|
|
65
55
|
working-directory: ${{ github.workspace }}/laprust
|
|
66
56
|
env:
|
|
@@ -6,10 +6,6 @@ on:
|
|
|
6
6
|
description: lapcpp branch, tag, or commit to compare
|
|
7
7
|
required: true
|
|
8
8
|
default: main
|
|
9
|
-
lapx_ref:
|
|
10
|
-
description: LAPX branch, tag, or commit to compare
|
|
11
|
-
required: true
|
|
12
|
-
default: v0.11.1
|
|
13
9
|
repeats:
|
|
14
10
|
description: Timing rounds (sub-millisecond cases use at least 7)
|
|
15
11
|
required: true
|
|
@@ -36,12 +32,6 @@ jobs:
|
|
|
36
32
|
repository: rathaROG/lapcpp
|
|
37
33
|
ref: ${{ inputs.counterpart_ref }}
|
|
38
34
|
path: lapcpp
|
|
39
|
-
- name: Check out LAPX from GitHub
|
|
40
|
-
uses: actions/checkout@v7
|
|
41
|
-
with:
|
|
42
|
-
repository: rathaROG/lapx
|
|
43
|
-
ref: ${{ inputs.lapx_ref }}
|
|
44
|
-
path: lapx
|
|
45
35
|
- uses: actions/setup-python@v7
|
|
46
36
|
with:
|
|
47
37
|
python-version: '3.11'
|
|
@@ -49,18 +39,18 @@ jobs:
|
|
|
49
39
|
run: |
|
|
50
40
|
rustup toolchain install stable --profile minimal
|
|
51
41
|
rustup default stable
|
|
52
|
-
- name: Install
|
|
42
|
+
- name: Install source checkouts and benchmark dependencies
|
|
53
43
|
run: >-
|
|
54
44
|
python -m pip install
|
|
55
45
|
"${{ github.workspace }}/lapcpp"
|
|
56
46
|
"${{ github.workspace }}/laprust"
|
|
57
|
-
"
|
|
58
|
-
scipy
|
|
59
|
-
- name: Record revisions
|
|
47
|
+
"lapx>=0.13.0"
|
|
48
|
+
scipy packaging
|
|
49
|
+
- name: Record source revisions and LAPX version
|
|
60
50
|
run: |
|
|
61
51
|
git -C "${{ github.workspace }}/lapcpp" rev-parse HEAD
|
|
62
52
|
git -C "${{ github.workspace }}/laprust" rev-parse HEAD
|
|
63
|
-
|
|
53
|
+
python -c "from importlib.metadata import version; print('lapx==' + version('lapx'))"
|
|
64
54
|
- name: Run five-candidate benchmark
|
|
65
55
|
working-directory: ${{ github.workspace }}/laprust
|
|
66
56
|
env:
|
|
@@ -6,10 +6,6 @@ on:
|
|
|
6
6
|
description: lapcpp branch, tag, or commit to compare
|
|
7
7
|
required: true
|
|
8
8
|
default: main
|
|
9
|
-
lapx_ref:
|
|
10
|
-
description: LAPX branch, tag, or commit to compare
|
|
11
|
-
required: true
|
|
12
|
-
default: v0.11.1
|
|
13
9
|
repeats:
|
|
14
10
|
description: Timing rounds (sub-millisecond cases use at least 7)
|
|
15
11
|
required: true
|
|
@@ -36,12 +32,6 @@ jobs:
|
|
|
36
32
|
repository: rathaROG/lapcpp
|
|
37
33
|
ref: ${{ inputs.counterpart_ref }}
|
|
38
34
|
path: lapcpp
|
|
39
|
-
- name: Check out LAPX from GitHub
|
|
40
|
-
uses: actions/checkout@v7
|
|
41
|
-
with:
|
|
42
|
-
repository: rathaROG/lapx
|
|
43
|
-
ref: ${{ inputs.lapx_ref }}
|
|
44
|
-
path: lapx
|
|
45
35
|
- uses: actions/setup-python@v7
|
|
46
36
|
with:
|
|
47
37
|
python-version: '3.11'
|
|
@@ -49,18 +39,18 @@ jobs:
|
|
|
49
39
|
run: |
|
|
50
40
|
rustup toolchain install stable --profile minimal
|
|
51
41
|
rustup default stable
|
|
52
|
-
- name: Install
|
|
42
|
+
- name: Install source checkouts and benchmark dependencies
|
|
53
43
|
run: >-
|
|
54
44
|
python -m pip install
|
|
55
45
|
"${{ github.workspace }}/lapcpp"
|
|
56
46
|
"${{ github.workspace }}/laprust"
|
|
57
|
-
"
|
|
58
|
-
scipy
|
|
59
|
-
- name: Record revisions
|
|
47
|
+
"lapx>=0.13.0"
|
|
48
|
+
scipy packaging
|
|
49
|
+
- name: Record source revisions and LAPX version
|
|
60
50
|
run: |
|
|
61
51
|
git -C "${{ github.workspace }}/lapcpp" rev-parse HEAD
|
|
62
52
|
git -C "${{ github.workspace }}/laprust" rev-parse HEAD
|
|
63
|
-
|
|
53
|
+
python -c "from importlib.metadata import version; print('lapx==' + version('lapx'))"
|
|
64
54
|
- name: Run five-candidate post-filter tracking benchmark
|
|
65
55
|
working-directory: ${{ github.workspace }}/laprust
|
|
66
56
|
env:
|
|
@@ -78,12 +78,12 @@ jobs:
|
|
|
78
78
|
uses: actions/cache@v5
|
|
79
79
|
with:
|
|
80
80
|
path: ${{ runner.temp }}/cibw-cache
|
|
81
|
-
key: cibw-4.3.
|
|
81
|
+
key: cibw-4.3.5-${{ matrix.target.name }}-${{ matrix.python.name }}-${{ hashFiles('pyproject.toml') }}
|
|
82
82
|
restore-keys: |
|
|
83
|
-
cibw-4.3.
|
|
84
|
-
cibw-4.3.
|
|
83
|
+
cibw-4.3.5-${{ matrix.target.name }}-${{ matrix.python.name }}-
|
|
84
|
+
cibw-4.3.5-${{ matrix.target.name }}-
|
|
85
85
|
- name: Install wheel builder
|
|
86
|
-
run: python -m pip install cibuildwheel==4.3.
|
|
86
|
+
run: python -m pip install cibuildwheel==4.3.5
|
|
87
87
|
- name: Prepare Rust targets
|
|
88
88
|
if: runner.os != 'Linux'
|
|
89
89
|
shell: bash
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.2.1 - 2026-11-08
|
|
4
|
+
|
|
5
|
+
- Require LAPX 0.13.0 or newer for all package benchmarks.
|
|
6
|
+
- Record and check the installed LAPX version.
|
|
7
|
+
- Include lapcpp in the benchmark installation extra.
|
|
8
|
+
- Refresh installation, development and paper links.
|
|
9
|
+
- Distinguish the package benchmarks from the paper's reproducible experiment
|
|
10
|
+
suite.
|
|
11
|
+
- Add package, license, paper and total/monthly download badges.
|
|
12
|
+
- Add documentation and support links to the package metadata.
|
|
13
|
+
|
|
14
|
+
## 1.2.0 - 2026-10-28
|
|
15
|
+
|
|
16
|
+
- Use a common four-scan row-reduction allowance throughout rectangular and
|
|
17
|
+
finite-limit initialization.
|
|
18
|
+
- Prefer equally cheap free columns throughout rectangular and finite-limit
|
|
19
|
+
initialization.
|
|
20
|
+
- Stop lowering column potentials after a stalled displacement chain in required
|
|
21
|
+
rectangular matching. Keep the bounded reduction allowance for finite-limit
|
|
22
|
+
matching, where interrupting long chains can increase augmenting-search work.
|
|
23
|
+
- Preserve the assignment objective, float32 fixes, and required-square solver.
|
|
24
|
+
Performance depends on the workload. See the
|
|
25
|
+
[initialization policy and tradeoffs](benchmarks/initialization-policy.md).
|
|
26
|
+
|
|
27
|
+
## 1.1.1 - 2026-10-28
|
|
28
|
+
|
|
29
|
+
- Keep float32 cost storage while using float64 potentials, distances, and
|
|
30
|
+
reduced-cost arithmetic in rectangular and finite-limit solving.
|
|
31
|
+
This matches the existing required-square working precision.
|
|
32
|
+
This fixes lost small assignment differences beside large finite costs without
|
|
33
|
+
widening the full cost matrix.
|
|
34
|
+
- Preserve cost conversion, represented half-limit rounding, and totals from
|
|
35
|
+
original selected costs. Float64 working arithmetic is not an arbitrary-range
|
|
36
|
+
exactness guarantee.
|
|
37
|
+
- Add exact float32 initialization and augmenting-search regressions, including
|
|
38
|
+
primal/dual certificates and required/implicit-rejection paths.
|
|
39
|
+
|
|
40
|
+
## 1.1.0 - 2026-10-26
|
|
41
|
+
|
|
42
|
+
- Bound row-reduction initialization on large rectangular inputs to improve
|
|
43
|
+
congested assignments. Use separate budgets for required and finite-limit
|
|
44
|
+
solving. Preserve the public API and assignment objective.
|
|
45
|
+
- Keep the rectangular core synchronized with LAPX's Rust and hybrid solvers.
|
|
46
|
+
- Performance gains depend on the workload. Some small-input slowdowns remain.
|
|
47
|
+
|
|
48
|
+
## 1.0.0 - 2026-10-23
|
|
49
|
+
|
|
50
|
+
This is the first stable release.
|
|
51
|
+
|
|
52
|
+
### Package and API
|
|
53
|
+
|
|
54
|
+
- Provide a standalone `laprust` distribution and import namespace for Python 3.9+.
|
|
55
|
+
- Derive `lapjv` and `lapjv_batch` from the LAPX 0.11.1 `lapjvr` solver.
|
|
56
|
+
- lapcpp (C++) and laprust (Rust) lead future solver development.
|
|
57
|
+
LAPX incorporates their fixes and improvements.
|
|
58
|
+
- Support native rectangular assignment and implicit finite-limit rejection.
|
|
59
|
+
- Support float32/float64 working costs and index or pair output.
|
|
60
|
+
- Reuse batch workers.
|
|
61
|
+
- Provide type annotations (`py.typed`).
|
|
62
|
+
|
|
63
|
+
### Solver and performance
|
|
64
|
+
|
|
65
|
+
- Reuse the root row's reduced costs for the first relaxation in rectangular
|
|
66
|
+
and finite-limit search. This replaces separate resets of distances and predecessors.
|
|
67
|
+
- Convert batch result counts once. For batches of 8 or more, build per-problem
|
|
68
|
+
views by row iteration when every problem is known to be fully matched.
|
|
69
|
+
- Windows builds compile the C++ wrapper with MSVC `/std:c++17`, as lapcpp does.
|
|
70
|
+
- If a path walk-back never reaches its root, report an internal error instead
|
|
71
|
+
of returning a result.
|
|
72
|
+
- If a final matching has `y[x[i]] != i`, report an internal error instead of
|
|
73
|
+
returning a result.
|
|
74
|
+
|
|
75
|
+
### Testing and CI
|
|
76
|
+
|
|
77
|
+
- Add numerical/API tests, historical LAPX regression fixtures, edge/ownership
|
|
78
|
+
checks, and exhaustive references.
|
|
79
|
+
- Add SciPy-free ARM numerical tests.
|
|
80
|
+
- Cover all empty-result and batch-size boundaries.
|
|
81
|
+
- Inject native allocation/worker failures in tests.
|
|
82
|
+
- Check adapter exceptions and recovery.
|
|
83
|
+
- Add native sanitizer jobs in separate PR/manual workflows.
|
|
84
|
+
- Require cross-package concurrency and isolated editable-install tests in CI.
|
|
85
|
+
- Run full tests on standalone wheels.
|
|
86
|
+
- Add compatibility jobs for older NumPy runtimes.
|
|
87
|
+
|
|
88
|
+
### Benchmarks
|
|
89
|
+
|
|
90
|
+
- Compare five candidates through dedicated SciPy, lapcpp, laprust and pair-output
|
|
91
|
+
LAPX JVX/JVS functions. Use LAPX v0.11.1 settings and uniform input generation.
|
|
92
|
+
- Use the same 39 matrix shapes for single/tracking benchmarks, including
|
|
93
|
+
4000x3000 and other large rectangles.
|
|
94
|
+
- Use 65 tapered batch workloads with medium rectangles and small-batch
|
|
95
|
+
overhead cases. Every mode includes tiny and small rectangular workloads.
|
|
96
|
+
- In tracking benchmarks, solve first and post-filter every candidate.
|
|
97
|
+
Do not pass a solver cost_limit or expand the matrix for rejection.
|
|
98
|
+
Preserve the original unmatched-list construction and threshold sweep.
|
|
99
|
+
- Calibrate calls per sample to target at least 10 ms.
|
|
100
|
+
Warm each solver immediately before its own sample. Use 7 rounds for
|
|
101
|
+
sub-millisecond cases. `--reference-timing` keeps the pinned LAPX timing for
|
|
102
|
+
comparison.
|
|
103
|
+
- Report benchmark verdicts and ranked test-count/total-time summaries in text
|
|
104
|
+
and JSON.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
Use Python 3.9+, Rust 1.83+ with Cargo, and a C++17 compiler.
|
|
4
|
+
Use MSVC Build Tools on Windows, GCC or Clang on Linux, or Xcode Command Line
|
|
5
|
+
Tools on macOS. CI uses stable Rust.
|
|
6
|
+
|
|
7
|
+
Windows builds use MSVC's `/std:c++17` language mode for the C++ wrapper,
|
|
8
|
+
as lapcpp does. Linux and macOS builds use `-std=c++17`. The Rust core uses
|
|
9
|
+
the edition declared in `Cargo.toml`.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
python -m venv .venv
|
|
13
|
+
# Activate .venv using the command appropriate for your shell.
|
|
14
|
+
python -m pip install -e ".[dev]"
|
|
15
|
+
cd tests
|
|
16
|
+
python -m pytest -q -m "not cross_package"
|
|
17
|
+
cd ..
|
|
18
|
+
python -m pytest -q .github/tests -m "not editable"
|
|
19
|
+
python -m pyright tests/typing/return_types.py
|
|
20
|
+
python -m build
|
|
21
|
+
python .github/tests/check_dist.py
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`python -m build` builds the wheel from the source archive by default.
|
|
25
|
+
To verify an installed wheel:
|
|
26
|
+
|
|
27
|
+
1. Uninstall any editable installation.
|
|
28
|
+
2. Install the wheel in a fresh environment.
|
|
29
|
+
3. Run `python .github/tests/check_wheel.py`.
|
|
30
|
+
|
|
31
|
+
Run solver tests from the `tests` directory to avoid importing the source package.
|
|
32
|
+
Also run the Rust checks:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
cargo fmt --check --manifest-path src/_lapjv/Cargo.toml
|
|
36
|
+
cargo test --locked --all-features --manifest-path src/_lapjv/Cargo.toml
|
|
37
|
+
cargo clippy --locked --all-targets --all-features --manifest-path src/_lapjv/Cargo.toml -- -D warnings
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The Cython wrapper is in `src/_lapjv`. Git ignores generated `_lapjv.cpp`,
|
|
41
|
+
binaries, Cargo targets, build directories and benchmark output. Preserve
|
|
42
|
+
the source{d}/lapjv and LAPX license notices when changing native source.
|
|
43
|
+
|
|
44
|
+
Build controls use the `LAPRUST_` prefix:
|
|
45
|
+
|
|
46
|
+
- `LAPRUST_BASEOPTS=0` disables added base optimizations and LTO.
|
|
47
|
+
- `LAPRUST_LTO=0` disables LTO, including inherited compiler defaults.
|
|
48
|
+
- `LAPRUST_NATIVE=1` enables host CPU tuning where supported. For portable wheels, leave this option unset.
|
|
49
|
+
|
|
50
|
+
The build always retains strict floating-point behavior. There is no fast-math option.
|
|
51
|
+
The Rust target architecture must match Python's extension architecture. macOS
|
|
52
|
+
builds use one architecture at a time. Rust builds do not support universal2.
|
|
53
|
+
|
|
54
|
+
## Solver development and LAPX
|
|
55
|
+
|
|
56
|
+
laprust 1.0.0 derives from LAPX 0.11.1's `lapjvr` family. lapcpp and laprust
|
|
57
|
+
are the lead repositories for C++ and Rust solver development, respectively.
|
|
58
|
+
|
|
59
|
+
Develop solver fixes, improvements, and regression tests in the corresponding
|
|
60
|
+
standalone repository first. Keep the common numerical and API contracts aligned
|
|
61
|
+
between lapcpp and laprust. Then port relevant changes into the corresponding
|
|
62
|
+
LAPX solver families. Preserve the LAPX and original upstream attribution in `NOTICE`.
|
|
63
|
+
|
|
64
|
+
## Workflows
|
|
65
|
+
|
|
66
|
+
- `tests.yaml` builds wheels from source archives and runs separate solver and
|
|
67
|
+
build/tool tests. It checks typing, a SciPy-free core run, and older NumPy compatibility.
|
|
68
|
+
- `native.yaml` checks native resources and failures, Cython exception
|
|
69
|
+
translation, and Linux address/thread sanitizers.
|
|
70
|
+
- `integration.yaml` requires cross-package concurrency and isolated editable
|
|
71
|
+
installs (default/strict/compat). It runs on Windows/Linux/macOS and Python 3.9/3.15.
|
|
72
|
+
- `prepublish.yaml` runs manual cibuildwheel smoke builds for CPython 3.9 and 3.15.
|
|
73
|
+
To build all Python versions (3.9-3.15), select `full`. Reusable calls default
|
|
74
|
+
to the full set. Builds cover
|
|
75
|
+
Windows AMD64/ARM64, Linux manylinux x86_64/aarch64/armv7l, Linux musllinux
|
|
76
|
+
x86_64/aarch64, and macOS x86_64/arm64, for combinations supported by
|
|
77
|
+
cibuildwheel. musllinux armv7l remains excluded.
|
|
78
|
+
- `publish.yaml` responds to tags `v*`. It checks the version and builds the full
|
|
79
|
+
wheel matrix with installed-wheel smoke checks. Then it uses PyPI Trusted
|
|
80
|
+
Publishing, matching LAPX. Integration, native and sanitizer suites run
|
|
81
|
+
separately on PRs or manual dispatch.
|
|
82
|
+
- `benchmark_single.yaml`, `benchmark_batch.yaml`, and `benchmark_tracking.yaml`
|
|
83
|
+
run the five-candidate comparison manually and produce JSON artifacts.
|
|
84
|
+
|
|
85
|
+
Before publishing, configure the PyPI Trusted Publisher for this repository,
|
|
86
|
+
`publish.yaml`, and environment `pypi`.
|
|
87
|
+
Tag releases as `v<version>`, matching `laprust.__version__`.
|
|
88
|
+
The manual prepublish workflow creates artifacts without uploading them to PyPI.
|
|
89
|
+
|
|
90
|
+
Benchmark workflows accept a counterpart repository ref and install
|
|
91
|
+
`lapx>=0.13.0` from PyPI. Record both standalone source revisions and the installed
|
|
92
|
+
package versions when reporting comparisons. For unreleased local changes,
|
|
93
|
+
install the two standalone checkouts and `lapx>=0.13.0` from PyPI, as described in
|
|
94
|
+
[benchmark methodology](benchmarks/README.md).
|
|
95
|
+
|
|
96
|
+
ARMv7 manylinux builds on Python 3.12-3.15 use
|
|
97
|
+
`.github/constraints/numpy-armv7-build.txt` for both build and test dependencies.
|
|
98
|
+
The constraints match LAPX's GCC 9-compatible NumPy range (`>=2,<2.5`). The override retains
|
|
99
|
+
the Rust/Cargo path and does not change the installed package's NumPy requirement.
|
|
100
|
+
Every runnable wheel target uses the NumPy-only installed-wheel smoke check in
|
|
101
|
+
`.github/tests/check_wheel.py`. The full solver and build/tool suites run in
|
|
102
|
+
`tests.yaml`. musllinux armv7l is excluded because the current native Rust
|
|
103
|
+
toolchain setup cannot build that target, matching LAPX's Rust exclusion.
|
|
104
|
+
|
|
105
|
+
Wheel jobs separate Windows architectures, manylinux/musllinux targets,
|
|
106
|
+
and macOS architectures. Full builds also split Python 3.9-3.11 and
|
|
107
|
+
3.12-3.15 into parallel groups, so each job builds at most four wheels.
|
|
108
|
+
Windows and macOS reuse cached cibuildwheel downloads between runs.
|
|
109
|
+
Release compiler optimizations and platform coverage are unchanged.
|
|
110
|
+
|
|
111
|
+
See the [solver coverage inventory](tests/README.md) for the LAPX case mapping
|
|
112
|
+
and cross-package checks.
|
|
113
|
+
See [build and packaging checks](.github/tests/README.md)
|
|
114
|
+
for isolated installation checks, benchmark-tool tests, and CI scope.
|
|
115
|
+
|
|
116
|
+
See [native failure and sanitizer checks](tests/README.md#portable-and-native-failure-checks)
|
|
117
|
+
for local commands and test-only fault injection details.
|
|
@@ -5,7 +5,7 @@ The square Jonker-Volgenant implementation derives from source{d}/lapjv
|
|
|
5
5
|
and carries the copyright of Vadim Markovtsev (2016). Native rectangular
|
|
6
6
|
assignment, implicit rejection handling, adapters and batch execution derive
|
|
7
7
|
from Ratha SIV's LAPX work (2026). See src/_lapjv/LICENSE for the full MIT text.
|
|
8
|
-
The top-level LICENSE covers this package.
|
|
8
|
+
The top-level LICENSE covers this package. laprust does not require LAPX at runtime.
|
|
9
9
|
|
|
10
10
|
Rust dependencies and their notices are listed in src/_lapjv/THIRD_PARTY_NOTICES.
|
|
11
11
|
|