You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ENH] Convert InterpolationOptions to Pydantic model (#12)
# Getting the first example of InterpolationOptions serializable
This PR converts the `InterpolationOptions` class from a dataclass to a Pydantic model to enable serialization. The changes include:
- Replaced dataclass with Pydantic's `BaseModel` for `InterpolationOptions`
- Converted the constructor to a class method `from_args()` to maintain backward compatibility
- Added proper type annotations and Pydantic Field definitions
- Fixed a minor type issue in `octree_curvature_threshold` by adding a decimal point
- Added proper model configuration for enum handling
- Made `TempInterpolationValues` a proper dataclass
These changes are the first step toward making the model serializable while maintaining the existing functionality.
Copy file name to clipboardExpand all lines: gempy_engine/core/data/options/evaluation_options.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ class MeshExtractionMaskingOptions(enum.Enum):
14
14
classEvaluationOptions:
15
15
_number_octree_levels: int=1
16
16
_number_octree_levels_surface: int=4
17
-
octree_curvature_threshold: float=-1#: Threshold to do octree refinement due to curvature to deal with angular geometries. This curvature assumes that 1 is the maximum curvature of any voxel
17
+
octree_curvature_threshold: float=-1.#: Threshold to do octree refinement due to curvature to deal with angular geometries. This curvature assumes that 1 is the maximum curvature of any voxel
18
18
octree_error_threshold: float=1.#: Number of standard deviations to consider a voxel as candidate to refine
0 commit comments