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.pyMoved `base.py`, `collections/`, `primitives/`, `structural/` under new `types/` namespace__init__.pyReworked `__init__.py` exports so consumers can import from `pyvider.cty` directly
- Moved
base.py,collections/,primitives/,structural/under newtypes/namespace decouple internal1 file
base.py
- Removed old top-level
collections/,primitives/,structural/directories decouple internal24 files
__init__.py__init__.pylist.pymap.pyset.pytest_cty_collections_list.pytest_cty_collections_list_improve.pytest_cty_collections_map.pytest_cty_collections_set.py__init__.py__init__.pybool.pynumber.pystring.py__init__.pydynamic.pyobject.py__init__.pydynamic.pyobject.pytuple.pytest_cty_structural_dynamic.pytest_cty_structural_object.pytest_cty_structural_tuple.py
- Updated all imports from relative to absolute (
pyvider.cty.types.base.CtyType) decouple internal2 files
base.py__init__.py
- Reworked
__init__.pyexports so consumers can import frompyvider.ctydirectly interface internal1 file
__init__.py
Test Suite Reorganization
2 files changed
dynamic.pyMoved all tests into categorized subdirectories: `collections/`, `conversions/`, `dynamic/`, `enc...__init__.pyAdded `__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 internal1 file
dynamic.py
- Added
__init__.pyfiles for each test subdirectory qualify internal1 file
__init__.py
- Removed intermediate
tests/unit/directory layer qualify internal22 files
test_convert.pytest_convert_base.pytest_convert_primitive.pytest_cty_collections_list.pytest_cty_collections_list_improve.pytest_cty_collections_map.pytest_cty_collections_set.pytest_cty_path.pytest_cty_structural_dynamic.pytest_cty_structural_object.pytest_cty_structural_tuple.pytest_cty_type.pytest_cty_types_simple.pytest_cty_values_base.pytest_encoding_json.pytest_encoding_msgpack.pytest_function_base.pytest_object.pytest_operations.pytest_path.pytest_refinement.pytest_stdlib.py
Values System (`src/pyvider/cty/values/`)
2 files changed
base.pyRenamed `Value` class to `CtyValue` for namespace consistency__init__.pyExported `CtyValue` from package `__init__.py`
- Renamed
Valueclass toCtyValuefor namespace consistency decouple internal1 file
base.py
- Added
operations.pywith comprehensive value operations (1333 lines): equality, comparison, arithmetic, collection operations instantiate internal1 file
base.py
- Added
refinement.pywith value refinement builder for type constraints instantiate internal1 file
refinement.py
- Exported
CtyValuefrom package__init__.pybaseline internal1 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 withregister_conversion()for type-to-type converters decouple internal1 file
base.py
convert.py: Full conversion engine (648 lines) with safe/unsafe conversion paths decouple internal1 file
convert.py
primitive.py: Primitive type conversions (string-to-number, etc.) decouple internal1 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 internal1 file
json.py
msgpack.py: MessagePack encoding (510 lines) for wire protocol compatibility interface internal1 file
codec.py
protobuf.py: Protobuf encoding (340 lines) for gRPC interoperability interface internal1 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...
Path Navigation (`src/pyvider/cty/path/path.py`)
2 files changed
base.pyExtended path module to 441 lines with attribute, index, and key access steps__init__.pyReplaced `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.telemetrylogger references withpyvider.cty.loggerdecouple behavioral1 file
__init__.py
Logging Framework (`src/pyvider/cty/logger/`)
1 file changed
base.pySelf-contained logging system with `base.py`, `formatters.py`, `emoji_matrix.py`
- Self-contained logging system with
base.py,formatters.py,emoji_matrix.pydecouple behavioral1 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
Documentation and Licensing
1 file changed
go-cty-comparison.mdAdded go-cty upstream documentation reference
- Added go-cty upstream documentation reference
instantiate
internal
1 file
go-cty-comparison.md
- Added chat/research documentation
instantiate
internal
1 file
go-cty-comparison.md
- Added
LICENSE.md(Creative Commons BY-ND 4.0) instantiate internal1 file
LICENSE.md
- Added
.reuse/dep5for REUSE compliance (later removed) instantiate internal1 file
go-cty-comparison.md