Repository navigation
Python: parse scientific notation in declarative numeric values - #9077
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoOct 9, 2026
Conversation
LI (ktz03)
temporarily deployed
to
github-app-auth
October 5, 2026 18:54 — with
GitHub Actions
Inactive
LI (ktz03)
temporarily deployed
to
github-app-auth
October 5, 2026 18:54 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation preserves existing behavior and is comprehensively covered by regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes declarative numeric parsing for finite scientific notation while preserving exact integer conversion and existing invalid-input fallbacks.
Changes:
- Parses no-dot
e/Enotation as finite floats. - Adds executor and workflow-level regression coverage.
| File | Description |
|---|---|
python/packages/declarative/agent_framework_declarative/_workflows/_executors_basic.py |
Adds finite scientific-notation conversion. |
python/packages/declarative/tests/test_graph_executors.py |
Covers notation, precision, whitespace, invalid input, and overflow. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
LI (ktz03)
marked this pull request as ready for review
October 9, 2026 02:33
LI (ktz03)
temporarily deployed
to
github-app-auth
October 9, 2026 02:34 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Oct 9, 2026
This branch was previously deployed
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.
Motivation & Context
Declarative
ParseValueconverts numeric strings without a decimal point usingint(). Caller input such as"1e3"or"-2e-2"therefore silently becomes zero, while the equivalent decimal-bearing form"3.5e2"parses correctly. A workflow can store the wrong value or take the wrong numeric branch.Description & Review Guide
e/Enotation as a finite float. Add executor and public workflow regressions for positive/negative exponents, whitespace, ordinary numbers, a large exact integer, invalid input, and overflow.intconversion, and the decimal-bearing path and invalid-input fallback remain unchanged. On Windows with Python 3.12.14, the 61 focused cases pass after 16 fail on the baseline; the declarative unit suite passes 1,408 tests with 93% coverage and no skips. Ruff, source Pyright, all five test type checkers, applicable pre-commit hooks, and wheel/sdist builds pass. No provider integration tests were run.Related Issue
Fixes #9076
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix). A workflow keeps the label and title prefix in sync automatically.