2Validation module for PyHelios.
4This module provides comprehensive parameter validation for all PyHelios operations,
5ensuring fail-fast behavior with clear error messages before reaching C++ code.
8 ValidationError: Exception for validation failures
11 validate_vec3, validate_rgb_color, validate_positive_value
14 validate_geometry_params
15 validate_plugin_params
18 coerce_to_vec3, coerce_to_vec2
20Following PyHelios's fail-fast philosophy, validation provides:
21- Clear, actionable error messages
22- Type coercion where safe (list to vec3)
23- Performance optimization via decorators
24- Comprehensive testing coverage
27from .exceptions
import ValidationError
33 validate_positive_value,
34 validate_non_negative_value
36from .datatypes
import (
41 validate_spherical_coord
43from .geometry
import (
44 validate_geometry_center,
45 validate_geometry_size2d,
46 validate_geometry_size3d,
47 validate_patch_params,
48 validate_triangle_params,
49 validate_sphere_params,
55 validate_directory_path
58 validate_wavelength_range,
61 validate_direction_vector,
64 validate_source_id_list,
65 validate_wpt_parameters,
67 validate_physical_quantity,
69 validate_segment_resolution,
70 validate_angle_degrees,
71 validate_scaling_factor,
74 validate_positive_integer_range,
75 validate_recursion_level,
76 validate_subdivision_count
78from .plugin_decorators
import (
80 validate_radiation_band_params,
81 validate_collimated_source_params,
82 validate_sphere_source_params,
83 validate_sun_sphere_params,
84 validate_source_flux_multiple_params,
85 validate_get_source_flux_params,
86 validate_update_geometry_params,
87 validate_run_band_params,
88 validate_scattering_depth_params,
89 validate_min_scatter_energy_params,
91 validate_tree_uuid_params,
92 validate_recursion_params,
93 validate_trunk_segment_params,
94 validate_branch_segment_params,
95 validate_leaf_subdivisions_params,
97 validate_energy_run_params,
98 validate_energy_band_params,
99 validate_air_energy_params,
100 validate_evaluate_air_energy_params,
101 validate_output_data_params,
102 validate_print_report_params,
104 validate_build_geometry_params,
105 validate_print_window_params
117 'validate_positive_value',
118 'validate_non_negative_value',
123 'validate_rgb_color',
124 'validate_rgba_color',
125 'validate_spherical_coord',
128 'validate_geometry_center',
129 'validate_geometry_size2d',
130 'validate_geometry_size3d',
131 'validate_patch_params',
132 'validate_triangle_params',
133 'validate_sphere_params',
134 'validate_tube_params',
135 'validate_box_params',
138 'validate_file_path',
139 'validate_directory_path',
142 'validate_wavelength_range',
143 'validate_flux_value',
144 'validate_ray_count',
145 'validate_direction_vector',
146 'validate_band_label',
147 'validate_source_id',
148 'validate_source_id_list',
149 'validate_wpt_parameters',
150 'validate_time_value',
151 'validate_physical_quantity',
153 'validate_segment_resolution',
154 'validate_angle_degrees',
155 'validate_scaling_factor',
157 'validate_uuid_list',
158 'validate_positive_integer_range',
159 'validate_recursion_level',
160 'validate_subdivision_count',
163 'validate_radiation_band_params',
164 'validate_collimated_source_params',
165 'validate_sphere_source_params',
166 'validate_sun_sphere_params',
167 'validate_source_flux_multiple_params',
168 'validate_get_source_flux_params',
169 'validate_update_geometry_params',
170 'validate_run_band_params',
171 'validate_scattering_depth_params',
172 'validate_min_scatter_energy_params',
173 'validate_tree_uuid_params',
174 'validate_recursion_params',
175 'validate_trunk_segment_params',
176 'validate_branch_segment_params',
177 'validate_leaf_subdivisions_params',
178 'validate_energy_run_params',
179 'validate_energy_band_params',
180 'validate_air_energy_params',
181 'validate_evaluate_air_energy_params',
182 'validate_output_data_params',
183 'validate_print_report_params',
184 'validate_build_geometry_params',
185 'validate_print_window_params'