diff --git a/src/depiction/tools/calibrate/config.py b/src/depiction/tools/calibrate/config.py index aa3a04e..c614c1f 100644 --- a/src/depiction/tools/calibrate/config.py +++ b/src/depiction/tools/calibrate/config.py @@ -2,13 +2,14 @@ from typing import Literal, Annotated -from pydantic import BaseModel, Field +from pydantic import BaseModel, Field, ConfigDict from depiction.tools.calibrate.spatial_smoothing_config import GaussianSpatialSmoothingConfig, SpatialSmoothingConfig from depiction.tools.filter_peaks.config import FilterPeaksConfig class CalibrationRegressShiftConfig(BaseModel): + model_config = ConfigDict(extra="forbid") calibration_method: Literal["RegressShift"] = "RegressShift" max_distance: float @@ -44,7 +45,8 @@ class CalibrationConstantGlobalShiftConfig(BaseModel): calibration_method: Literal["ConstantGlobalShift"] = "ConstantGlobalShift" -class CalibrationConfig(BaseModel, use_enum_values=True, validate_default=True): +class CalibrationConfig(BaseModel): + model_config = ConfigDict(extra="forbid", use_enum_values=True, validate_default=True) method: ( Annotated[ CalibrationRegressShiftConfig diff --git a/src/depiction_targeted_preproc/app/config_presets/dev_presets.yml b/src/depiction_targeted_preproc/app/config_presets/dev_presets.yml index 6bb7e81..4b17400 100644 --- a/src/depiction_targeted_preproc/app/config_presets/dev_presets.yml +++ b/src/depiction_targeted_preproc/app/config_presets/dev_presets.yml @@ -25,8 +25,9 @@ calibration: max_distance_unit: ppm reg_model_type: linear_siegelslopes reg_model_unit: mz - input_smoothing_activated: yes - input_smoothing_kernel_size: 5 - input_smoothing_kernel_std: 1.0 + spatial_smoothing: + type: Gaussian + kernel_size: 5 + kernel_std: 1.0 min_points: 3 n_jobs: 10 diff --git a/src/depiction_targeted_preproc/pipeline_config/model.py b/src/depiction_targeted_preproc/pipeline_config/model.py index 69be9fa..2076ba5 100644 --- a/src/depiction_targeted_preproc/pipeline_config/model.py +++ b/src/depiction_targeted_preproc/pipeline_config/model.py @@ -43,6 +43,8 @@ class PipelineArtifact(str, Enum): # TODO we have some redundancy in the peak picker allowing filtering... it should be removed there, since sometimes you # might want peak filtering without peak picking -> TODO create task class PipelineParametersPreset(Model, use_enum_values=True, validate_default=True): + model_config = ConfigDict(extra="forbid") + baseline_correction: BaselineCorrectionConfig | None filter_peaks: FilterPeaksConfig | None calibration: CalibrationConfig | None