pyvider-cty 2025-03-09
Major restructuring of the codebase: moved types into a `types/` subdirectory
70 files · 15,633+ · 360-

Module Reorganization

2 files changed
  • base.py Moved `base.py`, `collections/`, `primitives/`, `structural/` under new `types/` namespace
  • __init__.py Reworked `__init__.py` exports so consumers can import from `pyvider.cty` directly
  • Moved base.py, collections/, primitives/, structural/ under new types/ namespace decouple internal
    1 file
    • base.py
  • Removed old top-level collections/, primitives/, structural/ directories decouple internal
    24 files
    • __init__.py
    • __init__.py
    • list.py
    • map.py
    • set.py
    • test_cty_collections_list.py
    • test_cty_collections_list_improve.py
    • test_cty_collections_map.py
    • test_cty_collections_set.py
    • __init__.py
    • __init__.py
    • bool.py
    • number.py
    • string.py
    • __init__.py
    • dynamic.py
    • object.py
    • __init__.py
    • dynamic.py
    • object.py
    • tuple.py
    • test_cty_structural_dynamic.py
    • test_cty_structural_object.py
    • test_cty_structural_tuple.py
  • Updated all imports from relative to absolute (pyvider.cty.types.base.CtyType) decouple internal
    2 files
    • base.py
    • __init__.py
  • Reworked __init__.py exports so consumers can import from pyvider.cty directly interface internal
    1 file
    • __init__.py

Test Suite Reorganization

2 files changed
  • dynamic.py Moved all tests into categorized subdirectories: `collections/`, `conversions/`, `dynamic/`, `enc...
  • __init__.py Added `__init__.py` files for each test subdirectory
  • Moved all tests into categorized subdirectories: collections/, conversions/, dynamic/, encoding/, functions/, list/, object/, path/, tuple/, types/, values/ qualify internal
    1 file
    • dynamic.py
  • Added __init__.py files for each test subdirectory qualify internal
    1 file
    • __init__.py
  • Removed intermediate tests/unit/ directory layer qualify internal
    22 files
    • test_convert.py
    • test_convert_base.py
    • test_convert_primitive.py
    • test_cty_collections_list.py
    • test_cty_collections_list_improve.py
    • test_cty_collections_map.py
    • test_cty_collections_set.py
    • test_cty_path.py
    • test_cty_structural_dynamic.py
    • test_cty_structural_object.py
    • test_cty_structural_tuple.py
    • test_cty_type.py
    • test_cty_types_simple.py
    • test_cty_values_base.py
    • test_encoding_json.py
    • test_encoding_msgpack.py
    • test_function_base.py
    • test_object.py
    • test_operations.py
    • test_path.py
    • test_refinement.py
    • test_stdlib.py

Values System (`src/pyvider/cty/values/`)

2 files changed
  • base.py Renamed `Value` class to `CtyValue` for namespace consistency
  • __init__.py Exported `CtyValue` from package `__init__.py`
  • Renamed Value class to CtyValue for namespace consistency decouple internal
    1 file
    • base.py
  • Added operations.py with comprehensive value operations (1333 lines): equality, comparison, arithmetic, collection operations instantiate internal
    1 file
    • base.py
  • Added refinement.py with value refinement builder for type constraints instantiate internal
    1 file
    • refinement.py
  • Exported CtyValue from package __init__.py baseline internal
    1 file
    • __init__.py

Conversion System (`src/pyvider/cty/convert/`)

1 file changed
  • base.py `base.py`: Conversion registry with `register_conversion()` for type-to-type converters
  • base.py: Conversion registry with register_conversion() for type-to-type converters decouple internal
    1 file
    • base.py
  • convert.py: Full conversion engine (648 lines) with safe/unsafe conversion paths decouple internal
    1 file
    • convert.py
  • primitive.py: Primitive type conversions (string-to-number, etc.) decouple internal
    1 file
    • primitive.py

Encoding Layer (`src/pyvider/cty/encoding/`)

1 file changed
  • codec.py `msgpack.py`: MessagePack encoding (510 lines) for wire protocol compatibility
  • json.py: JSON serialization/deserialization for cty values with null handling decouple internal
    1 file
    • json.py
  • msgpack.py: MessagePack encoding (510 lines) for wire protocol compatibility interface internal
    1 file
    • codec.py
  • protobuf.py: Protobuf encoding (340 lines) for gRPC interoperability interface internal
    1 file
    • protobuf.py

Functions and Stdlib (`src/pyvider/cty/function/`)

2 files changed
  • base.py `base.py`: Function definition framework (390 lines) with parameter validation
  • __init__.py `stdlib.py`: Standard library functions (891 lines): string, numeric, collection, comparison oper...
  • base.py: Function definition framework (390 lines) with parameter validation decouple internal
    1 file
    • base.py
  • stdlib.py: Standard library functions (891 lines): string, numeric, collection, comparison operations decouple internal
    1 file
    • __init__.py

Path Navigation (`src/pyvider/cty/path/path.py`)

2 files changed
  • base.py Extended path module to 441 lines with attribute, index, and key access steps
  • __init__.py Replaced `pyvider.telemetry` logger references with `pyvider.cty.logger`
  • Extended path module to 441 lines with attribute, index, and key access steps decouple internal
    1 file
    • base.py
  • Replaced pyvider.telemetry logger references with pyvider.cty.logger decouple behavioral
    1 file
    • __init__.py

Logging Framework (`src/pyvider/cty/logger/`)

1 file changed
  • base.py Self-contained logging system with `base.py`, `formatters.py`, `emoji_matrix.py`
  • Self-contained logging system with base.py, formatters.py, emoji_matrix.py decouple behavioral
    1 file
    • base.py
  • Message templates for crypto, handshake, transport, and general logging decouple behavioral
    1 file
    • base.py

Object Type Enhancement

1 file changed
  • object.py `structural/object.py` expanded to 650 lines with improved attribute validation
  • structural/object.py expanded to 650 lines with improved attribute validation decouple internal
    1 file
    • object.py
  • Better error messages for unknown block attributes decouple internal
    1 file
    • object.py

Documentation and Licensing

1 file changed
  • go-cty-comparison.md Added go-cty upstream documentation reference