ansys-systemcoupling-core 0.7.0__py3-none-any.whl → 0.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ansys-systemcoupling-core might be problematic. Click here for more details.

Files changed (166) hide show
  1. ansys/systemcoupling/core/__init__.py +2 -2
  2. ansys/systemcoupling/core/_version.py +1 -1
  3. ansys/systemcoupling/core/adaptor/api_25_1/instancing.py +2 -0
  4. ansys/systemcoupling/core/adaptor/api_25_1/instancing_child.py +62 -10
  5. ansys/systemcoupling/core/adaptor/api_25_1/mapping_control.py +20 -0
  6. ansys/systemcoupling/core/adaptor/api_25_1/setup_root.py +1 -1
  7. ansys/systemcoupling/core/adaptor/api_25_1/update_participant.py +15 -15
  8. ansys/systemcoupling/core/adaptor/api_25_2/_add_participant.py +80 -0
  9. ansys/systemcoupling/core/adaptor/api_25_2/_clear_state.py +13 -0
  10. ansys/systemcoupling/core/adaptor/api_25_2/_solve.py +13 -0
  11. ansys/systemcoupling/core/adaptor/api_25_2/abort.py +39 -0
  12. ansys/systemcoupling/core/adaptor/api_25_2/activate_hidden.py +46 -0
  13. ansys/systemcoupling/core/adaptor/api_25_2/add_aerodamping_data_transfers.py +43 -0
  14. ansys/systemcoupling/core/adaptor/api_25_2/add_data_transfer.py +190 -0
  15. ansys/systemcoupling/core/adaptor/api_25_2/add_data_transfer_by_display_names.py +191 -0
  16. ansys/systemcoupling/core/adaptor/api_25_2/add_expression_function.py +61 -0
  17. ansys/systemcoupling/core/adaptor/api_25_2/add_flow_boundary_data_transfers.py +32 -0
  18. ansys/systemcoupling/core/adaptor/api_25_2/add_fsi_data_transfers.py +43 -0
  19. ansys/systemcoupling/core/adaptor/api_25_2/add_interface.py +77 -0
  20. ansys/systemcoupling/core/adaptor/api_25_2/add_interface_by_display_names.py +78 -0
  21. ansys/systemcoupling/core/adaptor/api_25_2/add_named_expression.py +42 -0
  22. ansys/systemcoupling/core/adaptor/api_25_2/add_ordered_data_transfers.py +32 -0
  23. ansys/systemcoupling/core/adaptor/api_25_2/add_participant.py +162 -0
  24. ansys/systemcoupling/core/adaptor/api_25_2/add_reference_frame.py +40 -0
  25. ansys/systemcoupling/core/adaptor/api_25_2/add_thermal_data_transfers.py +43 -0
  26. ansys/systemcoupling/core/adaptor/api_25_2/add_transformation.py +102 -0
  27. ansys/systemcoupling/core/adaptor/api_25_2/analysis_control.py +303 -0
  28. ansys/systemcoupling/core/adaptor/api_25_2/apip.py +33 -0
  29. ansys/systemcoupling/core/adaptor/api_25_2/ascii_output.py +44 -0
  30. ansys/systemcoupling/core/adaptor/api_25_2/attribute.py +20 -0
  31. ansys/systemcoupling/core/adaptor/api_25_2/attribute_child.py +64 -0
  32. ansys/systemcoupling/core/adaptor/api_25_2/automatic_alignment_options.py +46 -0
  33. ansys/systemcoupling/core/adaptor/api_25_2/available_ports.py +40 -0
  34. ansys/systemcoupling/core/adaptor/api_25_2/avoid_data_reconstruction.py +56 -0
  35. ansys/systemcoupling/core/adaptor/api_25_2/case_root.py +62 -0
  36. ansys/systemcoupling/core/adaptor/api_25_2/clear_state.py +18 -0
  37. ansys/systemcoupling/core/adaptor/api_25_2/connect_ensight_dvs.py +41 -0
  38. ansys/systemcoupling/core/adaptor/api_25_2/coupling_interface.py +20 -0
  39. ansys/systemcoupling/core/adaptor/api_25_2/coupling_interface_child.py +42 -0
  40. ansys/systemcoupling/core/adaptor/api_25_2/coupling_participant.py +23 -0
  41. ansys/systemcoupling/core/adaptor/api_25_2/coupling_participant_child.py +272 -0
  42. ansys/systemcoupling/core/adaptor/api_25_2/create_restart_point.py +29 -0
  43. ansys/systemcoupling/core/adaptor/api_25_2/data_transfer.py +20 -0
  44. ansys/systemcoupling/core/adaptor/api_25_2/data_transfer_child.py +187 -0
  45. ansys/systemcoupling/core/adaptor/api_25_2/delete_snapshot.py +28 -0
  46. ansys/systemcoupling/core/adaptor/api_25_2/delete_transformation.py +42 -0
  47. ansys/systemcoupling/core/adaptor/api_25_2/dimensionality.py +96 -0
  48. ansys/systemcoupling/core/adaptor/api_25_2/execution_control.py +256 -0
  49. ansys/systemcoupling/core/adaptor/api_25_2/execution_control_1.py +24 -0
  50. ansys/systemcoupling/core/adaptor/api_25_2/expression.py +20 -0
  51. ansys/systemcoupling/core/adaptor/api_25_2/expression_child.py +36 -0
  52. ansys/systemcoupling/core/adaptor/api_25_2/expression_function.py +20 -0
  53. ansys/systemcoupling/core/adaptor/api_25_2/expression_function_child.py +46 -0
  54. ansys/systemcoupling/core/adaptor/api_25_2/external_data_file.py +24 -0
  55. ansys/systemcoupling/core/adaptor/api_25_2/fluent_input.py +77 -0
  56. ansys/systemcoupling/core/adaptor/api_25_2/fmu_parameter.py +20 -0
  57. ansys/systemcoupling/core/adaptor/api_25_2/fmu_parameter_child.py +164 -0
  58. ansys/systemcoupling/core/adaptor/api_25_2/generate_input_file.py +41 -0
  59. ansys/systemcoupling/core/adaptor/api_25_2/get_add_data_transfer_group_commands.py +29 -0
  60. ansys/systemcoupling/core/adaptor/api_25_2/get_execution_command.py +30 -0
  61. ansys/systemcoupling/core/adaptor/api_25_2/get_machines.py +13 -0
  62. ansys/systemcoupling/core/adaptor/api_25_2/get_mode_shape_variables.py +29 -0
  63. ansys/systemcoupling/core/adaptor/api_25_2/get_region_names_for_participant.py +31 -0
  64. ansys/systemcoupling/core/adaptor/api_25_2/get_setup_summary.py +25 -0
  65. ansys/systemcoupling/core/adaptor/api_25_2/get_status_messages.py +52 -0
  66. ansys/systemcoupling/core/adaptor/api_25_2/get_supported_participant_types.py +13 -0
  67. ansys/systemcoupling/core/adaptor/api_25_2/get_thermal_data_transfer_options.py +32 -0
  68. ansys/systemcoupling/core/adaptor/api_25_2/get_transformation.py +43 -0
  69. ansys/systemcoupling/core/adaptor/api_25_2/global_stabilization.py +155 -0
  70. ansys/systemcoupling/core/adaptor/api_25_2/has_input_file_changed.py +36 -0
  71. ansys/systemcoupling/core/adaptor/api_25_2/import_system_coupling_input_file.py +36 -0
  72. ansys/systemcoupling/core/adaptor/api_25_2/initialize.py +27 -0
  73. ansys/systemcoupling/core/adaptor/api_25_2/instancing.py +25 -0
  74. ansys/systemcoupling/core/adaptor/api_25_2/instancing_child.py +114 -0
  75. ansys/systemcoupling/core/adaptor/api_25_2/interrupt.py +39 -0
  76. ansys/systemcoupling/core/adaptor/api_25_2/library.py +37 -0
  77. ansys/systemcoupling/core/adaptor/api_25_2/live_visualization.py +20 -0
  78. ansys/systemcoupling/core/adaptor/api_25_2/live_visualization_child.py +100 -0
  79. ansys/systemcoupling/core/adaptor/api_25_2/map.py +19 -0
  80. ansys/systemcoupling/core/adaptor/api_25_2/mapping_control.py +249 -0
  81. ansys/systemcoupling/core/adaptor/api_25_2/open.py +102 -0
  82. ansys/systemcoupling/core/adaptor/api_25_2/open_results_in_ensight.py +56 -0
  83. ansys/systemcoupling/core/adaptor/api_25_2/open_snapshot.py +37 -0
  84. ansys/systemcoupling/core/adaptor/api_25_2/output_control.py +134 -0
  85. ansys/systemcoupling/core/adaptor/api_25_2/parameter.py +20 -0
  86. ansys/systemcoupling/core/adaptor/api_25_2/parameter_child.py +60 -0
  87. ansys/systemcoupling/core/adaptor/api_25_2/partition_participants.py +138 -0
  88. ansys/systemcoupling/core/adaptor/api_25_2/properties.py +36 -0
  89. ansys/systemcoupling/core/adaptor/api_25_2/record_interactions.py +46 -0
  90. ansys/systemcoupling/core/adaptor/api_25_2/reference_frame.py +20 -0
  91. ansys/systemcoupling/core/adaptor/api_25_2/reference_frame_child.py +71 -0
  92. ansys/systemcoupling/core/adaptor/api_25_2/region.py +20 -0
  93. ansys/systemcoupling/core/adaptor/api_25_2/region_child.py +71 -0
  94. ansys/systemcoupling/core/adaptor/api_25_2/reload_expression_function_modules.py +14 -0
  95. ansys/systemcoupling/core/adaptor/api_25_2/results.py +89 -0
  96. ansys/systemcoupling/core/adaptor/api_25_2/save.py +51 -0
  97. ansys/systemcoupling/core/adaptor/api_25_2/save_snapshot.py +54 -0
  98. ansys/systemcoupling/core/adaptor/api_25_2/setup_root.py +259 -0
  99. ansys/systemcoupling/core/adaptor/api_25_2/show_plot.py +75 -0
  100. ansys/systemcoupling/core/adaptor/api_25_2/shutdown.py +25 -0
  101. ansys/systemcoupling/core/adaptor/api_25_2/side.py +20 -0
  102. ansys/systemcoupling/core/adaptor/api_25_2/side_child.py +56 -0
  103. ansys/systemcoupling/core/adaptor/api_25_2/solution_control.py +117 -0
  104. ansys/systemcoupling/core/adaptor/api_25_2/solution_root.py +134 -0
  105. ansys/systemcoupling/core/adaptor/api_25_2/solve.py +30 -0
  106. ansys/systemcoupling/core/adaptor/api_25_2/stabilization.py +157 -0
  107. ansys/systemcoupling/core/adaptor/api_25_2/step.py +57 -0
  108. ansys/systemcoupling/core/adaptor/api_25_2/transformation.py +21 -0
  109. ansys/systemcoupling/core/adaptor/api_25_2/transformation_child.py +62 -0
  110. ansys/systemcoupling/core/adaptor/api_25_2/type.py +39 -0
  111. ansys/systemcoupling/core/adaptor/api_25_2/unmapped_value_options.py +158 -0
  112. ansys/systemcoupling/core/adaptor/api_25_2/update_control.py +43 -0
  113. ansys/systemcoupling/core/adaptor/api_25_2/update_interfaces.py +19 -0
  114. ansys/systemcoupling/core/adaptor/api_25_2/update_participant.py +61 -0
  115. ansys/systemcoupling/core/adaptor/api_25_2/variable.py +20 -0
  116. ansys/systemcoupling/core/adaptor/api_25_2/variable_child.py +231 -0
  117. ansys/systemcoupling/core/adaptor/api_25_2/write_csv_chart_files.py +21 -0
  118. ansys/systemcoupling/core/adaptor/api_25_2/write_ensight.py +46 -0
  119. ansys/systemcoupling/core/adaptor/api_25_2/write_target_data.py +32 -0
  120. ansys/systemcoupling/core/adaptor/impl/get_status_messages.py +1 -1
  121. ansys/systemcoupling/core/adaptor/impl/get_syc_version.py +1 -1
  122. ansys/systemcoupling/core/adaptor/impl/injected_commands.py +5 -4
  123. ansys/systemcoupling/core/adaptor/impl/root_source.py +1 -1
  124. ansys/systemcoupling/core/adaptor/impl/static_info.py +13 -6
  125. ansys/systemcoupling/core/adaptor/impl/syc_proxy.py +1 -1
  126. ansys/systemcoupling/core/adaptor/impl/syc_proxy_interface.py +1 -1
  127. ansys/systemcoupling/core/adaptor/impl/types.py +1 -1
  128. ansys/systemcoupling/core/charts/chart_datatypes.py +1 -1
  129. ansys/systemcoupling/core/charts/csv_chartdata.py +18 -4
  130. ansys/systemcoupling/core/charts/live_csv_datasource.py +1 -1
  131. ansys/systemcoupling/core/charts/message_dispatcher.py +1 -1
  132. ansys/systemcoupling/core/charts/plot_functions.py +1 -1
  133. ansys/systemcoupling/core/charts/plotdefinition_manager.py +1 -1
  134. ansys/systemcoupling/core/charts/plotter.py +1 -1
  135. ansys/systemcoupling/core/client/grpc_client.py +13 -4
  136. ansys/systemcoupling/core/client/services/command_query.py +4 -13
  137. ansys/systemcoupling/core/client/services/handle_rpc_error.py +64 -0
  138. ansys/systemcoupling/core/client/services/output_stream.py +1 -1
  139. ansys/systemcoupling/core/client/services/process.py +1 -1
  140. ansys/systemcoupling/core/client/services/solution.py +4 -13
  141. ansys/systemcoupling/core/client/syc_container.py +4 -1
  142. ansys/systemcoupling/core/client/syc_process.py +5 -1
  143. ansys/systemcoupling/core/client/variant.py +1 -1
  144. ansys/systemcoupling/core/examples/__init__.py +1 -1
  145. ansys/systemcoupling/core/examples/downloads.py +1 -1
  146. ansys/systemcoupling/core/native_api/__init__.py +1 -1
  147. ansys/systemcoupling/core/native_api/command_metadata.py +1 -1
  148. ansys/systemcoupling/core/native_api/datamodel_metadata.py +1 -1
  149. ansys/systemcoupling/core/native_api/meta_wrapper.py +1 -1
  150. ansys/systemcoupling/core/native_api/native_api.py +1 -1
  151. ansys/systemcoupling/core/native_api/object_path.py +1 -1
  152. ansys/systemcoupling/core/participant/manager.py +1 -1
  153. ansys/systemcoupling/core/participant/mapdl.py +1 -1
  154. ansys/systemcoupling/core/participant/protocol.py +1 -1
  155. ansys/systemcoupling/core/session.py +10 -3
  156. ansys/systemcoupling/core/syc_version.py +3 -3
  157. ansys/systemcoupling/core/util/file_transfer.py +22 -5
  158. ansys/systemcoupling/core/util/logging.py +1 -1
  159. ansys/systemcoupling/core/util/name_util.py +1 -1
  160. ansys/systemcoupling/core/util/pathstr.py +1 -1
  161. ansys/systemcoupling/core/util/state_keys.py +1 -1
  162. ansys/systemcoupling/core/util/yaml_helper.py +1 -1
  163. {ansys_systemcoupling_core-0.7.0.dist-info → ansys_systemcoupling_core-0.9.0.dist-info}/METADATA +35 -21
  164. {ansys_systemcoupling_core-0.7.0.dist-info → ansys_systemcoupling_core-0.9.0.dist-info}/RECORD +166 -53
  165. {ansys_systemcoupling_core-0.7.0.dist-info → ansys_systemcoupling_core-0.9.0.dist-info}/WHEEL +1 -1
  166. {ansys_systemcoupling_core-0.7.0.dist-info → ansys_systemcoupling_core-0.9.0.dist-info/licenses}/LICENSE +7 -7
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -20,11 +20,11 @@
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  # SOFTWARE.
22
22
 
23
- import ansys.api.systemcoupling.v0.error_pb2 as syc_error_pb2
24
23
  import ansys.api.systemcoupling.v0.solution_pb2 as solution_pb2
25
24
  import ansys.api.systemcoupling.v0.solution_pb2_grpc as solution_pb2_grpc
26
25
  import grpc
27
- from grpc_status.rpc_status import from_call
26
+
27
+ from ansys.systemcoupling.core.client.services.handle_rpc_error import handle_rpc_error
28
28
 
29
29
 
30
30
  class SolutionService:
@@ -36,16 +36,7 @@ class SolutionService:
36
36
  try:
37
37
  self.__stub.Solve(request)
38
38
  except grpc.RpcError as rpc_error:
39
- status = from_call(rpc_error)
40
- msg = f"Command execution failed: {status.message} (code={status.code})"
41
- for detail in status.details:
42
- if detail.Is(syc_error_pb2.ErrorDetails.DESCRIPTOR):
43
- info = syc_error_pb2.ErrorDetails()
44
- detail.Unpack(info)
45
- msg += (
46
- f"\n\nServer exception details:\n"
47
- f"{info.exception_classname}\n{info.stack_trace}"
48
- )
39
+ msg = handle_rpc_error(rpc_error)
49
40
  raise RuntimeError(msg) from None
50
41
 
51
42
  def interrupt(self, reason):
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -81,6 +81,9 @@ def start_container(
81
81
  idx = run_args.index("-p")
82
82
  run_args.insert(idx, container_user)
83
83
  run_args.insert(idx, "--user")
84
+ # Licensing can't log to default location if user is not the default 'root'
85
+ run_args.insert(idx, f"ANSYSLC_APPLOGDIR={mounted_to}")
86
+ run_args.insert(idx, "-e")
84
87
 
85
88
  license_server = os.getenv("ANSYSLMD_LICENSE_FILE")
86
89
  if license_server:
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -50,6 +50,10 @@ class SycProcess: # pragma: no cover
50
50
  host, port, working_dir, version, **kwargs
51
51
  )
52
52
 
53
+ @property
54
+ def path_to_system_coupling(self) -> str:
55
+ return self.__process.args[0]
56
+
53
57
  def end(self):
54
58
  if self.__process and self.__process.poll() is None:
55
59
  pid = self.__process.pid
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -233,7 +233,8 @@ class Session:
233
233
 
234
234
  Reduces to a no-op if the System Coupling instance is not managed by PIM.
235
235
 
236
- The remote file may optionally be given a different name from the local one.
236
+ The remote file may optionally be given a different name from the local one
237
+ and, if not, any directory prefix is stripped in the PIM case.
237
238
 
238
239
  Unless ``overwrite`` is ``True``, a ``FileExistsError`` will be raised if
239
240
  the remote file already exists.
@@ -246,8 +247,14 @@ class Session:
246
247
  remote file name - default is None
247
248
  overwrite: bool, optional
248
249
  whether to overwrite the remote file if it already exists - default is False
250
+
251
+ Returns
252
+ -------
253
+ str
254
+ The remote file name, excluding any directory prefix that might have been
255
+ present in ``file_name``.
249
256
  """
250
- self.__rpc.upload_file(file_name, remote_file_name, overwrite)
257
+ return self.__rpc.upload_file(file_name, remote_file_name, overwrite)
251
258
 
252
259
  def download_file(
253
260
  self, file_name: str, local_file_dir: str = ".", overwrite: bool = False
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -24,8 +24,8 @@ from typing import Tuple
24
24
 
25
25
  # Define constants relating to the default/current version of System Coupling
26
26
 
27
- SYC_MAJOR_VERSION = 24
28
- SYC_MINOR_VERSION = 2
27
+ SYC_MAJOR_VERSION = 25
28
+ SYC_MINOR_VERSION = 1
29
29
 
30
30
  SYC_VERSION_CONCAT = f"{SYC_MAJOR_VERSION}{SYC_MINOR_VERSION}"
31
31
  SYC_VERSION_DOT = f"{SYC_MAJOR_VERSION}.{SYC_MINOR_VERSION}"
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -29,15 +29,22 @@ from typing import Any, Optional, Protocol
29
29
  class FileTransferService(Protocol): # pragma: no cover
30
30
  def upload_file(
31
31
  self, file_name: str, remote_file_name: Optional[str], overwrite: bool
32
- ): ...
32
+ ) -> str: ...
33
33
 
34
34
  def download_file(self, file_name: str, local_file_dir: str, overwrite: bool): ...
35
35
 
36
36
 
37
37
  class NullFileTransferService(FileTransferService): # pragma: no cover
38
- """A do-nothing implementation of file upload/download service."""
38
+ """An essentially do-nothing implementation of file upload/download
39
+ service (with a minimal ``upload_file`` implementation)."""
39
40
 
40
- ...
41
+ def upload_file(
42
+ self, file_name: str, remote_file_name: Optional[str], overwrite: bool
43
+ ) -> str:
44
+ # TODO - what should the behaviour be if remote_file_name is not None?
45
+ # It is not obvious that it would even make sense to call the Null
46
+ # implementation in that case.
47
+ return file_name
41
48
 
42
49
 
43
50
  class PimFileTransferService: # pragma: no cover
@@ -70,11 +77,14 @@ class PimFileTransferService: # pragma: no cover
70
77
 
71
78
  def upload_file(
72
79
  self, file_name: str, remote_file_name: Optional[str], overwrite: bool
73
- ):
80
+ ) -> str:
74
81
  """Upload a file to the PIM-managed instance.
75
82
 
76
83
  The remote file may optionally be given a different name from the local one.
77
84
 
85
+ If the local file name includes a directory path, this is stripped and the
86
+ remote file is always placed in the "working directory" of the container.
87
+
78
88
  Unless ``overwrite`` is ``True``, a ``FileExistsError`` will be raised if
79
89
  the remote file already exists.
80
90
 
@@ -86,6 +96,12 @@ class PimFileTransferService: # pragma: no cover
86
96
  remote file name (or use local file name if None)
87
97
  overwrite: bool
88
98
  whether to overwrite the remote file if it already exists
99
+
100
+ Returns
101
+ -------
102
+ str
103
+ The name assigned to the remote file name. If ``file_name`` included
104
+ a directory prefix, this is stripped from the returned name.
89
105
  """
90
106
  if os.path.isfile(file_name):
91
107
  remote_file_name = remote_file_name or os.path.basename(file_name)
@@ -105,6 +121,7 @@ class PimFileTransferService: # pragma: no cover
105
121
  self.file_service.upload_file(file_name, remote_file_name)
106
122
  if delete_copy:
107
123
  os.remove(file_name)
124
+ return remote_file_name
108
125
  else:
109
126
  raise FileNotFoundError(f"Local file {file_name} does not exist.")
110
127
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,10 +1,10 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: ansys-systemcoupling-core
3
- Version: 0.7.0
3
+ Version: 0.9.0
4
4
  Summary: A Python wrapper for Ansys System Coupling.
5
5
  Author-email: "ANSYS, Inc." <pyansys.support@ansys.com>
6
6
  Maintainer-email: PyAnsys developers <pyansys.maintainers@ansys.com>
7
- Requires-Python: >=3.10,<3.13
7
+ Requires-Python: >=3.10,<3.14
8
8
  Description-Content-Type: text/x-rst
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Intended Audience :: Science/Research
@@ -16,10 +16,12 @@ Classifier: Operating System :: MacOS
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ License-File: LICENSE
19
21
  Requires-Dist: ansys-api-systemcoupling==0.2.0
20
22
  Requires-Dist: ansys-platform-instancemanagement~=1.0
21
23
  Requires-Dist: grpcio>=1.30.0
22
- Requires-Dist: grpcio-status>=1.30.0,<1.66.2
24
+ Requires-Dist: grpcio-status>=1.30.0
23
25
  Requires-Dist: googleapis-common-protos>=1.50.0
24
26
  Requires-Dist: psutil>=5.7.0
25
27
  Requires-Dist: pyyaml
@@ -27,27 +29,26 @@ Requires-Dist: appdirs>=1.4.0
27
29
  Requires-Dist: importlib-metadata>=4.0
28
30
  Requires-Dist: matplotlib>=3.8.2
29
31
  Requires-Dist: build ; extra == "build"
30
- Requires-Dist: black==24.8.0 ; extra == "classesgen"
31
- Requires-Dist: isort==5.13.2 ; extra == "classesgen"
32
- Requires-Dist: ansys-sphinx-theme==1.0.7 ; extra == "doc"
32
+ Requires-Dist: black==25.1.0 ; extra == "classesgen"
33
+ Requires-Dist: isort==6.0.1 ; extra == "classesgen"
34
+ Requires-Dist: ansys-sphinx-theme==1.3.2 ; extra == "doc"
33
35
  Requires-Dist: jupyter_sphinx==0.5.3 ; extra == "doc"
34
36
  Requires-Dist: matplotlib ; extra == "doc"
35
37
  Requires-Dist: numpydoc==1.8.0 ; extra == "doc"
36
- Requires-Dist: pypandoc==1.13 ; extra == "doc"
38
+ Requires-Dist: pypandoc==1.15 ; extra == "doc"
37
39
  Requires-Dist: pytest-sphinx==0.6.3 ; extra == "doc"
38
- Requires-Dist: Sphinx==8.0.2 ; extra == "doc"
39
- Requires-Dist: sphinx-autobuild==2024.4.16 ; extra == "doc"
40
- Requires-Dist: sphinx-autodoc-typehints==2.3.0 ; extra == "doc"
40
+ Requires-Dist: sphinx>=8.1.3 ; extra == "doc"
41
+ Requires-Dist: sphinx-autobuild==2024.10.3 ; extra == "doc"
42
+ Requires-Dist: sphinx-autodoc-typehints==3.1.0 ; extra == "doc"
41
43
  Requires-Dist: sphinx-copybutton==0.5.2 ; extra == "doc"
42
- Requires-Dist: sphinx-gallery==0.17.1 ; extra == "doc"
43
- Requires-Dist: sphinx-notfound-page==1.0.4 ; extra == "doc"
44
+ Requires-Dist: sphinx-gallery==0.19.0 ; extra == "doc"
45
+ Requires-Dist: sphinx-notfound-page==1.1.0 ; extra == "doc"
44
46
  Requires-Dist: sphinxcontrib-websupport==2.0.0 ; extra == "doc"
45
47
  Requires-Dist: sphinxemoji==0.3.1 ; extra == "doc"
46
- Requires-Dist: ansys-fluent-core==0.24.2 ; extra == "doc"
47
- Requires-Dist: ansys-dpf-core==0.13.0 ; extra == "doc"
48
- Requires-Dist: ansys-mapdl-core==0.68.4 ; extra == "doc"
49
- Requires-Dist: codespell==2.3.0 ; extra == "style"
50
- Requires-Dist: flake8==7.1.1 ; extra == "style"
48
+ Requires-Dist: ansys-fluent-core==0.29.0 ; extra == "doc"
49
+ Requires-Dist: ansys-mapdl-core==0.69.3 ; extra == "doc"
50
+ Requires-Dist: codespell==2.4.1 ; extra == "style"
51
+ Requires-Dist: flake8==7.1.2 ; extra == "style"
51
52
  Requires-Dist: pytest ; extra == "tests"
52
53
  Requires-Dist: pytest-cov ; extra == "tests"
53
54
  Requires-Dist: psutil>=5.7.0 ; extra == "tests"
@@ -136,16 +137,29 @@ in this order:
136
137
 
137
138
  * ``SYSC_ROOT``
138
139
  * ``AWP_ROOT``
139
- * ``AWP_ROOT242``
140
+ * ``AWP_ROOT251``
140
141
 
141
142
  If a variable is set but does not refer to a valid installation, PySystemCoupling
142
143
  fails at that point, rather than attempting to use the next variable.
143
144
 
144
- In a standard user installation, the expectation is that only ``AWP_ROOT242`` is set.
145
+ In a standard user installation, the expectation is that only ``AWP_ROOT251`` is set.
145
146
 
146
147
  (It is also possible to provide a different version number as an argument to the ``launch()``
147
148
  function. This will affect which ``AWP_ROOT<version>`` environment variable is examined.)
148
149
 
150
+ **WARNING**
151
+
152
+ There is an issue with the 25 R1 release of Ansys System Coupling that prevents it from
153
+ working in the gRPC server mode on which PySystemCoupling depends. A small patch
154
+ is available that may be applied to some of the Python files in the System Coupling
155
+ installation. This is provided in the ``patches/`` directory of this repository and will
156
+ allow System Coupling to work with the current release of PySystemCoupling.
157
+
158
+ Otherwise, PySystemCoupling should be used with an earlier release of System Coupling by
159
+ setting the environment variable ``AWP_ROOT`` or specifying the version number as an
160
+ argument to the ``launch()`` function.
161
+
162
+
149
163
  The System Coupling API is exposed to PySystemCoupling in two forms:
150
164
 
151
165
  * A documented interface based on concrete Python classes, following Pythonic conventions
@@ -157,7 +171,7 @@ familiar with System Coupling, adjusting to this form, which is the recommended
157
171
  However, if you are transitioning existing scripts, the native System Coupling API is made available
158
172
  as a convenience.
159
173
 
160
- .. note::
174
+ **Note**
161
175
 
162
176
  While most commands should work as expected via the native System Coupling API,
163
177
  no guarantees can be given because of the nature of how it is exposed.