pytdml icon indicating copy to clipboard operation
pytdml copied to clipboard

Address extended_types vs extended_types_old

Open photonbit opened this issue 9 months ago • 1 comments

In the library we have pytdml.type.extended_types and pytdml.type.extended_types_old. This pytdml.type.extended_types_oldis used only inpytdml.io.version_converter, but it not specified to what version old and new are referring to. Is it the 1.0 vs the 1.1 version of the standard? If that is the case, maybe the types could be inside pytdml.1_0.typesandpytdml.1_1.types`, for example, to make the versions explicit and clarify that the version makes reference to the TrainingDML-AI standard.

photonbit avatar Mar 13 '25 13:03 photonbit

The current pytdml.type.extended_types_old module lacks clear alignment with specific standard versions (e.g., 1.0 vs. 1.1), which could lead to maintenance and usability issues.  ​1. Current State: The extended_types_old module was initially developed when the ​OGC TrainingDML-AI Standard Version 1.0 was still under active updates. As a result, it was not strictly bound to a specific standard version and has not been maintained thereafter. Currently, this module serves solely for ​internal legacy data format conversion, and its type definitions ​do not strictly align with any officially released OGC standard version (e.g., 1.0). It exists to address interim data compatibility needs from early projects. Considering the lightweighting of the package mentioned earlier, I think we can also remove it here and use a separate package for the usage.  2. ​Optimization Strategy: ​Remove Legacy Types: Deprecate extended_types_old and related conversion logic from the core package. ​Independent Tool: Migrate the format conversion functionality to a separate repository (e.g., pytdml-legacy-converter), installable via pip install as needed.  3. ​Versioned Naming (Optional): If multi-version standard support is required later, we can adopt explicit paths (e.g., pytdml.v1_0.types, pytdml.v1_1.types).  Post-refactoring, the core package will strictly adhere to the latest OGC standard, ensuring lightweight maintenance.

Relifest avatar Mar 20 '25 08:03 Relifest