Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add WorkflowTopology class and workflow_to_workflow_topology operator #1902

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Matteo-Baussart-ANSYS
Copy link
Collaborator

@Matteo-Baussart-ANSYS Matteo-Baussart-ANSYS commented Nov 15, 2024

This adds the PyDPF support of the WorkflowData class and workflow_to_workflow_topology operator,

@Matteo-Baussart-ANSYS Matteo-Baussart-ANSYS self-assigned this Nov 15, 2024
@Matteo-Baussart-ANSYS Matteo-Baussart-ANSYS changed the title feat: add WorkflowData class and workflow_to_workflow_data operator feat: add WorkflowTopology class and workflow_to_workflow_topology operator Nov 18, 2024
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.27%. Comparing base (7b33c37) to head (87aacb8).
Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1902      +/-   ##
==========================================
+ Coverage   86.62%   88.27%   +1.65%     
==========================================
  Files          83       88       +5     
  Lines        9973    10174     +201     
==========================================
+ Hits         8639     8981     +342     
+ Misses       1334     1193     -141     

@@ -481,6 +482,11 @@ def _type_to_output_method(self):
self._api.operator_getoutput_as_any,
lambda obj, type: any.Any(server=self._server, any_dpf=obj).cast(type),
),
(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Matteo-Baussart-ANSYS can a Workflow also potentially take in or output a WorkflowTopology object?
Can an operator take a WorkflowTopology as input?

@@ -48,3 +48,19 @@ def _sort_supported_kwargs(bound_method, **kwargs):
warnings.warn(txt)
# Return the accepted arguments
return kwargs_in


def indent(text, subsequent_indent="", initial_indent=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Matteo-Baussart-ANSYS this will need a docstring with description and parameters. Also typehinting?

@@ -953,6 +953,15 @@ def to_graphviz(self, path: Union[os.PathLike, str]):
"""Saves the workflow to a GraphViz file."""
return self._api.work_flow_export_graphviz(self, str(path))

def get_topology(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Matteo-Baussart-ANSYS same, missing a docstring and typehinting

# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need a title, reference tag and description. You can find examples of that being done in other modules.

from ansys.dpf.core.custom_container_base import CustomContainerBase


class DataConnection(CustomContainerBase):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Matteo-Baussart-ANSYS again, missing docstrings and typehinting everywhere

Copy link
Contributor

@PProfizi PProfizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some specific questions, but a general request is to add docstrings, module headers, typehinting, and improve coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants