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.pyChanges to terraform.py
- Extracted
_prepare_valueto use explicitisinstancechecks instead of pattern matching decouple internal1 file
terraform.py
- Added self-referencing circular import workaround (importing
TerraformTypewithin the method body) remediate internal1 file
terraform.py
- Recursive calls changed from
TerraformConverter._prepare_value()to local_prepare_value()to avoid class reference issues decouple internal1 file
terraform.py
Function Schema Encoding
39 files changed
complete_terraform_integration.pyChanges to complete_terraform_integration.pydebug_schema.pyChanges to debug_schema.pydrift_detection.pyChanges to drift_detection.pymain.tfChanges to main.tfschema_converter.pyChanges to schema_converter.pyschema_examples.pyChanges to schema_examples.pyschema_lifecycle.pyChanges to schema_lifecycle.pyschema_showcase.pyChanges to schema_showcase.pyschema_state_validator.pyChanges to schema_state_validator.pyschema_transformer.pyChanges to schema_transformer.pyterraform_lifecycle_example.pyChanges to terraform_lifecycle_example.pyterraform_state_schema_generator.pyChanges to terraform_state_schema_generator.pyterraform_state_schema_model.pyChanges to terraform_state_schema_model.pytest-terraform.tfChanges to test-terraform.tftfstate-schema-test.jsonChanges to tfstate-schema-test.jsonREADME.mdChanges to README.md__init__.pyChanges to __init__.pyattribute_value.pyChanges to attribute_value.pyattributes.pyChanges to attributes.pybase.pyChanges to base.pycommon_types.pyChanges to common_types.pycty_adapters.pyChanges to cty_adapters.pydecorators.pyChanges to decorators.pydefinition.pyChanges to definition.pypvattrs.pyChanges to pvattrs.pypvblocks.pyChanges to pvblocks.pypvfactory.pyChanges to pvfactory.pypvschemas.pyChanges to pvschemas.pytransforms.pyChanges to transforms.pytypes.pyChanges to types.pyvalidation.pyChanges to validation.pyconftest.pyChanges to conftest.pytest_schema_adapter_integration.pyChanges to test_schema_adapter_integration.pytest_schema_basics.pyChanges to test_schema_basics.pytest_schema_conversion.pyChanges to test_schema_conversion.pytest_schema_lifecycle.pyChanges to test_schema_lifecycle.pytest_schema_terraform_state.pyChanges to test_schema_terraform_state.pytest_schema_types.pyChanges to test_schema_types.pytest_schema_validation.pyChanges to test_schema_validation.py
- Added
encode_function()static method for converting function schemas toFunctionprotobuf messages instantiate internal39 files
complete_terraform_integration.pydebug_schema.pydrift_detection.pymain.tfschema_converter.pyschema_examples.pyschema_lifecycle.pyschema_showcase.pyschema_state_validator.pyschema_transformer.pyterraform_lifecycle_example.pyterraform_state_schema_generator.pyterraform_state_schema_model.pytest-terraform.tftfstate-schema-test.jsonREADME.md__init__.pyattribute_value.pyattributes.pybase.pycommon_types.pycty_adapters.pydecorators.pydefinition.pypvattrs.pypvblocks.pypvfactory.pypvschemas.pytransforms.pytypes.pyvalidation.pyconftest.pytest_schema_adapter_integration.pytest_schema_basics.pytest_schema_conversion.pytest_schema_lifecycle.pytest_schema_terraform_state.pytest_schema_types.pytest_schema_validation.py
- Added
Functionto protobuf imports (from pyvider.protocols.tfprotov6.protobuf import DynamicValue, Function) interface internal39 files
complete_terraform_integration.pydebug_schema.pydrift_detection.pymain.tfschema_converter.pyschema_examples.pyschema_lifecycle.pyschema_showcase.pyschema_state_validator.pyschema_transformer.pyterraform_lifecycle_example.pyterraform_state_schema_generator.pyterraform_state_schema_model.pytest-terraform.tftfstate-schema-test.jsonREADME.md__init__.pyattribute_value.pyattributes.pybase.pycommon_types.pycty_adapters.pydecorators.pydefinition.pypvattrs.pypvblocks.pypvfactory.pypvschemas.pytransforms.pytypes.pyvalidation.pyconftest.pytest_schema_adapter_integration.pytest_schema_basics.pytest_schema_conversion.pytest_schema_lifecycle.pytest_schema_terraform_state.pytest_schema_types.pytest_schema_validation.py
encode()method now acceptstarget_type="function"option for specialized function encoding path decouple behavioral39 files
complete_terraform_integration.pydebug_schema.pydrift_detection.pymain.tfschema_converter.pyschema_examples.pyschema_lifecycle.pyschema_showcase.pyschema_state_validator.pyschema_transformer.pyterraform_lifecycle_example.pyterraform_state_schema_generator.pyterraform_state_schema_model.pytest-terraform.tftfstate-schema-test.jsonREADME.md__init__.pyattribute_value.pyattributes.pybase.pycommon_types.pycty_adapters.pydecorators.pydefinition.pypvattrs.pypvblocks.pypvfactory.pypvschemas.pytransforms.pytypes.pyvalidation.pyconftest.pytest_schema_adapter_integration.pytest_schema_basics.pytest_schema_conversion.pytest_schema_lifecycle.pytest_schema_terraform_state.pytest_schema_types.pytest_schema_validation.py
- Added dict-to-Function conversion fallback when
to_proto()returns a dict instead of Function harden internal39 files
complete_terraform_integration.pydebug_schema.pydrift_detection.pymain.tfschema_converter.pyschema_examples.pyschema_lifecycle.pyschema_showcase.pyschema_state_validator.pyschema_transformer.pyterraform_lifecycle_example.pyterraform_state_schema_generator.pyterraform_state_schema_model.pytest-terraform.tftfstate-schema-test.jsonREADME.md__init__.pyattribute_value.pyattributes.pybase.pycommon_types.pycty_adapters.pydecorators.pydefinition.pypvattrs.pypvblocks.pypvfactory.pypvschemas.pytransforms.pytypes.pyvalidation.pyconftest.pytest_schema_adapter_integration.pytest_schema_basics.pytest_schema_conversion.pytest_schema_lifecycle.pytest_schema_terraform_state.pytest_schema_types.pytest_schema_validation.py
Encode() Method Simplification
41 files changed
complete_terraform_integration.pyChanges to complete_terraform_integration.pydebug_schema.pyChanges to debug_schema.pydrift_detection.pyChanges to drift_detection.pymain.tfChanges to main.tfschema_converter.pyChanges to schema_converter.pyschema_examples.pyChanges to schema_examples.pyschema_lifecycle.pyChanges to schema_lifecycle.pyschema_showcase.pyChanges to schema_showcase.pyschema_state_validator.pyChanges to schema_state_validator.pyschema_transformer.pyChanges to schema_transformer.pyterraform_lifecycle_example.pyChanges to terraform_lifecycle_example.pyterraform_state_schema_generator.pyChanges to terraform_state_schema_generator.pyterraform_state_schema_model.pyChanges to terraform_state_schema_model.pytest-terraform.tfChanges to test-terraform.tftfstate-schema-test.jsonChanges to tfstate-schema-test.jsonterraform.pyChanges to terraform.pyget_functions.pyChanges to get_functions.pyREADME.mdChanges to README.md__init__.pyChanges to __init__.pyattribute_value.pyChanges to attribute_value.pyattributes.pyChanges to attributes.pybase.pyChanges to base.pycommon_types.pyChanges to common_types.pycty_adapters.pyChanges to cty_adapters.pydecorators.pyChanges to decorators.pydefinition.pyChanges to definition.pypvattrs.pyChanges to pvattrs.pypvblocks.pyChanges to pvblocks.pypvfactory.pyChanges to pvfactory.pypvschemas.pyChanges to pvschemas.pytransforms.pyChanges to transforms.pytypes.pyChanges to types.pyvalidation.pyChanges to validation.pyconftest.pyChanges to conftest.pytest_schema_adapter_integration.pyChanges to test_schema_adapter_integration.pytest_schema_basics.pyChanges to test_schema_basics.pytest_schema_conversion.pyChanges to test_schema_conversion.pytest_schema_lifecycle.pyChanges to test_schema_lifecycle.pytest_schema_terraform_state.pyChanges to test_schema_terraform_state.pytest_schema_types.pyChanges to test_schema_types.pytest_schema_validation.pyChanges to test_schema_validation.py
- Replaced pattern matching in
encode()with explicitisinstancechecks for CtyValue handling decouple internal41 files
complete_terraform_integration.pydebug_schema.pydrift_detection.pymain.tfschema_converter.pyschema_examples.pyschema_lifecycle.pyschema_showcase.pyschema_state_validator.pyschema_transformer.pyterraform_lifecycle_example.pyterraform_state_schema_generator.pyterraform_state_schema_model.pytest-terraform.tftfstate-schema-test.jsonterraform.pyget_functions.pyREADME.md__init__.pyattribute_value.pyattributes.pybase.pycommon_types.pycty_adapters.pydecorators.pydefinition.pypvattrs.pypvblocks.pypvfactory.pypvschemas.pytransforms.pytypes.pyvalidation.pyconftest.pytest_schema_adapter_integration.pytest_schema_basics.pytest_schema_conversion.pytest_schema_lifecycle.pytest_schema_terraform_state.pytest_schema_types.pytest_schema_validation.py
- Changed type annotation from
CtyType | NonetoAnyfor options parameter specify internal41 files
complete_terraform_integration.pydebug_schema.pydrift_detection.pymain.tfschema_converter.pyschema_examples.pyschema_lifecycle.pyschema_showcase.pyschema_state_validator.pyschema_transformer.pyterraform_lifecycle_example.pyterraform_state_schema_generator.pyterraform_state_schema_model.pytest-terraform.tftfstate-schema-test.jsonterraform.pyget_functions.pyREADME.md__init__.pyattribute_value.pyattributes.pybase.pycommon_types.pycty_adapters.pydecorators.pydefinition.pypvattrs.pypvblocks.pypvfactory.pypvschemas.pytransforms.pytypes.pyvalidation.pyconftest.pytest_schema_adapter_integration.pytest_schema_basics.pytest_schema_conversion.pytest_schema_lifecycle.pytest_schema_terraform_state.pytest_schema_types.pytest_schema_validation.py
- Moved
decode()and nested static methods into the class (they were accidentally nested insideencode_function) decouple internal41 files
complete_terraform_integration.pydebug_schema.pydrift_detection.pymain.tfschema_converter.pyschema_examples.pyschema_lifecycle.pyschema_showcase.pyschema_state_validator.pyschema_transformer.pyterraform_lifecycle_example.pyterraform_state_schema_generator.pyterraform_state_schema_model.pytest-terraform.tftfstate-schema-test.jsonterraform.pyget_functions.pyREADME.md__init__.pyattribute_value.pyattributes.pybase.pycommon_types.pycty_adapters.pydecorators.pydefinition.pypvattrs.pypvblocks.pypvfactory.pypvschemas.pytransforms.pytypes.pyvalidation.pyconftest.pytest_schema_adapter_integration.pytest_schema_basics.pytest_schema_conversion.pytest_schema_lifecycle.pytest_schema_terraform_state.pytest_schema_types.pytest_schema_validation.py
GetFunctions Handler
1 file changed
get_functions.pyChanges to get_functions.py
- Added
to_protomethod check before attempting function conversion instantiate internal1 file
get_functions.py
- Added diagnostic for functions missing
to_protomethod instantiate internal1 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