Format Overhaul - Enhanced JSON Schema Support and Asset Management#19
Merged
afshawnlotfi merged 7 commits intomainfrom Feb 13, 2026
Merged
Format Overhaul - Enhanced JSON Schema Support and Asset Management#19afshawnlotfi merged 7 commits intomainfrom
afshawnlotfi merged 7 commits intomainfrom
Conversation
…dling
- Updated Mesh class to support new decoding format using metadata/data.json, metadata/schema.json, and assets/{checksum}.bin.
- Removed deprecated interfaces and methods related to mesh size and custom field configurations.
- Enhanced marker handling in MeshData and Mesh class, including renaming and restructuring of marker-related properties.
- Refactored Packable class to align with new data structure, including removal of legacy metadata loading and custom field decoding.
- Introduced SchemaUtils for resolving $ref references and handling JSON Schema during deserialization.
- Improved error handling for missing assets and references.
- Added utility functions for extracting checksums from data objects.
…nd asset management - Introduced `PackableStore` to manage asset storage and extracted data paths. - Updated `Packable` and `Mesh` classes to include JSON schema hints (`x-base`, `x-module`) for better reconstruction. - Modified extraction and reconstruction methods to utilize the new `ExtractedPackable` structure. - Simplified asset handling during save/load operations, ensuring deduplication and correct file paths. - Enhanced tests to cover new functionality and ensure backward compatibility with existing features.
…a handling and asset management
… dev dependencies
…sing and improve documentation clarity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major refactoring of the Packable/Mesh extraction and reconstruction system with improved JSON schema hints, consolidated file format, and enhanced VTK export capabilities. Changes span both Python and TypeScript implementations.
Breaking Changes⚠️
metadata/data.jsonandmetadata/schema.jsonfiles with a singleextracted.jsonfile containing theExtractedPackablestructureAssetStoreremoved: Replaced withPackableStoreinpackable.pyfor streamlined asset managementDATA_FILEandSCHEMA_FILEconstants replaced withEXTRACTED_FILENew Features
JSON Schema Hints for Reconstruction
x-baseandx-moduleextension properties to JSON schemasx-baseindicates the base class type:'Packable','Mesh', or'BaseModel'x-modulestores the fully qualified class module path for proper reconstructionVTK Export Support (Python)
to_pyvista()method converts Mesh to PyVista UnstructuredGridsave_vtk()method exports meshes to VTK formats (.vtk, .vtu, .ply, .stl)pyvista(available in dev dependencies)Improved
Mesh.combine()MethodMeshChanges by Area
packable.py,mesh.pypackable.ts,mesh.ts,lazy-model.tsconstants.py,constants.tsjson_schema.py,json-schema.tsFiles Changed
Testing
ExtractedPackableformattest_dynamic_model_base.pyfor reconstruction testing