Skip to content

Fix set_update_step for scoped parameters - #49

Merged
LaurenzBeck merged 1 commit into
Infineon:mainfrom
UmutAlisoglu:codex/scoped-parameter-update-step
Oct 29, 2026
Merged

LaurenzBeck merged 1 commit into
Infineon:mainfrom
UmutAlisoglu:codex/scoped-parameter-update-step

Conversation

@UmutAlisoglu

@UmutAlisoglu UmutAlisoglu commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

ParameterStore({"scope": {"rate": {"schedule": [10, 20, 30]}}}).set_update_step(2) indexes the scope dictionary with 2 and raises KeyError, rather than updating its parameter. Iterate the registered parameter names and use the existing scoped lookup, as update() already does. Unscoped and constant parameters retain their behavior.

The regression covers scoped-only and mixed stores, multiple scopes sharing a parameter name, a constant value, jumping forward, resetting, and advancing after reset. Both new cases fail on unchanged main.

How this was tested

Windows / Python 3.13.7, current declared runtime dependencies (beartype 0.23.1, pandas 3.1.0, NumPy 2.5.4):

  • ParameterStore tests: 12 pass after the fix (before: 2 failures, 10 pass).
  • Full coverage run --source=streamgen -m pytest -q: 39 pass, 22 existing Python/dependency warnings; ParameterStore coverage 97%.
  • The initial full run had 38 passes and a missing-Graphviz failure. After adding a checksum-verified portable Graphviz 16.1.0 to the test process PATH, the visualization test also passes. No global installation or project dependency changes.
  • All applicable repository pre-commit hooks, source Ruff checks/formatting, and diff check pass.

No dependency or lockfile changes. The method docstring now explicitly includes scoped parameters.

AI assistance was used for implementation and regression tests. Signed off.

Signed-off-by: Umut Alisoglu <umutalisoglu@gmail.com>
@LaurenzBeck
LaurenzBeck merged commit f3830f2 into Infineon:main Oct 29, 2026
8 checks passed
@LaurenzBeck

Copy link
Copy Markdown
Contributor

good catch @UmutAlisoglu ! 💪🏻

Your added test files are a good addition and seem correct.
I will merge your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants