Skip to content

Commit 8e83861

Browse files
committed
Merge branch 'feat/track_boolean_operations' of https://github.com/ansys/pyansys-geometry into feat/track_boolean_operations
2 parents b84e23c + 394a621 commit 8e83861

File tree

3 files changed

+42
-38
lines changed

3 files changed

+42
-38
lines changed

.github/workflows/nightly_docker_test.yml

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -174,21 +174,22 @@ jobs:
174174
# Message to send to Teams as a webhook notification in JSON Payload format
175175
raw: >-
176176
{
177-
"@type": "MessageCard",
178-
"@context": "http://schema.org/extensions",
179-
"summary": "Unstable build tests for Windows Core Service failing",
180-
"themeColor": "f44336",
181-
"title": "PyAnsys Geometry unstable build tests - Windows Core Service failing",
182-
"sections": [
177+
"type": "message",
178+
"attachments": [
183179
{
184-
"activityTitle": "Windows Core Service unstable build tests are failing",
185-
"activitySubtitle": "Check the run for more details: https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }}",
186-
"facts": [
187-
{
188-
"name": "Status",
189-
"value": "Failed"
190-
}
191-
]
180+
"contentType": "application/vnd.microsoft.card.adaptive",
181+
"content": {
182+
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
183+
"type": "AdaptiveCard",
184+
"version": "1.0",
185+
"body": [
186+
{
187+
"type": "TextBlock",
188+
"text": "**Windows Core Service unstable build tests are failing**\n\n[View details in GitHub Actions](https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }})",
189+
"wrap": true
190+
}
191+
]
192+
}
192193
}
193194
]
194195
}
@@ -242,21 +243,22 @@ jobs:
242243
# Message to send to Teams as a webhook notification in JSON Payload format
243244
raw: >-
244245
{
245-
"@type": "MessageCard",
246-
"@context": "http://schema.org/extensions",
247-
"summary": "Unstable build tests for Linux Core Service failing",
248-
"themeColor": "f44336",
249-
"title": "PyAnsys Geometry unstable build tests - Linux Core Service failing",
250-
"sections": [
246+
"type": "message",
247+
"attachments": [
251248
{
252-
"activityTitle": "Linux Core Service unstable build tests are failing",
253-
"activitySubtitle": "Check the run for more details: https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }}",
254-
"facts": [
255-
{
256-
"name": "Status",
257-
"value": "Failed"
258-
}
259-
]
249+
"contentType": "application/vnd.microsoft.card.adaptive",
250+
"content": {
251+
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
252+
"type": "AdaptiveCard",
253+
"version": "1.0",
254+
"body": [
255+
{
256+
"type": "TextBlock",
257+
"text": "**Linux Core Service unstable build tests are failing**\n\n[View details in GitHub Actions](https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }})",
258+
"wrap": true
259+
}
260+
]
261+
}
260262
}
261263
]
262264
}

doc/changelog.d/2274.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Card message on failure

src/ansys/geometry/core/_grpc/_services/v0/repair_tools.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from .conversions import (
3535
serialize_tracker_command_response,
3636
)
37-
from .conversions import build_grpc_id
37+
3838

3939
class GRPCRepairToolsServiceV0(GRPCRepairToolsService): # noqa: D102
4040
"""Repair tools service for gRPC communication with the Geometry server.
@@ -469,7 +469,7 @@ def find_and_fix_simplify(self, **kwargs) -> dict: # noqa: D102
469469
"modified_bodies_monikers": [],
470470
"complete_command_response": serialized_tracker_response,
471471
}
472-
472+
473473
@protect_grpc
474474
def find_and_fix_stitch_faces(self, **kwargs) -> dict: # noqa: D102
475475
from ansys.api.geometry.v0.repairtools_pb2 import FindStitchFacesRequest
@@ -506,8 +506,8 @@ def find_and_fix_stitch_faces(self, **kwargs) -> dict: # noqa: D102
506506
"found": response.found,
507507
"repaired": response.repaired,
508508
"complete_command_response": serialized_tracker_response,
509-
}
510-
509+
}
510+
511511
@protect_grpc
512512
def inspect_geometry(self, **kwargs) -> dict: # noqa: D102
513513
from ansys.api.geometry.v0.repairtools_pb2 import InspectGeometryRequest
@@ -549,14 +549,15 @@ def fix_duplicate_faces(self, **kwargs) -> dict: # noqa: D102
549549
response = self.stub.FixDuplicateFaces(request)
550550

551551
serialized_tracker_response = serialize_tracker_command_response(
552-
response=response.result.complete_command_response)
553-
552+
response=response.result.complete_command_response
553+
)
554+
554555
# Return the response - formatted as a dictionary
555556
return {
556557
"tracker_response": serialized_tracker_response,
557558
"repair_tracker_response": self.__serialize_message_response(response),
558-
}
559-
559+
}
560+
560561
@protect_grpc
561562
def fix_missing_faces(self, **kwargs) -> dict: # noqa: D102
562563
from ansys.api.geometry.v0.repairtools_pb2 import FixMissingFacesRequest
@@ -754,7 +755,7 @@ def fix_interference(self, **kwargs) -> dict: # noqa: D102
754755
"tracker_response": serialized_tracker_response,
755756
"repair_tracker_response": self.__serialize_message_response(response),
756757
}
757-
758+
758759
def __serialize_inspect_result_response(self, response) -> dict: # noqa: D102
759760
def serialize_body(body):
760761
return {
@@ -807,7 +808,7 @@ def serialize_issue(issue):
807808
}
808809
for body_issues in response.issues_by_body
809810
]
810-
}
811+
}
811812

812813
def __serialize_message_response(self, response):
813814
return {

0 commit comments

Comments
 (0)