Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
210a1af
feat: Update client side 'enhanced' meshing workflow to use server si…
prmukherj Nov 12, 2025
101d833
chore: adding changelog file 4600.added.md [dependabot-skip]
pyansys-ci-bot Nov 12, 2025
72bc722
Add test for renaming, deletion and insertion.
prmukherj Nov 12, 2025
fe3cc4a
Added the update workflow file.
prmukherj Nov 17, 2025
9a33809
Update Meshing workflow.
prmukherj Nov 21, 2025
74a5b01
Merge branch 'main' into feat/update_enhanced_meshing_workflow_to_use…
prmukherj Nov 26, 2025
00f9b29
Merge branch 'feat/update_enhanced_meshing_workflow_to_use_meshing_wo…
prmukherj Nov 26, 2025
dbca074
Update
prmukherj Nov 28, 2025
f4a922e
Updates.
prmukherj Nov 28, 2025
a02a71d
Updated behaviour.
prmukherj Dec 10, 2025
7f930a5
Merge branch 'main' into feat/update_enhanced_meshing_workflow_to_use…
prmukherj Dec 10, 2025
5774525
Monkey patch environment variable.
prmukherj Dec 10, 2025
efcfa19
Update generated task names.
prmukherj Dec 16, 2025
2729cfe
Merge branch 'main' into feat/update_enhanced_meshing_workflow_to_use…
prmukherj Dec 16, 2025
fff3e77
Added docstrings.
prmukherj Dec 16, 2025
dc05be2
Added docstrings.
prmukherj Dec 16, 2025
29780fb
Updates.
prmukherj Dec 16, 2025
4e876b0
Pass down meshing root from the top level.
prmukherj Dec 17, 2025
d96526f
Fixes.
prmukherj Dec 17, 2025
b787792
Remove unnecessary comments.
prmukherj Dec 17, 2025
1672f12
Minor updates.
prmukherj Dec 17, 2025
dcff47f
Minor updates.
prmukherj Dec 17, 2025
3935020
Minor updates.
prmukherj Dec 17, 2025
9919d07
Minor updates.
prmukherj Dec 17, 2025
5ae4d88
Refactor.
prmukherj Dec 17, 2025
51b7d6c
Have inline comments.
prmukherj Dec 17, 2025
bb9ece0
Rename _task_list.
prmukherj Dec 17, 2025
1a63519
Mark workflow tests as nightly.
prmukherj Dec 17, 2025
42eb0eb
Refactor and clean up.
prmukherj Dec 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updates.
  • Loading branch information
prmukherj committed Nov 28, 2025
commit f4a922e0cfada4247c3b33c23d78060b65b669c6
82 changes: 63 additions & 19 deletions src/ansys/fluent/core/workflow_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ def _convert_task_list_to_display_names(workflow_root, task_list):
return _display_names


def _get_child_task_by_task_id(workflow_root, task_id):
return PyMenu(
service=workflow_root.service,
rules=workflow_root.rules,
path=[("task_object", task_id), ("_name_", "")],
).get_remote_state()


def camel_to_snake_case(camel_case_str: str) -> str:
"""Convert camel case input string to snake case output string."""
if not camel_case_str.islower():
Expand Down Expand Up @@ -171,14 +179,34 @@ def children(self):
return sorted_list

def first_child(self):
children = self.children()
if children:
return children[0]
task_list = self._workflow.general.workflow.task_list()
if task_list:
first_name = _get_child_task_by_task_id(self._workflow, task_list[0])
else:
return None
for task_obj in self.tasks():
if task_obj.name() == first_name:
return TaskObject(
task_obj, task_obj.__class__.__name__.lstrip("_"), self._workflow, self
)

def last_child(self):
children = self.children()
if children:
return children[-1]
task_list = self._workflow.general.workflow.task_list()
if task_list:
last_name = _get_child_task_by_task_id(self._workflow, task_list[1])
else:
return None
for task_obj in self.tasks():
if task_obj.name() == last_name:
return TaskObject(
task_obj, task_obj.__class__.__name__.lstrip("_"), self._workflow, self
)

def task_list(self):
"""."""
return _convert_task_list_to_display_names(
self._workflow, self._workflow.general.workflow.task_list()
)

def ordered_tasks(self):
ordered_names = _convert_task_list_to_display_names(
Expand Down Expand Up @@ -404,23 +432,39 @@ def children(self):
sorted_list.append(name_to_task[name])
return sorted_list

def _get_child_task_by_task_id(self, task_id):
ordered_names = _convert_task_list_to_display_names(
workflow,
workflow.general.workflow.task_list(),
)

def first_child(self):
task_list = self.task_list()
if task_list:
first_name = task_list[0]
else:
return None
workflow = super().__getattribute__("_workflow")
workflow.general.workflow.task_list()[0]
children = self.children()
if children:
return children[0]

type_to_name = {
item.split(":")[0]: item.split(":")[-1] for item in workflow.task_object()
}
for key, val in type_to_name.items():
if val == first_name:
return TaskObject(
getattr(workflow.task_object, key)[val], key, workflow, self
)

def last_child(self):
children = self.children()
if children:
return children[-1]
task_list = self.task_list()
if task_list:
last_name = task_list[-1]
else:
return None
workflow = super().__getattribute__("_workflow")

type_to_name = {
item.split(":")[0]: item.split(":")[-1] for item in workflow.task_object()
}
for key, val in type_to_name.items():
if val == last_name:
return TaskObject(
getattr(workflow.task_object, key)[val], key, workflow, self
)

@staticmethod
def _get_next_key(input_dict, current_key):
Expand Down
Loading