pyvider 2025-04-01
Rewrote `TerraformConverter` in `conversion/terraform.py`: extracted `_prepare_value` as a...
2 files · 359+ · 201-

TerraformConverter._prepare_value Rewrite

1 file changed
  • terraform.py Changes to terraform.py
  • Extracted _prepare_value to use explicit isinstance checks instead of pattern matching decouple internal
    1 file
    • terraform.py
  • Added self-referencing circular import workaround (importing TerraformType within the method body) remediate internal
    1 file
    • terraform.py
  • Recursive calls changed from TerraformConverter._prepare_value() to local _prepare_value() to avoid class reference issues decouple internal
    1 file
    • terraform.py

Function Schema Encoding

39 files changed
  • complete_terraform_integration.py Changes to complete_terraform_integration.py
  • debug_schema.py Changes to debug_schema.py
  • drift_detection.py Changes to drift_detection.py
  • main.tf Changes to main.tf
  • schema_converter.py Changes to schema_converter.py
  • schema_examples.py Changes to schema_examples.py
  • schema_lifecycle.py Changes to schema_lifecycle.py
  • schema_showcase.py Changes to schema_showcase.py
  • schema_state_validator.py Changes to schema_state_validator.py
  • schema_transformer.py Changes to schema_transformer.py
  • terraform_lifecycle_example.py Changes to terraform_lifecycle_example.py
  • terraform_state_schema_generator.py Changes to terraform_state_schema_generator.py
  • terraform_state_schema_model.py Changes to terraform_state_schema_model.py
  • test-terraform.tf Changes to test-terraform.tf
  • tfstate-schema-test.json Changes to tfstate-schema-test.json
  • README.md Changes to README.md
  • __init__.py Changes to __init__.py
  • attribute_value.py Changes to attribute_value.py
  • attributes.py Changes to attributes.py
  • base.py Changes to base.py
  • common_types.py Changes to common_types.py
  • cty_adapters.py Changes to cty_adapters.py
  • decorators.py Changes to decorators.py
  • definition.py Changes to definition.py
  • pvattrs.py Changes to pvattrs.py
  • pvblocks.py Changes to pvblocks.py
  • pvfactory.py Changes to pvfactory.py
  • pvschemas.py Changes to pvschemas.py
  • transforms.py Changes to transforms.py
  • types.py Changes to types.py
  • validation.py Changes to validation.py
  • conftest.py Changes to conftest.py
  • test_schema_adapter_integration.py Changes to test_schema_adapter_integration.py
  • test_schema_basics.py Changes to test_schema_basics.py
  • test_schema_conversion.py Changes to test_schema_conversion.py
  • test_schema_lifecycle.py Changes to test_schema_lifecycle.py
  • test_schema_terraform_state.py Changes to test_schema_terraform_state.py
  • test_schema_types.py Changes to test_schema_types.py
  • test_schema_validation.py Changes to test_schema_validation.py
  • Added encode_function() static method for converting function schemas to Function protobuf messages instantiate internal
    39 files
    • complete_terraform_integration.py
    • debug_schema.py
    • drift_detection.py
    • main.tf
    • schema_converter.py
    • schema_examples.py
    • schema_lifecycle.py
    • schema_showcase.py
    • schema_state_validator.py
    • schema_transformer.py
    • terraform_lifecycle_example.py
    • terraform_state_schema_generator.py
    • terraform_state_schema_model.py
    • test-terraform.tf
    • tfstate-schema-test.json
    • README.md
    • __init__.py
    • attribute_value.py
    • attributes.py
    • base.py
    • common_types.py
    • cty_adapters.py
    • decorators.py
    • definition.py
    • pvattrs.py
    • pvblocks.py
    • pvfactory.py
    • pvschemas.py
    • transforms.py
    • types.py
    • validation.py
    • conftest.py
    • test_schema_adapter_integration.py
    • test_schema_basics.py
    • test_schema_conversion.py
    • test_schema_lifecycle.py
    • test_schema_terraform_state.py
    • test_schema_types.py
    • test_schema_validation.py
  • Added Function to protobuf imports (from pyvider.protocols.tfprotov6.protobuf import DynamicValue, Function) interface internal
    39 files
    • complete_terraform_integration.py
    • debug_schema.py
    • drift_detection.py
    • main.tf
    • schema_converter.py
    • schema_examples.py
    • schema_lifecycle.py
    • schema_showcase.py
    • schema_state_validator.py
    • schema_transformer.py
    • terraform_lifecycle_example.py
    • terraform_state_schema_generator.py
    • terraform_state_schema_model.py
    • test-terraform.tf
    • tfstate-schema-test.json
    • README.md
    • __init__.py
    • attribute_value.py
    • attributes.py
    • base.py
    • common_types.py
    • cty_adapters.py
    • decorators.py
    • definition.py
    • pvattrs.py
    • pvblocks.py
    • pvfactory.py
    • pvschemas.py
    • transforms.py
    • types.py
    • validation.py
    • conftest.py
    • test_schema_adapter_integration.py
    • test_schema_basics.py
    • test_schema_conversion.py
    • test_schema_lifecycle.py
    • test_schema_terraform_state.py
    • test_schema_types.py
    • test_schema_validation.py
  • encode() method now accepts target_type="function" option for specialized function encoding path decouple behavioral
    39 files
    • complete_terraform_integration.py
    • debug_schema.py
    • drift_detection.py
    • main.tf
    • schema_converter.py
    • schema_examples.py
    • schema_lifecycle.py
    • schema_showcase.py
    • schema_state_validator.py
    • schema_transformer.py
    • terraform_lifecycle_example.py
    • terraform_state_schema_generator.py
    • terraform_state_schema_model.py
    • test-terraform.tf
    • tfstate-schema-test.json
    • README.md
    • __init__.py
    • attribute_value.py
    • attributes.py
    • base.py
    • common_types.py
    • cty_adapters.py
    • decorators.py
    • definition.py
    • pvattrs.py
    • pvblocks.py
    • pvfactory.py
    • pvschemas.py
    • transforms.py
    • types.py
    • validation.py
    • conftest.py
    • test_schema_adapter_integration.py
    • test_schema_basics.py
    • test_schema_conversion.py
    • test_schema_lifecycle.py
    • test_schema_terraform_state.py
    • test_schema_types.py
    • test_schema_validation.py
  • Added dict-to-Function conversion fallback when to_proto() returns a dict instead of Function harden internal
    39 files
    • complete_terraform_integration.py
    • debug_schema.py
    • drift_detection.py
    • main.tf
    • schema_converter.py
    • schema_examples.py
    • schema_lifecycle.py
    • schema_showcase.py
    • schema_state_validator.py
    • schema_transformer.py
    • terraform_lifecycle_example.py
    • terraform_state_schema_generator.py
    • terraform_state_schema_model.py
    • test-terraform.tf
    • tfstate-schema-test.json
    • README.md
    • __init__.py
    • attribute_value.py
    • attributes.py
    • base.py
    • common_types.py
    • cty_adapters.py
    • decorators.py
    • definition.py
    • pvattrs.py
    • pvblocks.py
    • pvfactory.py
    • pvschemas.py
    • transforms.py
    • types.py
    • validation.py
    • conftest.py
    • test_schema_adapter_integration.py
    • test_schema_basics.py
    • test_schema_conversion.py
    • test_schema_lifecycle.py
    • test_schema_terraform_state.py
    • test_schema_types.py
    • test_schema_validation.py

Encode() Method Simplification

41 files changed
  • complete_terraform_integration.py Changes to complete_terraform_integration.py
  • debug_schema.py Changes to debug_schema.py
  • drift_detection.py Changes to drift_detection.py
  • main.tf Changes to main.tf
  • schema_converter.py Changes to schema_converter.py
  • schema_examples.py Changes to schema_examples.py
  • schema_lifecycle.py Changes to schema_lifecycle.py
  • schema_showcase.py Changes to schema_showcase.py
  • schema_state_validator.py Changes to schema_state_validator.py
  • schema_transformer.py Changes to schema_transformer.py
  • terraform_lifecycle_example.py Changes to terraform_lifecycle_example.py
  • terraform_state_schema_generator.py Changes to terraform_state_schema_generator.py
  • terraform_state_schema_model.py Changes to terraform_state_schema_model.py
  • test-terraform.tf Changes to test-terraform.tf
  • tfstate-schema-test.json Changes to tfstate-schema-test.json
  • terraform.py Changes to terraform.py
  • get_functions.py Changes to get_functions.py
  • README.md Changes to README.md
  • __init__.py Changes to __init__.py
  • attribute_value.py Changes to attribute_value.py
  • attributes.py Changes to attributes.py
  • base.py Changes to base.py
  • common_types.py Changes to common_types.py
  • cty_adapters.py Changes to cty_adapters.py
  • decorators.py Changes to decorators.py
  • definition.py Changes to definition.py
  • pvattrs.py Changes to pvattrs.py
  • pvblocks.py Changes to pvblocks.py
  • pvfactory.py Changes to pvfactory.py
  • pvschemas.py Changes to pvschemas.py
  • transforms.py Changes to transforms.py
  • types.py Changes to types.py
  • validation.py Changes to validation.py
  • conftest.py Changes to conftest.py
  • test_schema_adapter_integration.py Changes to test_schema_adapter_integration.py
  • test_schema_basics.py Changes to test_schema_basics.py
  • test_schema_conversion.py Changes to test_schema_conversion.py
  • test_schema_lifecycle.py Changes to test_schema_lifecycle.py
  • test_schema_terraform_state.py Changes to test_schema_terraform_state.py
  • test_schema_types.py Changes to test_schema_types.py
  • test_schema_validation.py Changes to test_schema_validation.py
  • Replaced pattern matching in encode() with explicit isinstance checks for CtyValue handling decouple internal
    41 files
    • complete_terraform_integration.py
    • debug_schema.py
    • drift_detection.py
    • main.tf
    • schema_converter.py
    • schema_examples.py
    • schema_lifecycle.py
    • schema_showcase.py
    • schema_state_validator.py
    • schema_transformer.py
    • terraform_lifecycle_example.py
    • terraform_state_schema_generator.py
    • terraform_state_schema_model.py
    • test-terraform.tf
    • tfstate-schema-test.json
    • terraform.py
    • get_functions.py
    • README.md
    • __init__.py
    • attribute_value.py
    • attributes.py
    • base.py
    • common_types.py
    • cty_adapters.py
    • decorators.py
    • definition.py
    • pvattrs.py
    • pvblocks.py
    • pvfactory.py
    • pvschemas.py
    • transforms.py
    • types.py
    • validation.py
    • conftest.py
    • test_schema_adapter_integration.py
    • test_schema_basics.py
    • test_schema_conversion.py
    • test_schema_lifecycle.py
    • test_schema_terraform_state.py
    • test_schema_types.py
    • test_schema_validation.py
  • Changed type annotation from CtyType | None to Any for options parameter specify internal
    41 files
    • complete_terraform_integration.py
    • debug_schema.py
    • drift_detection.py
    • main.tf
    • schema_converter.py
    • schema_examples.py
    • schema_lifecycle.py
    • schema_showcase.py
    • schema_state_validator.py
    • schema_transformer.py
    • terraform_lifecycle_example.py
    • terraform_state_schema_generator.py
    • terraform_state_schema_model.py
    • test-terraform.tf
    • tfstate-schema-test.json
    • terraform.py
    • get_functions.py
    • README.md
    • __init__.py
    • attribute_value.py
    • attributes.py
    • base.py
    • common_types.py
    • cty_adapters.py
    • decorators.py
    • definition.py
    • pvattrs.py
    • pvblocks.py
    • pvfactory.py
    • pvschemas.py
    • transforms.py
    • types.py
    • validation.py
    • conftest.py
    • test_schema_adapter_integration.py
    • test_schema_basics.py
    • test_schema_conversion.py
    • test_schema_lifecycle.py
    • test_schema_terraform_state.py
    • test_schema_types.py
    • test_schema_validation.py
  • Moved decode() and nested static methods into the class (they were accidentally nested inside encode_function) decouple internal
    41 files
    • complete_terraform_integration.py
    • debug_schema.py
    • drift_detection.py
    • main.tf
    • schema_converter.py
    • schema_examples.py
    • schema_lifecycle.py
    • schema_showcase.py
    • schema_state_validator.py
    • schema_transformer.py
    • terraform_lifecycle_example.py
    • terraform_state_schema_generator.py
    • terraform_state_schema_model.py
    • test-terraform.tf
    • tfstate-schema-test.json
    • terraform.py
    • get_functions.py
    • README.md
    • __init__.py
    • attribute_value.py
    • attributes.py
    • base.py
    • common_types.py
    • cty_adapters.py
    • decorators.py
    • definition.py
    • pvattrs.py
    • pvblocks.py
    • pvfactory.py
    • pvschemas.py
    • transforms.py
    • types.py
    • validation.py
    • conftest.py
    • test_schema_adapter_integration.py
    • test_schema_basics.py
    • test_schema_conversion.py
    • test_schema_lifecycle.py
    • test_schema_terraform_state.py
    • test_schema_types.py
    • test_schema_validation.py

GetFunctions Handler

1 file changed
  • get_functions.py Changes to get_functions.py
  • Added to_proto method check before attempting function conversion instantiate internal
    1 file
    • get_functions.py
  • Added diagnostic for functions missing to_proto method instantiate internal
    1 file
    • get_functions.py
  • Added dict-to-Function conversion fallback with error handling remediate internal
    1 file
    • get_functions.py
  • Simplified docstring to focus on the DynamicValue-to-Function fix specify errata
    1 file
    • get_functions.py