pyvider 2025-06-22
Massive merge of work from the mono repo, bringing in a modular CLI system, new wire codec...
85 files · 7,660+ · 4,809-

Modular CLI System

3 files changed
  • cli Added `src/pyvider/cli/` package replacing the monolithic `cli.py`:
  • cli.py Added `src/pyvider/cli/` package replacing the monolithic `cli.py`:
  • __main__.py Reduced `__main__.py` to a thin launcher (~158 lines of changes)
  • Added src/pyvider/cli/ package replacing the monolithic cli.py: baseline behavioral
    2 files
    • cli
    • cli.py
  • Reduced __main__.py to a thin launcher (~158 lines of changes) decouple internal
    1 file
    • __main__.py

New Wire Codec Module

1 file changed
  • wire Added `src/pyvider/wire/` package:

Conversion System Overhaul

9 files changed
  • __init__.py Rewrote `conversion/__init__.py` (65 lines of changes) with imports from pyvider-core, pyvider-ct...
  • adapter.py Added `conversion/adapter.py` (82 lines), `raw_to_cty.py` (58 lines), `schema_adapter.py` (68 lin...
  • raw_to_cty.py Added `conversion/adapter.py` (82 lines), `raw_to_cty.py` (58 lines), `schema_adapter.py` (68 lin...
  • schema_adapter.py Added `conversion/adapter.py` (82 lines), `raw_to_cty.py` (58 lines), `schema_adapter.py` (68 lin...
  • terraform.py Added `conversion/adapter.py` (82 lines), `raw_to_cty.py` (58 lines), `schema_adapter.py` (68 lin...
  • type_encoder.py Added `conversion/adapter.py` (82 lines), `raw_to_cty.py` (58 lines), `schema_adapter.py` (68 lin...
  • dynamic_value.py Removed `conversion/dynamic_value.py` (161 lines) and `conversion/context/` package
  • context Removed `conversion/dynamic_value.py` (161 lines) and `conversion/context/` package
  • wire_format.py Removed `protocols/adapters/wire_format.py`
  • Rewrote conversion/__init__.py (65 lines of changes) with imports from pyvider-core, pyvider-cty, and pyvider-schema sub-packages interface internal
    1 file
    • __init__.py
  • Added conversion/adapter.py (82 lines), raw_to_cty.py (58 lines), schema_adapter.py (68 lines), terraform.py (60 lines), type_encoder.py (90 lines) interface internal
    5 files
    • adapter.py
    • raw_to_cty.py
    • schema_adapter.py
    • terraform.py
    • type_encoder.py
  • Removed conversion/dynamic_value.py (161 lines) and conversion/context/ package baseline internal
    2 files
    • dynamic_value.py
    • context
  • Removed protocols/adapters/wire_format.py decouple internal
    1 file
    • wire_format.py

Updated Protobuf Definitions

4 files changed
  • tfplugin6.proto Added `tfplugin6.proto` (794 lines) - the raw Terraform plugin protocol definition
  • tfplugin6_pb2.pyi Added `tfplugin6_pb2.pyi` (829 lines) - type stubs for the generated protobuf code
  • tfplugin6_pb2.py Updated `tfplugin6_pb2.py` (~354 lines of changes) and `tfplugin6_pb2_grpc.py` (~99 lines of chan...
  • tfplugin6_pb2_grpc.py Updated `tfplugin6_pb2.py` (~354 lines of changes) and `tfplugin6_pb2_grpc.py` (~99 lines of chan...
  • Added tfplugin6.proto (794 lines) - the raw Terraform plugin protocol definition interface internal
    1 file
    • tfplugin6.proto
  • Added tfplugin6_pb2.pyi (829 lines) - type stubs for the generated protobuf code instantiate internal
    1 file
    • tfplugin6_pb2.pyi
  • Updated tfplugin6_pb2.py (~354 lines of changes) and tfplugin6_pb2_grpc.py (~99 lines of changes) decouple internal
    2 files
    • tfplugin6_pb2.py
    • tfplugin6_pb2_grpc.py

Handler Simplification

1 file changed
  • utils.py Significantly reduced all resource handlers using new shared `utils.py` (50 lines):
  • Significantly reduced all resource handlers using new shared utils.py (50 lines): instantiate internal
    1 file
    • utils.py

Provider Architecture

4 files changed
  • provider_core.py Added `src/pyvider/provider_core.py` (114 lines) with core provider logic
  • decorators.py Added `src/pyvider/providers/decorators.py` (21 lines) for provider registration
  • base.py Reworked `providers/base.py` (~113 lines) and `providers/provider.py` (~79 lines)
  • provider.py Reworked `providers/base.py` (~113 lines) and `providers/provider.py` (~79 lines)
  • Added src/pyvider/provider_core.py (114 lines) with core provider logic instantiate internal
    1 file
    • provider_core.py
  • Added src/pyvider/providers/decorators.py (21 lines) for provider registration instantiate internal
    1 file
    • decorators.py
  • Reworked providers/base.py (~113 lines) and providers/provider.py (~79 lines) decouple internal
    2 files
    • base.py
    • provider.py

Component Simplification

4 files changed
  • env_variables.py Simplified data sources: `env_variables.py` (~326 lines), `http_api.py` (~427 lines), `file_info....
  • http_api.py Simplified data sources: `env_variables.py` (~326 lines), `http_api.py` (~427 lines), `file_info....
  • file_info.py Simplified data sources: `env_variables.py` (~326 lines), `http_api.py` (~427 lines), `file_info....
  • file_content.py Simplified `resources/file_content.py` (~252 lines)
  • Simplified data sources: env_variables.py (~326 lines), http_api.py (~427 lines), file_info.py (~174 lines) decouple internal
    3 files
    • env_variables.py
    • http_api.py
    • file_info.py
  • Simplified resources/file_content.py (~252 lines) decouple internal
    1 file
    • file_content.py
  • Added integrated test configs for numeric_functions and string_manipulation qualify internal
    2 files
    • test_component_discovery.py
    • test_component_registry.py

Test Suite Updates

5 files changed
  • test_cli.py Added `tests/test_cli.py` (870 lines) with comprehensive CLI tests
  • test_decorators.py Added `tests/capabilities/test_decorators.py` (136 lines)
  • test_availability.py Added `tests/common/utils/test_availability.py` (78 lines)
  • test_operation_context.py Added `tests/conversion/context/test_operation_context.py` (119 lines)
  • test_foundation_exceptions.py Added `tests/exceptions/test_foundation_exceptions.py` (39 lines)
  • Added tests/test_cli.py (870 lines) with comprehensive CLI tests qualify behavioral
    1 file
    • test_cli.py
  • Added tests/capabilities/test_decorators.py (136 lines) qualify internal
    1 file
    • test_decorators.py
  • Added tests/common/utils/test_availability.py (78 lines) qualify internal
    1 file
    • test_availability.py
  • Added tests/conversion/context/test_operation_context.py (119 lines) qualify internal
    1 file
    • test_operation_context.py
  • Added tests/exceptions/test_foundation_exceptions.py (39 lines) qualify internal
    1 file
    • test_foundation_exceptions.py
  • Updated existing tests across functions, handlers, hub, and schema modules qualify internal
    78 files
    • env_variables.py
    • file_info.py
    • http_api.py
    • file_content.py
    • numeric_functions.tf
    • string_manipulation.tf
    • env.sh
    • pyproject.toml
    • terraform-provider-pyvider
    • __init__.py
    • __main__.py
    • __init__.py
    • components_commands.py
    • config_commands.py
    • main.py
    • prep_commands.py
    • provide_command.py
    • __init__.py
    • __init__.py
    • availability.py
    • common_types.py
    • __init__.py
    • adapter.py
    • __init__.py
    • operation_context.py
    • dynamic_value.py
    • raw_to_cty.py
    • schema_adapter.py
    • terraform.py
    • type_encoder.py
    • __init__.py
    • base.py
    • function.py
    • grpc.py
    • provider.py
    • registry.py
    • resource.py
    • schema.py
    • serialization.py
    • validation.py
    • adapters.py
    • base.py
    • validators.py
    • function_adapter.py
    • apply_resource_change.py
    • call_function.py
    • get_provider_schema.py
    • plan_resource_change.py
    • read_data_source.py
    • read_resource.py
    • utils.py
    • validate_data_resource_config.py
    • validate_resource_config.py
    • tfplugin6.proto
    • tfplugin6_pb2.py
    • tfplugin6_pb2.pyi
    • tfplugin6_pb2_grpc.py
    • __init__.py
    • base.py
    • provider.py
    • base.py
    • context.py
    • protocol.py
    • __init__.py
    • codec.py
    • exceptions.py
    • schema.py
    • types.py
    • conftest.py
    • test_dynamic_value_conversion.py
    • test_function_adapter.py
    • test_provider_handler_delegation.py
    • test_provider_handler_hub_interaction.py
    • test_component_discovery.py
    • test_component_registry.py
    • mock_base.py
    • test_wire_type_encoder.py
    • uv.lock