Skip to content

Release PR for 2025-12-09 16:59#41

Merged
disafronov merged 13 commits into
releasefrom
main
Dec 9, 2025
Merged

Release PR for 2025-12-09 16:59#41
disafronov merged 13 commits into
releasefrom
main

Conversation

@disafronov
Copy link
Copy Markdown
Owner

@disafronov disafronov commented Dec 9, 2025

Changelog (#41)

✨ New Features

  • add type annotations and mypy support

🐛 Bug Fixes

  • (schema_loader) enhance validation for leaf node source type
  • (schema_loader) improve validation for leaf node types

♻️ Refactoring

  • (schema_loader) enhance _is_leaf_node logic and add tests
  • (schema_loader) refine leaf node detection logic
  • (schema_loader) enhance node validation logic and update documentation

🧪 Tests

  • clean up subprocess calls in mypy tests
  • (schema_loader) add test for mixed node type validation
  • (schema_loader) add test for item_type as object

🤖 CI

  • Remove conditional check for release job execution based on commit message in GitHub workflows

🧹 Chores

  • update excluded directories in Bandit configuration
  • (release) 0.3.0-rc.1
  • (release) 0.3.0-rc.2

disafronov and others added 13 commits December 9, 2025 19:21
- 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>
…t message in GitHub workflows

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
@github-actions github-actions Bot changed the title New release Release PR for 2025-12-09 16:59 Dec 9, 2025
@disafronov disafronov merged commit 978230e into release Dec 9, 2025
16 checks passed
@disafronov
Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 0.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants