pyvider 2025-10-10
Enhanced the Terraform provider wrapper script generation with intelligent venv detection, and...
36 files · 2,993+ · 253-

Improved Provider Script Generation

29 files changed
  • utils.py Updated utils.py (+102/-31 lines)
  • settings.local.json Updated settings.local.json (+16/-2 lines)
  • FOUNDATION_INTEGRATION_PLAN.md Added FOUNDATION_INTEGRATION_PLAN.md (+890 lines)
  • coverage.json Added coverage.json (+1 lines)
  • __main__.py Updated __main__.py (+6/-1 lines)
  • encryption.py Updated encryption.py (+356/-65 lines)
  • __init__.py Added __init__.py (+69 lines)
  • metrics.py Added metrics.py (+147 lines)
  • apply_resource_change.py Added apply_resource_change.py (+23 lines)
  • call_function.py Added call_function.py (+23 lines)
  • close_ephemeral_resource.py Added close_ephemeral_resource.py (+25 lines)
  • configure_provider.py Added configure_provider.py (+23 lines)
  • get_functions.py Added get_functions.py (+23 lines)
  • get_metadata.py Added get_metadata.py (+23 lines)
  • get_provider_schema.py Added get_provider_schema.py (+23 lines)
  • import_resource_state.py Added import_resource_state.py (+26 lines)
  • move_resource_state.py Added move_resource_state.py (+26 lines)
  • open_ephemeral_resource.py Added open_ephemeral_resource.py (+25 lines)
  • plan_resource_change.py Added plan_resource_change.py (+24 lines)
  • read_data_source.py Added read_data_source.py (+27 lines)
  • read_resource.py Added read_resource.py (+22 lines)
  • renew_ephemeral_resource.py Added renew_ephemeral_resource.py (+25 lines)
  • stop_provider.py Updated stop_provider.py (+23/-1 lines)
  • upgrade_resource_state.py Added upgrade_resource_state.py (+25 lines)
  • validate_data_resource_config.py Added validate_data_resource_config.py (+26 lines)
  • validate_ephemeral_resource_config.py Added validate_ephemeral_resource_config.py (+25 lines)
  • validate_provider_config.py Added validate_provider_config.py (+24 lines)
  • validate_resource_config.py Added validate_resource_config.py (+27 lines)
  • uv.lock Updated uv.lock (+41/-40 lines)
  • Added _find_actual_venv() function to cli/utils.py that searches for virtual environments in order of preference: .venv, venv, .venv_* (platform-specific), and workenv/*/ (wrkenv style) instantiate errata
    1 file
    • utils.py
  • Rewrote _place_terraform_provider_script() to use detected venv paths instead of runtime OS/arch detection in the generated script decouple internal
    1 file
    • utils.py
  • Generated scripts now use hardcoded accurate paths rather than dynamic platform detection decouple internal
    1 file
    • utils.py
  • Added Python executable validation and descriptive error messages when venv is missing or corrupted instantiate internal
    1 file
    • utils.py
  • Auto-detects execution method: pyvider provide (installed) vs python -m pyvider.cli provide (editable install) baseline behavioral
    1 file
    • utils.py
  • Added user-facing output showing detected venv, execution method, and script location instantiate behavioral
    1 file
    • utils.py

Install Utilities Coverage

7 files changed
  • .venv_darwin_arm64 Added .venv_darwin_arm64 (+1 lines)
  • test_install_utils.py Added test_install_utils.py (+187 lines)
  • test_encryption_unit.py Updated test_encryption_unit.py (+131/-109 lines)
  • test_private_state_encryption.py Updated test_private_state_encryption.py (+5/-4 lines)
  • __init__.py Added __init__.py (+1 lines)
  • test_handler_metrics.py Added test_handler_metrics.py (+194 lines)
  • test_metrics.py Added test_metrics.py (+358 lines)
  • Added tests/cli/test_install_utils.py (187 lines) with comprehensive tests for venv detection logic qualify behavioral
    1 file
    • test_install_utils.py
  • Tests cover standard .venv, alternative venv, platform-specific .venv_darwin_arm64, workenv-style venvs, preference ordering, and not-found scenarios qualify errata
    1 file
    • .venv_darwin_arm64