pyvider 2024-11-30
Created logscribe logging library and rebuilt core schema system
169 files · 11,898+ · 918-

Created logscribe logging library as standalone subpackage

15 files changed
  • core.py Logscribe class for centralized log management
  • detailed_formatter.py Detailed log formatter
  • json_formatter.py JSON log formatter
  • rich_formatter.py Rich-based color output formatter
  • simple_formatter.py Simple log formatter
  • rotating_file_handler.py File-based log rotation handler
  • stream_handler.py Stream output handler
  • logger_manager.py Log manager singleton
  • defaults.yaml Default logging configuration
  • loader.py Configuration loader
  • keyword_filter.py Keyword-based log filter
  • log_level_filter.py Log level filter
  • module_name_filter.py Module name filter
  • richlogger.py Rich logger wrapper
  • theme.py Rich theme configuration
  • Created logscribe package with core logging framework, formatters (detailed, JSON, rich, simple), handlers (rotating file, stream), and config management instantiate behavioral
    5 files
    • core.py
    • formatters
    • handlers
    • logger_manager.py
    • defaults.yaml
  • Added log filters for keyword, log level, and module name filtering instantiate internal
    3 files
    • keyword_filter.py
    • log_level_filter.py
    • module_name_filter.py
  • Included tests for logscribe core, formatters, handlers, and rich logger qualify internal
    3 files
    • test_logscribe.py
    • test_rich_formatter.py
    • test_simple_formatter.py

Rebuilt core schema system with attribute, nested block, and wrapper classes

4 files changed
  • attribute.py SchemaAttribute class with type validation and required/optional/computed flags
  • nested_block.py Nested block support
  • wrapper.py Primary SchemaWrapper with protobuf serialization/deserialization
  • factory.py Schema construction factory
  • Created schema attribute class with type validation and required/optional/computed flags, nested block support, and SchemaWrapper with protobuf serialization instantiate behavioral
    4 files
    • attribute.py
    • nested_block.py
    • wrapper.py
    • factory.py

Added metaclass-based logging injection and core interfaces

3 files changed
  • metaclasses.py LoggingMeta/UnifiedMeta metaclasses for automatic logging injection
  • base.py Enhanced BaseResource ABC with lifecycle methods (157 lines)
  • schema.py Schema interface definitions
  • Created LoggingMeta and UnifiedMeta metaclasses for automatic logging injection into classes instantiate behavioral
    1 file
    • metaclasses.py
  • Enhanced BaseResource ABC with lifecycle methods and added schema interface definitions streamline behavioral
    2 files
    • base.py
    • schema.py

Added proto v6 schema modules and adapter

4 files changed
  • attribute.py AttributeV6 protobuf-aware attribute
  • nested_block.py NestedBlockV6 protobuf block types
  • adapter.py Protocol version adaptation
  • provider.py V6 provider protocol
  • Created proto v6 schema modules with AttributeV6 and NestedBlockV6 protobuf-aware types and protocol version adapter instantiate internal
    3 files
    • attribute.py
    • nested_block.py
    • adapter.py

Established test infrastructure with mocks, validators, and fixtures

6 files changed
  • test_schema_wrapper.py Comprehensive schema wrapper tests
  • test_tftypes_map.py Map type tests
  • test_tftypes_types_object.py Object type tests
  • schema_validators.py Schema validation utilities (52 lines)
  • schema_mock.py Schema test mocking
  • proto_fixtures.py Protobuf test fixtures
  • Created proper test directory structure with unit/core/, unit/tftypes/, mocks/, validators/, and fixtures/ directories qualify internal
    6 files
    • test_schema_wrapper.py
    • test_tftypes_map.py
    • test_tftypes_types_object.py
    • schema_validators.py
    • schema_mock.py
    • proto_fixtures.py

Added mutable object support and map deserialization

2 files changed
  • object.py Added mutable flag with FrozenDict support
  • map.py Added deserialization support
  • Added mutable flag to object type with FrozenDict support for immutable objects and map type deserialization streamline internal
    2 files
    • object.py
    • map.py