diff --git a/doc/changelog.d/669.documentation.md b/doc/changelog.d/669.documentation.md new file mode 100644 index 000000000..1cde8c547 --- /dev/null +++ b/doc/changelog.d/669.documentation.md @@ -0,0 +1 @@ +Fix: updated get_stackup_props() to have improveStackupModelEnabled in the response diff --git a/pyproject.toml b/pyproject.toml index a74bf772c..117bb9aea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] dependencies = [ - "ansys-api-sherlock==0.1.51", + "ansys-api-sherlock==0.1.52", "grpcio>=1.17, <1.68.0", "protobuf>=3.20", "pydantic>=2.9.2", diff --git a/src/ansys/sherlock/core/types/stackup_types.py b/src/ansys/sherlock/core/types/stackup_types.py index f35b1e204..3e1aeb5c1 100644 --- a/src/ansys/sherlock/core/types/stackup_types.py +++ b/src/ansys/sherlock/core/types/stackup_types.py @@ -20,3 +20,4 @@ def __init__(self, properties: SherlockStackupService_pb2.GetStackupPropsRespons self.ctez = properties.ctEz self.exy = properties.exy self.ez = properties.ez + self.improve_stackup_model_enabled = properties.improveStackupModelEnabled diff --git a/tests/test_stackup.py b/tests/test_stackup.py index 4648008a7..4792133c8 100644 --- a/tests/test_stackup.py +++ b/tests/test_stackup.py @@ -611,16 +611,34 @@ def helper_test_get_stackup_props(stackup): "Main Board", ) - assert ( - stackup_properties.board_dimension == "190.3171 x 114.3076 mm [7.4928 x 4.5003 in]" - ), "Board dimension" - assert stackup_properties.board_thickness == "2.091 mm [82.3 mil]", "Board thickness" - assert stackup_properties.density == "2.0264 g/cc", "Density" - assert stackup_properties.conductor_layers_cnt == "6", "Conductor layers count" - assert stackup_properties.ctexy == "18.618 ppm/C", "CTExy" - assert stackup_properties.ctez == "60.821 ppm/C", "CTEz" - assert stackup_properties.exy == "25,420 MPa", "Exy" - assert stackup_properties.ez == "6,939 MPa", "Ez" + if stackup_properties.improve_stackup_model_enabled: + assert ( + stackup_properties.board_dimension + == "190.3171 x 114.3076 mm [7.4928 x 4.5003 in]" + ), "Board dimension" + assert ( + stackup_properties.board_thickness == "2.091 mm [82.3 mil]" + ), "Board thickness" + assert stackup_properties.density == "2.0264 g/cc", "Density" + assert stackup_properties.conductor_layers_cnt == "6", "Conductor layers count" + assert stackup_properties.ctexy == "18.556 ppm/C", "CTExy" + assert stackup_properties.ctez == "60.821 ppm/C", "CTEz" + assert stackup_properties.exy == "24,865 MPa", "Exy" + assert stackup_properties.ez == "6,939 MPa", "Ez" + else: + assert ( + stackup_properties.board_dimension + == "190.3171 x 114.3076 mm [7.4928 x 4.5003 in]" + ), "Board dimension" + assert ( + stackup_properties.board_thickness == "2.091 mm [82.3 mil]" + ), "Board thickness" + assert stackup_properties.density == "2.0264 g/cc", "Density" + assert stackup_properties.conductor_layers_cnt == "6", "Conductor layers count" + assert stackup_properties.ctexy == "18.618 ppm/C", "CTExy" + assert stackup_properties.ctez == "60.821 ppm/C", "CTEz" + assert stackup_properties.exy == "25,420 MPa", "Exy" + assert stackup_properties.ez == "6,939 MPa", "Ez" except SherlockGetLayerCountError as e: pytest.fail(str(e))