pyvider 2024-11-26
Restructured tftypes into modular types, operations, and serialization packages
177 files · 9,783+ · 5,235-

Moved package from src/pyvider/ to top-level pyvider/ directory

5 files changed
  • __init__.py New top-level package init
  • __main__.py Entry point moved to top-level package
  • provider.py Provider module at new location
  • grpc_helpers.py gRPC helpers moved to new location
  • grpc_service.py gRPC service moved to new location
  • Moved entire package from src/pyvider/ to top-level pyvider/ directory and reorganized all submodules decouple behavioral
    3 files
    • __init__.py
    • __main__.py
    • provider.py

Rebuilt tftypes into modular types, operations, and serialization subpackages

16 files changed
  • simple.py Simple types (TFString, TFNumber, TFBool)
  • list.py TFList type implementation
  • map.py TFMap type implementation
  • object.py TFObject type with nested attribute handling (343 lines)
  • set.py TFSet type implementation
  • tuple.py TFTuple type implementation
  • diff.py Type diff operations (243 lines)
  • transform.py Type transform operations (110 lines)
  • walk.py Type walk operations (158 lines)
  • json.py JSON serialization for Terraform types (187 lines)
  • msgpack.py MessagePack serialization (145 lines)
  • proto.py Protobuf serialization (128 lines)
  • type.py Base TerraformType generic class
  • errors.py ValidationError and SerializationError exceptions
  • attribute_path.py AttributePath implementation (196 lines)
  • value.py Terraform Value wrapper (152 lines)
  • Created types/ subpackage with dedicated modules for simple, list, map, object, set, and tuple types each implementing validate(), serialize(), equal(), and usable_as() instantiate behavioral
    6 files
    • simple.py
    • list.py
    • map.py
    • object.py
    • set.py
    • tuple.py
  • Created operations/ subpackage with diff, transform, and walk modules instantiate behavioral
    3 files
    • diff.py
    • transform.py
    • walk.py
  • Created serialization/ subpackage with JSON, msgpack, and proto modules instantiate behavioral
    3 files
    • json.py
    • msgpack.py
    • proto.py
  • Added base TerraformType class, AttributePath implementation, Value wrapper, and error types instantiate behavioral
    4 files
    • type.py
    • attribute_path.py
    • value.py
    • errors.py

Added DynamicValue handling and schema validation

4 files changed
  • dynamic_value_test.py DynamicValue unit tests (172 lines)
  • schema_core.py Schema core definitions (188 lines)
  • schema_validation.py Schema validation logic (341 lines)
  • schema_test.py Schema unit tests (199 lines)
  • Added DynamicValue encoding/decoding between Terraform and Python types using msgpack and JSON with unit tests instantiate behavioral
    1 file
    • dynamic_value_test.py
  • Created schema core definitions and validation module with unit tests instantiate behavioral
    3 files
    • schema_core.py
    • schema_validation.py
    • schema_test.py

Added comprehensive unit tests for all tftypes modules

14 files changed
  • test_tftypes_attribute_path.py Unit tests for AttributePath
  • test_tftypes_type.py Unit tests for base Type class
  • test_tftypes_types_simple.py Unit tests for simple types
  • test_tftypes_types_tuple.py Unit tests for TFTuple
  • test_tftypes_value.py Unit tests for Value class
  • test_tftypes_integration.py Integration tests across tftypes
  • test_tftypes_operations_diff.py Unit tests for diff operations
  • test_tftypes_operations_transform.py Unit tests for transform operations
  • test_tftypes_operations_walk.py Unit tests for walk operations
  • test_tftypes_serialization_json.py Unit tests for JSON serialization
  • test_tftypes_serialization_msgpack.py Unit tests for msgpack serialization
  • test_tftypes_serialization_proto.py Unit tests for proto serialization
  • test_schema.py Unit tests for schema module
  • conftest.py Test configuration and fixtures
  • Added unit tests for attribute path, base type, simple types, tuple, value, and integration scenarios qualify behavioral
    6 files
    • test_tftypes_attribute_path.py
    • test_tftypes_type.py
    • test_tftypes_types_simple.py
    • test_tftypes_types_tuple.py
    • test_tftypes_value.py
    • test_tftypes_integration.py
  • Added unit tests for operations (diff, transform, walk) and serialization (JSON, msgpack, proto) qualify behavioral
    6 files
    • test_tftypes_operations_diff.py
    • test_tftypes_operations_transform.py
    • test_tftypes_operations_walk.py
    • test_tftypes_serialization_json.py
    • test_tftypes_serialization_msgpack.py
    • test_tftypes_serialization_proto.py
  • Converted BDD feature files from tests/toconvert/ to tests/features/ and added conftest.py qualify internal
    2 files
    • conftest.py
    • features