Tags: gempy-project/gempy
Tags
[ENH] Fix color generator initialization and improve basement color h… …andling (#1038) # Description This PR refactors the `ColorsGenerator` class to use `__post_init__` instead of `__init__` and improves the basement color generation in `StructuralFrame`. The changes include: - Refactored `ColorsGenerator` to use `__post_init__` for proper dataclass initialization - Added `color_generator` as a proper field with default factory in `StructuralFrame` - Improved basement color generation logic to ensure uniqueness - Fixed a tensor detachment issue in nugget optimization by converting to numpy - Removed unused imports in serialization and test modules - Updated test validation settings Relates to #optimization-and-refactoring # Checklist - [x] My code uses type hinting for function and method arguments and return values. - [x] I have created tests which cover my code. - [x] The test code either 1. demonstrates at least one valuable use case (e.g. integration tests) or 2. verifies that outputs are as expected for given inputs (e.g. unit tests). - [x] New tests pass locally with my changes.
[ENH] Implement GeoModel serialization with Pydantic (#1027) # Description Refactored GeoModel to use Pydantic for serialization and deserialization. This change enables saving and loading models to/from JSON format while handling large numpy arrays efficiently. Key changes: - Converted GeoModel from a dataclass to a Pydantic BaseModel - Added serialization support for numpy arrays in grid, surface points, and orientations - Implemented context-based injection for large binary data during deserialization - Added from_args constructor to maintain backward compatibility - Updated model initialization across the codebase - Added gitignore entry for test/temp directory - Added tests for model serialization Relates to #serialization-support # Checklist - [x] My code uses type hinting for function and method arguments and return values. - [x] I have created tests which cover my code. - [x] The test code either 1. demonstrates at least one valuable use case (e.g. integration tests) or 2. verifies that outputs are as expected for given inputs (e.g. unit tests). - [x] New tests pass locally with my changes.
Merge pull request #1008 from gempy-project/le_sdk_ [BUG] Revive gempy x le connection GEN-10870
PreviousNext