@@ -83,7 +83,7 @@ def run_analysis(
8383 - elements: list
8484 List of tuples (``type``, ``event``)
8585
86- - analysis_type : RunAnalysisRequest.Analysis.AnalysisType
86+ - analysis_type : RunAnalysisRequestAnalysisType
8787 Type of analysis to run.
8888
8989 - event : list
@@ -116,7 +116,7 @@ def run_analysis(
116116 "Test",
117117 "Card",
118118 [
119- (SherlockAnalysisService_pb2.RunAnalysisRequest.Analysis.AnalysisType.NaturalFreq ,
119+ (RunAnalysisRequestAnalysisType.NATURAL_FREQ ,
120120 [
121121 ("Phase 1", ["Harmonic Event"])
122122 ]
@@ -280,10 +280,6 @@ def update_harmonic_vibe_props(
280280 )
281281
282282 """
283- if self .FREQ_UNIT_LIST is None :
284- self ._init_freq_units ()
285- if self .TEMP_UNIT_LIST is None :
286- self ._init_temp_units ()
287283 try :
288284 if project == "" :
289285 raise SherlockUpdateHarmonicVibePropsError (message = "Project name is invalid." )
@@ -355,15 +351,6 @@ def update_harmonic_vibe_props(
355351
356352 if "analysis_temp_units" in harmonic_vibe_props .keys ():
357353 analysis_temp_units = harmonic_vibe_props ["analysis_temp_units" ]
358- if (
359- (self .TEMP_UNIT_LIST is not None )
360- and (analysis_temp_units is not None )
361- and (analysis_temp_units not in self .TEMP_UNIT_LIST )
362- ):
363- raise SherlockUpdateHarmonicVibePropsError (
364- message = f"Analysis temperature units are invalid for "
365- f"harmonic vibe properties { i } : " + analysis_temp_units
366- )
367354 else :
368355 analysis_temp_units = None
369356
@@ -384,15 +371,6 @@ def update_harmonic_vibe_props(
384371
385372 if "natural_freq_min_units" in harmonic_vibe_props .keys ():
386373 natural_freq_min_units = harmonic_vibe_props ["natural_freq_min_units" ]
387- if (
388- (self .FREQ_UNIT_LIST is not None )
389- and (natural_freq_min_units is not None )
390- and (natural_freq_min_units not in self .FREQ_UNIT_LIST )
391- ):
392- raise SherlockUpdateHarmonicVibePropsError (
393- message = f"Minimum natural frequency units are invalid for "
394- f"harmonic vibe properties { i } : " + natural_freq_min_units
395- )
396374 else :
397375 natural_freq_min_units = None
398376
@@ -403,15 +381,6 @@ def update_harmonic_vibe_props(
403381
404382 if "natural_freq_max_units" in harmonic_vibe_props .keys ():
405383 natural_freq_max_units = harmonic_vibe_props ["natural_freq_max_units" ]
406- if (
407- (self .FREQ_UNIT_LIST is not None )
408- and (natural_freq_max_units is not None )
409- and (natural_freq_max_units not in self .FREQ_UNIT_LIST )
410- ):
411- raise SherlockUpdateHarmonicVibePropsError (
412- message = f"Maximum natural frequency units are invalid for "
413- f"harmonic vibe properties { i } : " + natural_freq_max_units
414- )
415384 else :
416385 natural_freq_max_units = None
417386
@@ -512,7 +481,7 @@ def get_random_vibe_input_fields(self, model_source=None):
512481 cca_name="Card",
513482 )
514483 >>> sherlock.analysis.get_random_vibe_input_fields(
515- model_source=SherlockAnalysisService_pb2. ModelSource.STRAIN_MAP
484+ model_source=ModelSource.STRAIN_MAP
516485 )
517486 """
518487 if not self ._is_connection_up ():
@@ -629,7 +598,7 @@ def update_random_vibe_props(
629598 random_vibe_damping="0.01, 0.05",
630599 analysis_temp=20,
631600 analysis_temp_units="C",
632- model_source=SherlockAnalysisService_pb2. ModelSource.STRAIN_MAP,
601+ model_source=ModelSource.STRAIN_MAP,
633602 )
634603
635604 """
@@ -1004,13 +973,13 @@ def update_pcb_modeling_props(self, project, cca_names, analyses):
1004973 analyses : list
1005974 List of elements consisting of the following properties:
1006975
1007- - analysis_type : UpdatePcbModelingPropsRequest.Analysis.AnalysisType
976+ - analysis_type : UpdatePcbModelingPropsRequestAnalysisType
1008977 Type of analysis applied.
1009- - pcb_model_type : UpdatePcbModelingPropsRequest.Analysis.PcbModelType
978+ - pcb_model_type : UpdatePcbModelingPropsRequestPcbModelType
1010979 The PCB modeling mesh type.
1011980 - modeling_region_enabled : bool
1012981 Indicates if modeling regions are enabled.
1013- - pcb_material_model : UpdatePcbModelingPropsRequest.Analysis.PcbMaterialModel
982+ - pcb_material_model : UpdatePcbModelingPropsRequestPcbMaterialModel
1014983 The PCB modeling PCB model type.
1015984 - pcb_max_materials : int
1016985 The number of PCB materials for Uniform Elements and Layered Elements PCB model
@@ -1044,11 +1013,11 @@ def update_pcb_modeling_props(self, project, cca_names, analyses):
10441013 ["Main Board"],
10451014 [
10461015 (
1047- update_request.Analysis.AnalysisType.NaturalFreq ,
1048- update_request.Analysis.PcbModelType.Bonded ,
1016+ UpdatePcbModelingPropsRequestAnalysisType.HARMONIC_VIBE ,
1017+ UpdatePcbModelingPropsRequestPcbModelType.BONDED ,
10491018 True,
1050- update_request.Analysis.PcbMaterialModel.Uniform ,
1051- SherlockAnalysisService_pb2. ElementOrder.SolidShell ,
1019+ UpdatePcbModelingPropsRequestPcbMaterialModel.UNIFORM ,
1020+ ElementOrder.SOLID_SHELL ,
10521021 6,
10531022 "mm",
10541023 3,
0 commit comments