Tags: Hochfrequenz/ahbicht
Tags
feat(package_expansion): resolve package '1P' to hardcoded hint node … …w/ key '9999' (#715) Package '1P' is now always resolved to a hint node with a synthetic condition key (9999) instead of being processed by a PackageResolver. This is necessary because: - Package '1P' should always resolve to a hint, regardless of configuration - Hint keys are normally in range 500-900, but those may already be in use - Using 9999 (outside all defined ranges) avoids conflicts with existing keys The hint text is hardcoded as: "Hinweis: Das ist das Standardpaket, wenn keine Bedingung zum Tragen kommt, z.B. im COM-Segment." Changes: - Add PACKAGE_1P_HINT_KEY constant with extensive documentation - Modify derive_condition_node_type() to recognize 9999 as HINT type - Modify PackageExpansionTransformer to handle '1P' specially - Modify HintsProvider implementations to return hardcoded text for 9999 - Add comprehensive tests for the new behavior See also: Hochfrequenz/AHahnB#715 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Konstantin <konstantin.klein+github@hochfrequenz.de> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
feat(EvaluatedFormatConstraint): prevent empty string instead of None… … as error message if FC is not fulfilled (#712) * feat(EvaluatedFormatConstraint): add model validator for error_message Add Pydantic v2 model_validator to prevent empty string as error_message and ensure error_message is None when format_constraint_fulfilled is True. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * black --------- Co-authored-by: Konstantin <konstantin.klein+github@hochfrequenz.de> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
fix(expression_builder): use parentheses for nested XOR/OR/AND error … …messages (#711) When combining format constraint error messages with logical operators (XOR, OR, AND), nested expressions were incorrectly wrapped in single quotes, leading to malformed messages like: "Entweder 'Entweder 'msg1' oder 'msg2'' oder 'msg3'" This caused mismatched quotes and unreadable error messages for complex expressions like `[950]X[951]X[950]` where all format constraints are unfulfilled. The fix introduces a `_wrap_message()` helper that: - Uses parentheses `()` for compound expressions (containing " oder " or " und ") - Uses single quotes `''` for simple messages This produces properly formatted output: "Entweder (Entweder 'msg1' oder 'msg2') oder 'msg3'" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Konstantin <konstantin.klein+github@hochfrequenz.de> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Fix SyntaxWarning: invalid escape sequence '\B' (#674) Use raw triple double quotes, because backslashes are being used in the docstring. This was the warning: (...)/site-packages/ahbicht/expressions/ahb_expression_parser.py:29: SyntaxWarning: invalid escape sequence '\B' CONDITION_EXPRESSION: /(?!\BU\B)[\[\]\(\)U∧O∨X⊻\d\sP\.UBn]+/i
chore(deps): bump efoli from 1.4.0 to 2.0.0 (#597) * chore(deps): bump efoli from 1.4.0 to 2.0.0 Bumps [efoli](https://github.com/Hochfrequenz/efoli) from 1.4.0 to 2.0.0. - [Release notes](https://github.com/Hochfrequenz/efoli/releases) - [Commits](Hochfrequenz/efoli@v1.4.0...v2.0.0) --- updated-dependencies: - dependency-name: efoli dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update pyproject.toml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: konstantin <konstantin.klein@hochfrequenz.de>
PreviousNext