Skip to content

Commit

Permalink
style checks
Browse files Browse the repository at this point in the history
  • Loading branch information
roosre committed Nov 28, 2023
1 parent 4ee9eec commit 1a7c033
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/011_rst_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
the command ``MP,UVID,<material index>,<value>``.
This workflow is supported since version 2024 R2 (DPF Server version 8.0).
A few advanced features are not supported with the RST onl workflow.
A few advanced features are not supported with the RST only workflow.
Refer to Section :ref:`limitations` for details.
"""
# %%
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dpf/composites/_composite_model_impl_2023r2.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from .layup_info import (
ElementInfo,
LayerProperty,
LayupPropertiesProvider,
LayupModelModelContextType,
LayupPropertiesProvider,
add_layup_info_to_mesh,
get_element_info_provider,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dpf/composites/composite_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def get_layup_operator(self, composite_definition_label: Optional[str] = None) -
return self._implementation.get_layup_operator(composite_definition_label)

@property
def layup_model_type(self) -> LayupModelModelContextType
def layup_model_type(self) -> LayupModelModelContextType:
"""Get the context type of the lay-up model.
The type specifies whether the lay-up data was loaded from an ACP model, RST, or both.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def add_layup_info_to_mesh(

if rst_stream_provider:
from ..server_helpers import version_equal_or_later

# pylint: disable=protected-access
if version_equal_or_later(layup_provider._server, "8.0"):
layup_provider.inputs.rst_stream(rst_stream_provider)

Expand Down
3 changes: 2 additions & 1 deletion src/ansys/dpf/composites/layup_info/_layup_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _get_layup_model_context(layup_provider: dpf.Operator) -> int:

# Note: must be in sync with the LayupModelContextTypeEnum in the C++ code
class LayupModelModelContextType(Enum):
"""Specifi"""
"""Type of the lay-up information."""

NOT_AVAILABLE = 0 # no layup data
ACP = 1 # lay-up data was read from ACP
Expand Down Expand Up @@ -528,6 +528,7 @@ def get_keyopt_property_field(keyopt: int) -> PropertyField:
)
raise RuntimeError(message)

# pylint: disable=protected-access
if material_provider and version_equal_or_later(mesh._server, "8.0"):
helper_op = dpf.Operator("composite::materials_container_helper")
helper_op.inputs.materials_container(material_provider.outputs)
Expand Down
1 change: 1 addition & 0 deletions src/ansys/dpf/composites/sampling_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def run(self) -> None:
)
evaluate_failure_criterion_per_scope_op.inputs.stream_provider(self._rst_streams_provider)
evaluate_failure_criterion_per_scope_op.inputs.mesh(self._meshed_region)
# pylint: disable=protected-access
if version_equal_or_later(self._meshed_region._server, "8.0"):
layup_model_context = _get_layup_model_context(self._layup_provider)
evaluate_failure_criterion_per_scope_op.inputs.layup_model_context_type(
Expand Down
4 changes: 2 additions & 2 deletions tests/rst_only_workflow_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@


def test_composite_model_with_rst_only(dpf_server, data_files, distributed_rst):
"""Test features of the composite model whith sectin data from the RST file only."""
"""Test features of the composite model with section data from the RST file only."""
if distributed_rst:
# TODO: remove once backend issue #856638 is resolved
pytest.xfail("The mesh property provider operator does not yet support distributed RST.")

if version_older_than(dpf_server, "8.0"):
pytest.xfail("Section data from RST is supported since server vesion 8.0 (2024 R2).")
pytest.xfail("Section data from RST is supported since server version 8.0 (2024 R2).")

timer = Timer()

Expand Down

0 comments on commit 1a7c033

Please sign in to comment.