-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: update metadata handling and improve code organization #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
- Add ConfigMetadata class for handling configuration metadata - Fix PathData.get_value() to maintain original behavior of returning None - Update tests to match expected behavior - Add ADR for sensitive value storage - Update schema and documentation
- Mark PathData metadata handling as complete - Add ConfigMetadata section with completed tasks - Update testing and documentation sections
- Move required value validation into PathData.validate() loop - Add environment context to validation error messages - Add tests for PathData serialization methods - Mark ADR-005 (Unified Backend Approach) as Accepted - Mark ADR-007 (Sensitive Value Storage) as Accepted - Fix ADR-007 number in title - Update README.md to reflect ADR status changes This change improves error messages by including environment context and keeps validation close to the data it validates. PathData now has 100% test coverage.
- Add debug logs for set_value and get_value methods - Fix type hint for create_value_fn using Callable from typing - Format function signature for better readability The debug logs follow the Helm plugin convention and provide better observability for value operations. Type hints now properly specify the function signature for create_value_fn.
|
- Changed all relative imports (using . and ..) to absolute imports - Follows Python's official style guide (PEP 8) - More explicit and readable import paths - All tests passing
- Add back path validation to ensure value.path matches PathData.path - Add error logging for path mismatch - Update docstring to document ValueError - Improve code organization with proper error handling This ensures data consistency by preventing values with mismatched paths from being added to a PathData instance.
- Add back input validation for data type and required keys - Restore error logging for invalid input - Add debug logging for value creation - Add tests for validation and error handling: - Test invalid data type - Test missing required keys - Test value path mismatch This ensures proper error handling and logging when creating PathData instances from dictionaries, with full test coverage.
- Update test_validate_path_mismatch to check validation in set_value - Fix test_from_dict_missing_keys to be order-independent - Maintain test coverage and error checking - Follow clean code principles with clear test names and assertions This ensures tests are robust and won't fail due to implementation details like set ordering.
- Return Value object instead of resolved string value - Remove resolve parameter as it's now handled by Value.get() - Update tests to verify Value object return - Maintain proper logging This provides better control over value resolution and access to Value object features, especially for sensitive values.
|
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.



Related Issues
Fixes #4
Changes Made
ConfigMetadataclass for handling configuration metadataPathData.get_value()to maintain original behavior of returning NoneTesting Done
Checklist
Type of Change
Breaking Change
Additional Information
This PR focuses on refactoring the metadata handling in the codebase by introducing a dedicated
ConfigMetadataclass and ensuring proper error handling. The changes maintain backward compatibility while improving code organization and maintainability.