Release PR for 2025-12-09 16:52#40
Merged
Merged
Conversation
- Updated `pyproject.toml` to include "Typing :: Typed" in classifiers. - Introduced a new `py.typed` file to indicate type checking support for mypy. - Enhanced type annotations in `schema_applier.py` for better type safety. - Added comprehensive tests in `test_mypy_support.py` to verify mypy type checking and ensure correct type annotations in `SchemaLogger`. These changes improve type safety and support for static type checking in the logging framework. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Modified the `exclude_dirs` in the Bandit tool configuration within `pyproject.toml` to include the `tests` directory, ensuring that test files are not analyzed for security issues. This change helps streamline security checks by focusing on relevant source code directories. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Removed unnecessary comments from subprocess calls in `test_mypy_support.py` to improve code readability. - Ensured consistent formatting for subprocess invocations, enhancing maintainability of the test code. This change streamlines the test code while maintaining its functionality. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
## [0.3.0-rc.1](v0.2.0...v0.3.0-rc.1) (2025-12-09) ### Features * add type annotations and mypy support ([d907b1e](d907b1e)) Signed-off-by: semantic-release-bot <semantic-release-bot@martynus.net>
- Updated the _is_leaf_node function to accurately determine leaf nodes based on the presence of 'type' or 'source' fields as primitive values, rather than objects. - Added comprehensive unit tests to validate the new logic, covering various scenarios including cases where 'type' or 'source' are objects or strings. This change improves the accuracy of schema node classification in the logging framework. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Updated the _is_leaf_node function to check for 'type' and 'source' fields as strings instead of primitive values, enhancing the accuracy of leaf node identification. - Adjusted comments to reflect the new logic, ensuring clarity in the codebase. This change improves the schema node classification process in the logging framework. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
…umentation - Introduced a new function, _determine_node_type_and_validate, to accurately classify nodes as leaf or inner based on their structure, ensuring that nodes cannot simultaneously have properties and children. - Updated the README.md to clarify the definitions and validation rules for inner and leaf nodes. - Added unit tests to cover various scenarios, including cases of mixed nodes, empty nodes, and validation errors, improving overall test coverage. These changes enhance the schema validation process in the logging framework, ensuring stricter adherence to node structure rules. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Updated the validation logic in _validate_and_create_leaf to ensure that the source field is a string, preventing None, empty, or non-string types from being accepted. - Added unit tests to cover edge cases where the type and source fields are invalid, ensuring that appropriate problems are raised during schema compilation. These changes improve the robustness of the schema validation process in the logging framework. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Enhanced the validation logic in _validate_and_create_leaf to ensure that the 'type', 'source', and 'item_type' fields are strings, preventing non-string types from being accepted. - Added unit tests to cover various edge cases where these fields are invalid, ensuring that appropriate problems are raised during schema compilation. These changes strengthen the schema validation process in the logging framework, ensuring stricter adherence to type requirements. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Introduced a new test to validate the behavior of leaf nodes when the type is a string and the source is an object. This scenario should trigger an error indicating that a node cannot have both properties and children. - The test ensures that the schema validation logic correctly identifies and raises problems for mixed node types, enhancing the robustness of the validation process. These changes improve the coverage of edge cases in the schema validation tests. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Introduced a new test to verify that nodes with item_type defined as an object (Mapping) are correctly identified as inner nodes. This ensures that the schema validation logic processes nested structures appropriately. - The test checks that the compiled schema reflects the correct classification and that no validation problems are raised for valid configurations. These changes enhance the coverage of schema validation tests, particularly for complex node structures. Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
## [0.3.0-rc.2](v0.3.0-rc.1...v0.3.0-rc.2) (2025-12-09) ### Bug Fixes * **schema_loader:** enhance validation for leaf node source type ([784c105](784c105)) * **schema_loader:** improve validation for leaf node types ([92a5ba0](92a5ba0)) Signed-off-by: semantic-release-bot <semantic-release-bot@martynus.net>
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.
Changelog (#40)
✨ New Features
🐛 Bug Fixes
♻️ Refactoring
🧪 Tests
🧹 Chores