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

DOCS: Fix python code error in visualization report #5437

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion doc/source/API/visualization/report.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The following code shows how to use report modules in standalone mode.
p1 = app.modeler.create_polyline(test_points)
setup = app.create_setup()

report = Fields(app=app, report_category="Fields",
report = Fields(app=app.post, report_category="Fields",
setup_name=setup.name + " : LastAdaptive",
expressions="Mag_E")
report.polyline = p1.name
Expand Down
10 changes: 7 additions & 3 deletions src/ansys/aedt/core/visualization/report/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
This module provides all functionalities for creating and editing reports.

"""
from ansys.aedt.core.generic.general_methods import pyaedt_function_handler

Check warning on line 31 in src/ansys/aedt/core/visualization/report/field.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/report/field.py#L31

Added line #L31 was not covered by tests
from ansys.aedt.core.visualization.report.common import CommonReport
from ansys.aedt.core.visualization.report.standard import Standard

Expand Down Expand Up @@ -67,10 +68,13 @@


class Fields(CommonReport):
"""Provides for managing fields."""
"""Handler to manage fields."""

def __init__(self, app, report_category, setup_name, expressions=None):
CommonReport.__init__(self, app, report_category, setup_name, expressions)
@pyaedt_function_handler(

Check warning on line 73 in src/ansys/aedt/core/visualization/report/field.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/report/field.py#L73

Added line #L73 was not covered by tests
app="post_app",
)
def __init__(self, post_app, report_category, setup_name, expressions=None):
CommonReport.__init__(self, post_app, report_category, setup_name, expressions)

Check warning on line 77 in src/ansys/aedt/core/visualization/report/field.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/report/field.py#L76-L77

Added lines #L76 - L77 were not covered by tests
self.domain = "Sweep"
self.primary_sweep = "Distance"

Expand Down
Loading