Skip to content

Conversation

@smereu
Copy link
Contributor

@smereu smereu commented Dec 5, 2025

Description

V1 implementation of beam stub.
Does not address the following issues

  1. DeleteBeamProfile seems to have disappeared from v1 protos
  2. Need to make sure that we have a consistent pattern for creation that may return multiple entities (not expected in the return of the v0 method)

Issue linked

Please mention the issue number or describe the problem this pull request addresses.

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate unit tests.
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved to the PR if any.
  • I have assigned this PR to myself.
  • I have added the minimum version decorator to any new backend method implemented.
  • I have made sure that the title of my PR follows Conventional commits style (e.g. feat: extrude circle to cylinder)

pyansys-ci-bot and others added 27 commits February 17, 2025 14:31
@smereu smereu self-assigned this Dec 5, 2025
@smereu smereu requested a review from a team as a code owner December 5, 2025 04:31
@github-actions github-actions bot added the maintenance Package and maintenance related label Dec 5, 2025
@github-actions github-actions bot added maintenance Package and maintenance related and removed maintenance Package and maintenance related labels Dec 5, 2025
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 9.37500% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.02%. Comparing base (5c3c0a2) to head (d3d826e).

Files with missing lines Patch % Lines
...rc/ansys/geometry/core/_grpc/_services/v1/beams.py 9.37% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2444      +/-   ##
==========================================
- Coverage   91.56%   91.02%   -0.54%     
==========================================
  Files         169      169              
  Lines       11859    11884      +25     
==========================================
- Hits        10859    10818      -41     
- Misses       1000     1066      +66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

)

self.stub = BeamsStub(channel)
self.beam_commands_stub = BeamProfileDataStub
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.beam_commands_stub = BeamProfileDataStub
self.stub = BeamProfileDataStub(channel)

Comment on lines 70 to 78
# Create the gRPC Line objects
lines = []
for segment in kwargs["segments"]:
lines.append(
Line(
start=from_point3d_to_grpc_point(segment[0]),
end=from_point3d_to_grpc_point(segment[1]),
)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not your fault - this is wrong in v0 too :(. Can you change both to use the from_line_to_grpc_line conversion?

@jacobrkerstetter jacobrkerstetter mentioned this pull request Dec 5, 2025
23 tasks
@github-actions github-actions bot added maintenance Package and maintenance related and removed maintenance Package and maintenance related labels Dec 5, 2025
@github-actions github-actions bot added maintenance Package and maintenance related and removed maintenance Package and maintenance related labels Dec 5, 2025
Comment on lines +71 to +75
from_line_to_grpc_line(
Line(
start=from_point3d_to_grpc_point(segment[0]),
end=from_point3d_to_grpc_point(segment[1]),
)
Copy link
Member

Choose a reason for hiding this comment

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

I think this has to be reverted.. the Line object here referes to the gRPC object already. Please revert

Comment on lines +105 to +109
from_line_to_grpc_line(
Line(
start=from_point3d_to_grpc_point(segment[0]),
end=from_point3d_to_grpc_point(segment[1]),
)
Copy link
Member

Choose a reason for hiding this comment

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

Same comment.

Comment on lines +79 to +85
from_line_to_grpc_line(
Line(
start=from_point3d_to_grpc_point(segment[0]),
end=from_point3d_to_grpc_point(segment[1]),
)
)
)
Copy link
Member

Choose a reason for hiding this comment

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

Same comment... I'm not sure how this is even working. You shouldn't be needing to pass through the from_line_to_grpc_line method.

Comment on lines +123 to +129
from_line_to_grpc_line(
Line(
start=from_point3d_to_grpc_point(segment[0]),
end=from_point3d_to_grpc_point(segment[1]),
)
)
)
Copy link
Member

Choose a reason for hiding this comment

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

Same comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Package and maintenance related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants