pyvider
2025-04-12
Major refactoring of the conversion system: moved conversion logic from `pyvider.conversion`...
34 files · 948+ · 2,133-
New Core Conversion System
5 files changed
conversionCreated `src/pyvider/core/conversion/` package with unified API for value serialization/deseriali...base.pyAdded `base.py` with `FormatKind` enum, `Converter` protocol, `ConverterOptions`, and top-level `...context.pyAdded `context.py` with `OperationContext` enum (READ, PLAN, APPLY, FUNCTION) and context managementregistry.pyAdded `registry.py` with converter registration system mapping `FormatKind` to converter implemen...protocols.pyAdded `protocols.py` defining converter protocol interfaces
- Created
src/pyvider/core/conversion/package with unified API for value serialization/deserialization decouple behavioral1 file
conversion
- Added
base.pywithFormatKindenum,Converterprotocol,ConverterOptions, and top-levelserialize/deserializefunctions interface internal1 file
base.py
- Added
context.pywithOperationContextenum (READ, PLAN, APPLY, FUNCTION) and context management instantiate internal1 file
context.py
- Added
registry.pywith converter registration system mappingFormatKindto converter implementations instantiate internal1 file
registry.py
- Added
protocols.pydefining converter protocol interfaces interface internal1 file
protocols.py
Moved and Refactored Converters
10 files changed
terraform.pyMoved `terraform.py` converter to `core/conversion/converters/terraform.py` with significant refa...terraform.pyMoved `terraform.py` converter to `core/conversion/converters/terraform.py` with significant refa...json.pyMoved `json.py` converter to `core/conversion/converters/json.py`json.pyMoved `json.py` converter to `core/conversion/converters/json.py`conversionDeleted original `pyvider/conversion/` modules: `base.py`, `context.py`, `format.py`, `json.py`, ...base.pyDeleted original `pyvider/conversion/` modules: `base.py`, `context.py`, `format.py`, `json.py`, ...context.pyDeleted original `pyvider/conversion/` modules: `base.py`, `context.py`, `format.py`, `json.py`, ...format.pyDeleted original `pyvider/conversion/` modules: `base.py`, `context.py`, `format.py`, `json.py`, ...schema.pyDeleted original `pyvider/conversion/` modules: `base.py`, `context.py`, `format.py`, `json.py`, ...types.pyDeleted original `pyvider/conversion/` modules: `base.py`, `context.py`, `format.py`, `json.py`, ...
- Moved
terraform.pyconverter tocore/conversion/converters/terraform.pywith significant refactoring (~600 lines of changes) decouple internal2 files
terraform.pyterraform.py
- Moved
json.pyconverter tocore/conversion/converters/json.pydecouple internal2 files
json.pyjson.py
- Deleted original
pyvider/conversion/modules:base.py,context.py,format.py,json.py,schema.py,terraform.py,types.pyinterface errata8 files
conversionbase.pycontext.pyformat.pyjson.pyschema.pyterraform.pytypes.py
New Core Exceptions
4 files changed
exceptionsCreated `src/pyvider/core/exceptions/` package with `base.py` (50 lines of base exception classes...base.pyCreated `src/pyvider/core/exceptions/` package with `base.py` (50 lines of base exception classes...conversion.pyCreated `src/pyvider/core/exceptions/` package with `base.py` (50 lines of base exception classes...conversion.pyRemoved old `pyvider/exceptions/conversion.py` and stripped serialization exceptions
- Created
src/pyvider/core/exceptions/package withbase.py(50 lines of base exception classes) andconversion.py(126 lines of conversion-specific exceptions includingConversionError,SchemaConversionError) baseline internal3 files
exceptionsbase.pyconversion.py
- Removed old
pyvider/exceptions/conversion.pyand stripped serialization exceptions decouple internal1 file
conversion.py
Protocol-Level Converter Adapter
2 files changed
converter.pyAdded `src/pyvider/protocols/tfprotov6/adapters/converter.py` (204 lines) bridging the core conve...conversionRemoved the old `tfprotov6/conversion/` package (schema_types, terraform_to_cty, validation modul...
- Added
src/pyvider/protocols/tfprotov6/adapters/converter.py(204 lines) bridging the core conversion system with the Terraform protocol interface internal1 file
converter.py
- Removed the old
tfprotov6/conversion/package (schema_types, terraform_to_cty, validation modules totaling ~957 lines) baseline internal1 file
conversion
Handler Import Updates
1 file changed
pyvider.core.conversionUpdated pyvider.core.conversion
- Updated all tfprotov6 handlers (apply_resource_change, call_function, get_provider_schema, plan_resource_change, read_data_source, read_resource, validate_data_resource_config) to use new
pyvider.core.conversionimports instantiate internal1 file
pyvider.core.conversion