feat: test_mode_samples() accessor for PYAUTO_TEST_MODE_SAMPLES#126
Merged
Conversation
Number of fake samples the test-mode sampler bypass writes (default 4 = historical behaviour; values below 4 raise). Consumed by PyAutoFit's _build_fake_samples to write size-realistic samples.csv outputs (PyAutoFit#1379; design locked on PyAutoFit#1378). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
test_mode_samples()toautoconf/test_mode.py— readsPYAUTO_TEST_MODE_SAMPLES(default 4, the historical test-mode bypass sample count; values below 4 raiseValueError). Consumed by PyAutoFit's test-mode sampler bypass to writesamples.csvfiles whose row count and byte size match a production sampler stage (PyAutoLabs/PyAutoFit#1379; design locked on PyAutoLabs/PyAutoFit#1378).Merge order: this PR merges before the paired PyAutoFit PR (dependency direction autofit → autoconf).
API Changes
Added one accessor:
autoconf.test_mode.test_mode_samples(). Nothing existing changed — with the env var unset every consumer behaves exactly as before.See full details below.
Test Plan
pytest test_autoconf/— 138 passed (3 new: default returns 4; env value returned; below-4 raises)Full API Changes (for automation & release notes)
Added
autoconf.test_mode.test_mode_samples()— returnsint(os.environ.get("PYAUTO_TEST_MODE_SAMPLES", "4")); raisesValueErrorfor values below 4 (4 is the minimum preserving the bypass sample structure).Migration
Generated by the PyAutoLabs agent workflow.