You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Minor fixes flagged in review of #539 (program sampling RNG, demos NameError, conftest hook, parallel_progress jobs) #562
Collected from the Copilot and Claude bot reviews on #539, so they are tracked in the project. Each is small; they can be fixed in one PR.
Program.sample() passes rng_sampler only to capacity_constraint.sample(); spend_data, unit_cost, saturation and coverage fall back to the global np.random, breaking reproducibility of program sampling.
demo() references an undefined name demos in its error message (should be demo_projects).
tests/conftest.py::pytest_collection_modifyitems has the wrong hook signature (session, config, items) and mutates items while iterating.
parallel_progress() no longer appends ApplyResult objects to jobs in the kwargs branch, so worker exceptions are not re-raised.
run_sim checks isinstance(rng, np.random._generator.Generator); use the public np.random.Generator.
excel.py writes "N" for a transfer with an explicit constant value of 0 (value.vals or value.assumption is falsy).
plotting.py tuple colour special-case calls .startswith on a float when given an RGB tuple.
Mutable default acceptance_criteria=[] in five signatures.
test_tox_markovchain.py: ration typo, boolean mask used as index, broken f-string in the failure path, hash(demo) seeding, and __main__ block calling the test without its argument.
Implementation plan
Fix each item in place and add a test for the Program.sample() reproducibility (sample twice with the same seed, assert equality) and the parallel_progress exception propagation.
Activity