Make the signal-ladder renames backward compatible, and ship 1.77.0 instead of 2.0.0 - #535
Conversation
The renames landed in #534 as a breaking 2.0.0. Nothing had been published, so this reworks them into the Announce phase the deprecation policy calls for: every old spelling still works and warns, and the release is a MINOR. Restored, each forwarding to its replacement with a DeprecationWarning naming it, per docs/development/deprecation_policy.rst: - permutation_q2, pipeline_null, discriminate_observational as function shims. The permutation_q2 shim keeps the old argument order and adapts to the new signature, since check_predictive_signal now takes the blocks first. - q_value and discriminator_significant on the descriptor records, emitted alongside p_value_fwer and is_predictive with identical values. - result.relate["discriminator"], referencing the same object as result.relate["predictive_descriptors"]. - The discriminator= keyword on relate_observational, analyze_descriptive and the sensory_analyze_descriptive tool input. Passing both spellings raises ValueError rather than silently picking one, following the desirability_weights precedent in experiments/optimization.py. - empirical_fdr, still clipped to [0, 1] exactly as before, so an existing caller reads the same number it always did. null_to_observed_ratio is the same quantity unclipped; the two only diverge once shuffling out-finds the real response, which is the case the old key was hiding. The shims take explicit signatures rather than **kwargs so help() and inspect.signature stay accurate, matching the reasoning behind _model_method elsewhere in the package. Verified that the package does not warn on itself: the default relate_observational path runs clean under -W error::DeprecationWarning. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016vCXGaB7zcXSd7GXQoHJig
test_keys_are_as_documented asserts the exact returned key set, and bringing empirical_fdr back as a deprecated alias made it fail. Caught by CI on 3.13/ubuntu, not locally: after adding the key I re-ran only the -k Deprecated subset of the file rather than the whole file, so the one test that pins the full set never ran. The key is listed with a note saying it is deprecated and due out in 2.0.0, so removing it then fails this test rather than passing silently. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016vCXGaB7zcXSd7GXQoHJig
|
The failure: Why it is not this PR's:
No fix ported, because none exists to port. The repo's own remedy for the sibling test is a macOS skip, and adding a skip to get a red job green is not something I will do on my own initiative — that is the maintainer's call, and it would be quarantining a test rather than fixing it. If you would like the same Re-running the failed job once to confirm the intermittency. The other 3.13 legs (ubuntu, windows) and Generated by Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
2.0.0, removing four public names with no deprecation cycle. Nothing had been published (nov2.0.0tag; latest isv1.75.2), so this reworks the same change into the Announce phasedocs/development/deprecation_policy.rstcalls for: every old spelling still works and emits aDeprecationWarningnaming its replacement, which makes the release purely additive and correctly a MINOR. Version is now1.77.0, withCITATION.cffin step.permutation_q2,pipeline_null,discriminate_observational. Thepermutation_q2shim keeps the old argument order and adapts, sincecheck_predictive_signalnow takes the blocks first. All three take explicit signatures rather than**kwargs, sohelp()andinspect.signaturestay accurate.q_value(→p_value_fwer),discriminator_significant(→is_predictive),result.relate["discriminator"](→["predictive_descriptors"], same object).discriminator=keyword onrelate_observational,analyze_descriptiveand thesensory_analyze_descriptivetool input. Passing both spellings raisesValueErrorrather than silently picking one, following thedesirability_weightsprecedent inexperiments/optimization.py.empirical_fdris returned again, still clipped to[0, 1]exactly as before, so an existing caller reads the same number it always did.null_to_observed_ratiois the same quantity unclipped; the two only diverge once shuffling out-finds the real response, which is the case the old key was hiding.Removal of all of the above is scheduled for
2.0.0.The substance of the rename is unchanged from #534, including the two defects it fixed: the
find_predictive_descriptorsdocstring claimed Benjamini-Hochberg correction while the code builds a Westfall-Young max-statistic null, and the field namedq_valueheld a family-wise-error-adjusted p-value whileq_valuein the siblingassociationslist of the same dict genuinely is a BH q-value.Test plan
uv run pytestsuite with the coverage gate: 2984 passed, 3 skipped, coverage 94.46% against the 92% gateuv run pytest tests/test_sensory.py tests/test_sensory_end_to_end.pygreen: 63 passeduv run pytest tests/test_multivariate_null.pygreen, including the newTestDeprecatedAliasesdiscriminator=keyword warns and both result keys reference the same object; passing both keyword spellings raises;empirical_fdris still clipped and equalsmin(null_to_observed_ratio, 1.0)relate_observationalpath runs clean under-W error::DeprecationWarninguv run ruff check .anduv run ruff format --check .both passuv run mypy src/process_improvepasses, 153 filesThe one CI failure on this head was
test (3.13, macos-latest)hitting the known pulp/CBC-under-Rosetta flake intests/test_omars_ilp.py, which this PR does not touch. It passed on re-run of the same commit, confirming the intermittency. Details in the comment below.Checklist
pyproject.tomlto1.77.0(MINOR: additive only, nothing removed), withCITATION.cffset to the identical version in the same commitruff check .passesCHANGELOG.mdupdated, with an### Addedand a### Deprecatedsection replacing the previous### Removed