# sec_interp.core.validation.project_validator module

Validation for QGIS project state and layer presence.

sec_interp.core.validation.project_validator.validate_reasonable_ranges(values: dict[str, Any]) → list[str]

  Check for unreasonable or potentially erroneous parameter values.

  This function does not return hard errors, but a list of warning strings to inform the user about extreme values (e.g., vertical exaggeration > 10).

  Parameters:

    values – Dictionary containing parameter names and their current values.

  Returns:

    A list of warning messages. If empty, all values are reasonable.

class sec_interp.core.validation.project_validator.ValidationParams(raster_layer: QgsRasterLayer | None = None, band_number: int | None = None, line_layer: QgsVectorLayer | None = None, output_path: str = '', scale: float = 1.0, vert_exag: float = 1.0, buffer_dist: float = 0.0, outcrop_layer: QgsVectorLayer | None = None, outcrop_field: str | None = None, struct_layer: QgsVectorLayer | None = None, struct_dip_field: str | None = None, struct_strike_field: str | None = None, dip_scale_factor: float = 1.0, collar_layer: QgsVectorLayer | None = None, collar_id: str | None = None, collar_use_geom: bool = True, collar_x: str | None = None, collar_y: str | None = None, survey_layer: QgsVectorLayer | None = None, survey_id: str | None = None, survey_depth: str | None = None, survey_azim: str | None = None, survey_incl: str | None = None, interval_layer: QgsVectorLayer | None = None, interval_id: str | None = None, interval_from: str | None = None, interval_to: str | None = None, interval_lith: str | None = None)

  Bases: `object`

  Data container for all parameters that need cross-layer validation.

  raster_layer: QgsRasterLayer | None = None
  band_number: int | None = None
  line_layer: QgsVectorLayer | None = None
  output_path: str = ''
  scale: float = 1.0
  vert_exag: float = 1.0
  buffer_dist: float = 0.0
  outcrop_layer: QgsVectorLayer | None = None
  outcrop_field: str | None = None
  struct_layer: QgsVectorLayer | None = None
  struct_dip_field: str | None = None
  struct_strike_field: str | None = None
  dip_scale_factor: float = 1.0
  collar_layer: QgsVectorLayer | None = None
  collar_id: str | None = None
  collar_use_geom: bool = True
  collar_x: str | None = None
  collar_y: str | None = None
  survey_layer: QgsVectorLayer | None = None
  survey_id: str | None = None
  survey_depth: str | None = None
  survey_azim: str | None = None
  survey_incl: str | None = None
  interval_layer: QgsVectorLayer | None = None
  interval_id: str | None = None
  interval_from: str | None = None
  interval_to: str | None = None
  interval_lith: str | None = None

class sec_interp.core.validation.project_validator.ProjectValidator

  Bases: `object`

  Orchestrates validation of project parameters independent of the GUI.

  static validate_all(params: ValidationParams) → bool

    Perform a comprehensive validation of all project parameters.

    Parameters:

      params – The parameters to validate.

    Returns:

      True if all checks passed.

    Raises:

      ValidationError – If any validation check fails.

  static validate_preview_requirements(params: ValidationParams) → bool

    Validate only the minimum requirements needed to generate a preview.

    Parameters:

      params – The parameters containing at least raster and line layers.

    Returns:

      True if the core preview can be generated.

    Raises:

      ValidationError – Description of missing core components.

  static is_drillhole_complete(params: ValidationParams) → bool

    Check if required fields are filled if drillhole layers are selected.

  static is_geology_complete(params: ValidationParams) → bool

    Check if geology requirements are met.

  static is_structure_complete(params: ValidationParams) → bool

    Check if structural requirements are met.