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__.pyNew top-level package init__main__.pyEntry point moved to top-level packageprovider.pyProvider module at new locationgrpc_helpers.pygRPC helpers moved to new locationgrpc_service.pygRPC 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__.pyprovider.py
Rebuilt tftypes into modular types, operations, and serialization subpackages
16 files changed
simple.pySimple types (TFString, TFNumber, TFBool)list.pyTFList type implementationmap.pyTFMap type implementationobject.pyTFObject type with nested attribute handling (343 lines)set.pyTFSet type implementationtuple.pyTFTuple type implementationdiff.pyType diff operations (243 lines)transform.pyType transform operations (110 lines)walk.pyType walk operations (158 lines)json.pyJSON serialization for Terraform types (187 lines)msgpack.pyMessagePack serialization (145 lines)proto.pyProtobuf serialization (128 lines)type.pyBase TerraformType generic classerrors.pyValidationError and SerializationError exceptionsattribute_path.pyAttributePath implementation (196 lines)value.pyTerraform 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.pylist.pymap.pyobject.pyset.pytuple.py
- Created operations/ subpackage with diff, transform, and walk modules
instantiate
behavioral
3 files
diff.pytransform.pywalk.py
- Created serialization/ subpackage with JSON, msgpack, and proto modules
instantiate
behavioral
3 files
json.pymsgpack.pyproto.py
- Added base TerraformType class, AttributePath implementation, Value wrapper, and error types
instantiate
behavioral
4 files
type.pyattribute_path.pyvalue.pyerrors.py
Added DynamicValue handling and schema validation
4 files changed
dynamic_value_test.pyDynamicValue unit tests (172 lines)schema_core.pySchema core definitions (188 lines)schema_validation.pySchema validation logic (341 lines)schema_test.pySchema 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.pyschema_validation.pyschema_test.py
Added comprehensive unit tests for all tftypes modules
14 files changed
test_tftypes_attribute_path.pyUnit tests for AttributePathtest_tftypes_type.pyUnit tests for base Type classtest_tftypes_types_simple.pyUnit tests for simple typestest_tftypes_types_tuple.pyUnit tests for TFTupletest_tftypes_value.pyUnit tests for Value classtest_tftypes_integration.pyIntegration tests across tftypestest_tftypes_operations_diff.pyUnit tests for diff operationstest_tftypes_operations_transform.pyUnit tests for transform operationstest_tftypes_operations_walk.pyUnit tests for walk operationstest_tftypes_serialization_json.pyUnit tests for JSON serializationtest_tftypes_serialization_msgpack.pyUnit tests for msgpack serializationtest_tftypes_serialization_proto.pyUnit tests for proto serializationtest_schema.pyUnit tests for schema moduleconftest.pyTest 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.pytest_tftypes_type.pytest_tftypes_types_simple.pytest_tftypes_types_tuple.pytest_tftypes_value.pytest_tftypes_integration.py
- Added unit tests for operations (diff, transform, walk) and serialization (JSON, msgpack, proto)
qualify
behavioral
6 files
test_tftypes_operations_diff.pytest_tftypes_operations_transform.pytest_tftypes_operations_walk.pytest_tftypes_serialization_json.pytest_tftypes_serialization_msgpack.pytest_tftypes_serialization_proto.py
- Converted BDD feature files from tests/toconvert/ to tests/features/ and added conftest.py
qualify
internal
2 files
conftest.pyfeatures