Skip to content

Commit

Permalink
doc: modified another src file
Browse files Browse the repository at this point in the history
  • Loading branch information
moe-ad committed Dec 10, 2024
1 parent c523edb commit 30b49a5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/ansys/dpf/core/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import os
import traceback
import warnings
from pathlib import Path

from enum import Enum
from typing import Union
Expand Down Expand Up @@ -932,11 +933,15 @@ def view(
name = title

if save_as:
dot_path = os.path.splitext(str(save_as))[0] + ".dot"
image_path = save_as
# dot_path = os.path.splitext(str(save_as))[0] + ".dot"
image_path = Path(save_as)
dot_path = image_path.parent / image_path.stem / ".dot"

Check warning on line 938 in src/ansys/dpf/core/workflow.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/core/workflow.py#L937-L938

Added lines #L937 - L938 were not covered by tests
# image_path = save_as
else:
dot_path = os.path.join(os.getcwd(), f"{name}.dot")
image_path = os.path.join(os.getcwd(), f"{name}.png")
# dot_path = os.path.join(os.getcwd(), f"{name}.dot")
image_path = Path.cwd() / f"{name}.png"
dot_path = image_path.parent / image_path.stem / ".dot"

Check warning on line 943 in src/ansys/dpf/core/workflow.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/core/workflow.py#L942-L943

Added lines #L942 - L943 were not covered by tests
# image_path = os.path.join(os.getcwd(), f"{name}.png")

# Create graphviz file of workflow
self.to_graphviz(dot_path)
Expand All @@ -946,7 +951,8 @@ def view(
# View workflow
graphviz.view(filepath=image_path)
if not keep_dot_file:
os.remove(dot_path)
# os.remove(dot_path)
dot_path.unlink()

Check warning on line 955 in src/ansys/dpf/core/workflow.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/core/workflow.py#L955

Added line #L955 was not covered by tests
return image_path

def to_graphviz(self, path: Union[os.PathLike, str]):
Expand Down

0 comments on commit 30b49a5

Please sign in to comment.