cubitpy 0.2.2__tar.gz → 0.2.4__tar.gz

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.
Files changed (89) hide show
  1. {cubitpy-0.2.2 → cubitpy-0.2.4}/.github/workflows/cubitpy_test_suite_with_secrets.yml +6 -3
  2. {cubitpy-0.2.2 → cubitpy-0.2.4}/.pre-commit-config.yaml +2 -7
  3. {cubitpy-0.2.2/src/cubitpy.egg-info → cubitpy-0.2.4}/PKG-INFO +3 -2
  4. {cubitpy-0.2.2 → cubitpy-0.2.4}/README.md +1 -0
  5. {cubitpy-0.2.2 → cubitpy-0.2.4}/pyproject.toml +1 -1
  6. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/conf.py +30 -10
  7. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubit_wrapper/cubit_wrapper_host.py +10 -3
  8. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/version.py +3 -3
  9. {cubitpy-0.2.2 → cubitpy-0.2.4/src/cubitpy.egg-info}/PKG-INFO +3 -2
  10. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy.egg-info/SOURCES.txt +2 -0
  11. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy.egg-info/requires.txt +1 -1
  12. cubitpy-0.2.4/src/cubitpy.egg-info/scm_file_list.json +83 -0
  13. cubitpy-0.2.4/src/cubitpy.egg-info/scm_version.json +8 -0
  14. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/test_cubitpy.py +31 -0
  15. {cubitpy-0.2.2 → cubitpy-0.2.4}/.coveragerc +0 -0
  16. {cubitpy-0.2.2 → cubitpy-0.2.4}/.github/workflows/code_checks.yml +0 -0
  17. {cubitpy-0.2.2 → cubitpy-0.2.4}/.gitignore +0 -0
  18. {cubitpy-0.2.2 → cubitpy-0.2.4}/CONTRIBUTORS +0 -0
  19. {cubitpy-0.2.2 → cubitpy-0.2.4}/LICENSE +0 -0
  20. {cubitpy-0.2.2 → cubitpy-0.2.4}/setup.cfg +0 -0
  21. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/__init__.py +0 -0
  22. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubit_group.py +0 -0
  23. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubit_to_fourc_input.py +0 -0
  24. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubit_utility.py +0 -0
  25. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubit_wrapper/__init__.py +0 -0
  26. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubit_wrapper/cubit_wrapper_client.py +0 -0
  27. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubit_wrapper/cubit_wrapper_file_transfer.py +0 -0
  28. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubit_wrapper/cubit_wrapper_utility.py +0 -0
  29. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubitpy.py +0 -0
  30. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/cubitpy_types.py +0 -0
  31. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/exodus_utility.py +0 -0
  32. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/geometry_creation_functions.py +0 -0
  33. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy/mesh_creation_functions.py +0 -0
  34. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy.egg-info/dependency_links.txt +0 -0
  35. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/cubitpy.egg-info/top_level.txt +0 -0
  36. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/tutorial/__init__.py +0 -0
  37. {cubitpy-0.2.2 → cubitpy-0.2.4}/src/tutorial/tutorial.py +0 -0
  38. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/coverage.config +0 -0
  39. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/external-geometry/fluent_aneurysm.msh +0 -0
  40. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_block_function.4C.yaml +0 -0
  41. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_contact_condition_beam_to_surface.4C.yaml +0 -0
  42. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_contact_condition_curve_to_curve.4C.yaml +0 -0
  43. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_contact_condition_surface_to_surface.4C.yaml +0 -0
  44. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_create_block.4C.yaml +0 -0
  45. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_create_block_unaltered_element_dict.4C.yaml +0 -0
  46. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_create_block_unaltered_element_dict_exo.4C.yaml +0 -0
  47. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_create_block_unaltered_element_dict_exo.exo +0 -0
  48. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_create_brick_by_corner_points.4C.yaml +0 -0
  49. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_create_wedge6.4C.yaml +0 -0
  50. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_cubit_tutorial_coreform.4C.yaml +0 -0
  51. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_cubit_tutorial_cubit15.4C.yaml +0 -0
  52. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_dump_numpy_array.4C.yaml +0 -0
  53. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_element_types_hex.4C.yaml +0 -0
  54. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_element_types_quad_yplane.4C.yaml +0 -0
  55. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_element_types_quad_zplane.4C.yaml +0 -0
  56. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_element_types_tet_coreform.4C.yaml +0 -0
  57. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_element_types_tet_cubit15.4C.yaml +0 -0
  58. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_element_types_tet_single_element_with_exo.4C.yaml +0 -0
  59. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_element_types_tet_single_element_with_exo.exo +0 -0
  60. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_element_types_tet_single_element_without_exo.4C.yaml +0 -0
  61. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_extrude_mesh_function.4C.yaml +0 -0
  62. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_extrude_mesh_function_average_normals_block.4C.yaml +0 -0
  63. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_extrude_mesh_function_average_normals_for_cylinder_and_sphere.4C.yaml +0 -0
  64. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_fluid_functionality_coreform.4C.yaml +0 -0
  65. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_fluid_functionality_cubit15.4C.yaml +0 -0
  66. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_fsi_functionality.4C.yaml +0 -0
  67. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_group_of_surfaces.4C.yaml +0 -0
  68. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_groups.4C.yaml +0 -0
  69. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_groups_multiple_sets.4C.yaml +0 -0
  70. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_mesh_import.4C.yaml +0 -0
  71. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_node_set_geometry_type.4C.yaml +0 -0
  72. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_node_sets_without_boundary_condition_with_exo.4C.yaml +0 -0
  73. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_node_sets_without_boundary_condition_with_exo.exo +0 -0
  74. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_node_sets_without_boundary_condition_without_exo.4C.yaml +0 -0
  75. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_point_coupling.4C.yaml +0 -0
  76. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_reset_block_1.4C.yaml +0 -0
  77. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_reset_block_2.4C.yaml +0 -0
  78. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_scatra_functionality.4C.yaml +0 -0
  79. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_serialize_nested_lists.4C.yaml +0 -0
  80. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_thermo_functionality.4C.yaml +0 -0
  81. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_user_defined_node_set_and_block_ids_with_exo.4C.yaml +0 -0
  82. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_user_defined_node_set_and_block_ids_with_exo.exo +0 -0
  83. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_user_defined_node_set_and_block_ids_without_exo.4C.yaml +0 -0
  84. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_yaml_with_exo_export_fsi.4C.yaml +0 -0
  85. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/input-files-ref/test_yaml_with_exo_export_fsi.exo +0 -0
  86. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/run_delete_test.py +0 -0
  87. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/test_configurations.sh +0 -0
  88. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/test_cubitpy_performance.py +0 -0
  89. {cubitpy-0.2.2 → cubitpy-0.2.4}/tests/test_tutorial.py +0 -0
@@ -14,7 +14,7 @@ on:
14
14
  workflow_dispatch:
15
15
 
16
16
  env:
17
- CUBIT_DOWNLOAD_URL: https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/Releases/Linux/Coreform-Cubit-2025.8%2B61943-Lin64.tar.gz
17
+ CUBIT_DOWNLOAD_URL: https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/Releases/Linux/Coreform-Cubit-2026.6%2B67683-Lin64.tar.gz
18
18
 
19
19
  jobs:
20
20
  testing_coreform:
@@ -28,14 +28,16 @@ jobs:
28
28
  PYTHON_VENV: python-testing-environment
29
29
  steps:
30
30
  - name: Checkout PR code
31
- uses: actions/checkout@v4
31
+ uses: actions/checkout@v7
32
32
  with:
33
33
  submodules: true
34
34
  # For PR runs, checkout PR code; otherwise fallback to default branch or ref
35
35
  ref: ${{ github.event.pull_request.head.ref || github.ref }}
36
36
  repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
37
+ allow-unsafe-pr-checkout: true # required to checkout PR code from forks, PRs from external people need to be approved anyways
38
+ persist-credentials: false
37
39
  - name: Set up Python
38
- uses: actions/setup-python@v5
40
+ uses: actions/setup-python@v6
39
41
  with:
40
42
  python-version: 3.13
41
43
  - name: Install CubitPy
@@ -43,6 +45,7 @@ jobs:
43
45
  whoami
44
46
  pwd
45
47
  # Install dependencies
48
+ sudo apt update
46
49
  sudo apt install libhdf5-dev libnetcdf-dev build-essential
47
50
 
48
51
  # Install cubitpy
@@ -73,17 +73,12 @@ repos:
73
73
  - --comment-style
74
74
  - '#'
75
75
  - --no-extra-eol
76
- - repo: https://github.com/asmeurer/removestar
77
- rev: "1.5.2"
78
- hooks:
79
- - id: removestar
80
- name: Run removestar (remove wildcard imports)
81
76
  - repo: https://github.com/astral-sh/ruff-pre-commit
82
- rev: v0.8.2
77
+ rev: v0.15.20
83
78
  hooks:
84
79
  - id: ruff # linter
85
80
  name: Run ruff (linter for Python)
86
- args: ["--fix", "--select", "I,TID252,F401"] # "I => sort imports, TID252 => ban relative imports, F401 => unused imports"
81
+ args: ["--fix", "--select", "I,TID252,F401,F403"] # I => sort imports, TID252 => ban relative imports, F401 => unused imports, F403 => no wildcard imports
87
82
  - id: ruff-format # formatter
88
83
  name: Run ruff (formatter for Python)
89
84
  - repo: https://github.com/crate-ci/typos
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cubitpy
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: CubitPy: Utility functions and 4C related functionality for the Cubit and Coreform python interface
5
5
  Author-email: Ivo Steinbrecher <ivo.steinbrecher@unibw.de>
6
6
  License-Expression: MIT
@@ -14,7 +14,7 @@ Requires-Dist: numpy
14
14
  Requires-Dist: fourcipp
15
15
  Provides-Extra: dev
16
16
  Requires-Dist: pre-commit; extra == "dev"
17
- Requires-Dist: pytest; extra == "dev"
17
+ Requires-Dist: pytest<9.2; extra == "dev"
18
18
  Requires-Dist: pytest-benchmark; extra == "dev"
19
19
  Requires-Dist: pytest-cov; extra == "dev"
20
20
  Requires-Dist: deepdiff; extra == "dev"
@@ -95,6 +95,7 @@ remote_config:
95
95
  host: "hostname"
96
96
  platform: "windows"
97
97
  cubit_path: "C:\\Coreform_Cubit_2025.8"
98
+ on_cubit_error: "raise" # optional: "raise" (default), "warn" or "ignore"
98
99
  ```
99
100
  To run CubitPy one can either provide the configuration file then initializing CubitPy, or set an environment variable with the path to the configuration file.
100
101
  ```bash
@@ -73,6 +73,7 @@ remote_config:
73
73
  host: "hostname"
74
74
  platform: "windows"
75
75
  cubit_path: "C:\\Coreform_Cubit_2025.8"
76
+ on_cubit_error: "raise" # optional: "raise" (default), "warn" or "ignore"
76
77
  ```
77
78
  To run CubitPy one can either provide the configuration file then initializing CubitPy, or set an environment variable with the path to the configuration file.
78
79
  ```bash
@@ -31,7 +31,7 @@ Issues = "https://github.com/imcs-compsim/cubitpy/issues/"
31
31
  [project.optional-dependencies]
32
32
  dev = [
33
33
  "pre-commit",
34
- "pytest",
34
+ "pytest<9.2", # TODO: This fixes an incompatibility issue with pytest-benchmark, but should be removed once the issue is fixed upstream
35
35
  "pytest-benchmark",
36
36
  "pytest-cov",
37
37
  "deepdiff",
@@ -23,7 +23,6 @@
23
23
  cubitpy."""
24
24
 
25
25
  import getpass
26
- import glob
27
26
  import os
28
27
  import shutil
29
28
  import sys
@@ -108,6 +107,17 @@ class CubitOptions(object):
108
107
  # Tolerance for geometry.
109
108
  self.eps_pos = 1e-10
110
109
 
110
+ @property
111
+ def on_cubit_error(self) -> str:
112
+ """How to react when a cubit command reports an error.
113
+
114
+ One of "raise" (default, raise a RuntimeError), "warn" (emit a
115
+ CubitPyWarning and continue) or "ignore" (silently continue),
116
+ set via the optional top-level 'on_cubit_error' key in the
117
+ config file.
118
+ """
119
+ return self._get_config().get("on_cubit_error", "raise")
120
+
111
121
  def _get_config(self) -> Dict[str, Any]:
112
122
  """Get the config dict or raise an error if not loaded."""
113
123
  if self._config is None:
@@ -134,6 +144,8 @@ class CubitOptions(object):
134
144
  "\n"
135
145
  "local_config:\n"
136
146
  ' cubit_path: "<local_cubit_install_path>"\n'
147
+ "\n"
148
+ 'on_cubit_error: "raise" # optional: "raise" (default), "warn" or "ignore"\n'
137
149
  "----------------------------------------\n"
138
150
  "- If mode = 'remote': remote_config MUST exist and contain user, host, platform, cubit_path.\n"
139
151
  "- If mode = 'local' : local_config MUST exist and contain cubit_path.\n"
@@ -153,6 +165,12 @@ class CubitOptions(object):
153
165
  if mode not in ("remote", "local"):
154
166
  fail(f"Invalid cubitpy_mode '{mode}'. Expected 'remote' or 'local'.")
155
167
 
168
+ if config.get("on_cubit_error", "raise") not in ("raise", "warn", "ignore"):
169
+ fail(
170
+ f"Invalid on_cubit_error '{config['on_cubit_error']}'. "
171
+ "Expected 'raise', 'warn' or 'ignore'."
172
+ )
173
+
156
174
  if mode == "remote":
157
175
  if "remote_config" not in config:
158
176
  fail("cubitpy_mode='remote' requires a 'remote_config' section.")
@@ -285,18 +303,20 @@ class CubitOptions(object):
285
303
 
286
304
  if cubit_platform == "linux" or cubit_platform == "macos":
287
305
  if self.is_coreform():
288
- pattern = "**/python3"
289
- full_pattern = os.path.join(cubit_path, pattern)
290
- python3_matches = glob.glob(full_pattern, recursive=True)
291
- python3_files = [
292
- path for path in python3_matches if os.path.isfile(path)
306
+ python_prefix = "python3."
307
+ python_files = [
308
+ path
309
+ for path in cubit_path.rglob(f"{python_prefix}*")
310
+ if path.is_file()
311
+ and path.name.removeprefix(python_prefix).isdigit()
293
312
  ]
294
- if not len(python3_files) == 1:
313
+ if len(python_files) != 1:
295
314
  raise ValueError(
296
- "Could not find the path to the cubit python interpreter"
315
+ "Could not uniquely determine the path to the Cubit Python "
316
+ f"interpreter. Expected exactly one 'python3.x' executable "
317
+ f"under '{cubit_path}', but found {len(python_files)}: {python_files}"
297
318
  )
298
- cubit_python_interpreter = python3_files[0]
299
- return cubit_python_interpreter
319
+ return str(python_files[0])
300
320
  else:
301
321
  python2_path_env = get_path(
302
322
  "CUBITPY_PYTHON2", os.path.isfile, throw_error=False
@@ -129,9 +129,16 @@ class CubitConnect(object):
129
129
  stacklevel=3,
130
130
  )
131
131
  if len(return_value["errors"]) > 0:
132
- raise RuntimeError(
133
- get_log_string(return_value["errors"], "error(s)")
134
- )
132
+ error_string = get_log_string(return_value["errors"], "error(s)")
133
+ if cupy.on_cubit_error == "raise":
134
+ raise RuntimeError(error_string)
135
+ elif cupy.on_cubit_error == "warn":
136
+ warnings.warn(
137
+ error_string,
138
+ category=CubitPyWarning,
139
+ stacklevel=3,
140
+ )
141
+ # "ignore": silently continue
135
142
  return return_value["return_value"]
136
143
  else:
137
144
  return return_value
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.2.2'
22
- __version_tuple__ = version_tuple = (0, 2, 2)
21
+ __version__ = version = '0.2.4'
22
+ __version_tuple__ = version_tuple = (0, 2, 4)
23
23
 
24
- __commit_id__ = commit_id = 'g4d0bd8df5'
24
+ __commit_id__ = commit_id = 'g6fa66acbd'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cubitpy
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: CubitPy: Utility functions and 4C related functionality for the Cubit and Coreform python interface
5
5
  Author-email: Ivo Steinbrecher <ivo.steinbrecher@unibw.de>
6
6
  License-Expression: MIT
@@ -14,7 +14,7 @@ Requires-Dist: numpy
14
14
  Requires-Dist: fourcipp
15
15
  Provides-Extra: dev
16
16
  Requires-Dist: pre-commit; extra == "dev"
17
- Requires-Dist: pytest; extra == "dev"
17
+ Requires-Dist: pytest<9.2; extra == "dev"
18
18
  Requires-Dist: pytest-benchmark; extra == "dev"
19
19
  Requires-Dist: pytest-cov; extra == "dev"
20
20
  Requires-Dist: deepdiff; extra == "dev"
@@ -95,6 +95,7 @@ remote_config:
95
95
  host: "hostname"
96
96
  platform: "windows"
97
97
  cubit_path: "C:\\Coreform_Cubit_2025.8"
98
+ on_cubit_error: "raise" # optional: "raise" (default), "warn" or "ignore"
98
99
  ```
99
100
  To run CubitPy one can either provide the configuration file then initializing CubitPy, or set an environment variable with the path to the configuration file.
100
101
  ```bash
@@ -22,6 +22,8 @@ src/cubitpy.egg-info/PKG-INFO
22
22
  src/cubitpy.egg-info/SOURCES.txt
23
23
  src/cubitpy.egg-info/dependency_links.txt
24
24
  src/cubitpy.egg-info/requires.txt
25
+ src/cubitpy.egg-info/scm_file_list.json
26
+ src/cubitpy.egg-info/scm_version.json
25
27
  src/cubitpy.egg-info/top_level.txt
26
28
  src/cubitpy/cubit_wrapper/__init__.py
27
29
  src/cubitpy/cubit_wrapper/cubit_wrapper_client.py
@@ -5,7 +5,7 @@ fourcipp
5
5
 
6
6
  [dev]
7
7
  pre-commit
8
- pytest
8
+ pytest<9.2
9
9
  pytest-benchmark
10
10
  pytest-cov
11
11
  deepdiff
@@ -0,0 +1,83 @@
1
+ {
2
+ "files": [
3
+ ".coveragerc",
4
+ ".github/workflows/code_checks.yml",
5
+ ".github/workflows/cubitpy_test_suite_with_secrets.yml",
6
+ ".gitignore",
7
+ ".pre-commit-config.yaml",
8
+ "CONTRIBUTORS",
9
+ "LICENSE",
10
+ "README.md",
11
+ "pyproject.toml",
12
+ "src/cubitpy/__init__.py",
13
+ "src/cubitpy/conf.py",
14
+ "src/cubitpy/cubit_group.py",
15
+ "src/cubitpy/cubit_to_fourc_input.py",
16
+ "src/cubitpy/cubit_utility.py",
17
+ "src/cubitpy/cubit_wrapper/__init__.py",
18
+ "src/cubitpy/cubit_wrapper/cubit_wrapper_client.py",
19
+ "src/cubitpy/cubit_wrapper/cubit_wrapper_file_transfer.py",
20
+ "src/cubitpy/cubit_wrapper/cubit_wrapper_host.py",
21
+ "src/cubitpy/cubit_wrapper/cubit_wrapper_utility.py",
22
+ "src/cubitpy/cubitpy.py",
23
+ "src/cubitpy/cubitpy_types.py",
24
+ "src/cubitpy/exodus_utility.py",
25
+ "src/cubitpy/geometry_creation_functions.py",
26
+ "src/cubitpy/mesh_creation_functions.py",
27
+ "src/tutorial/__init__.py",
28
+ "src/tutorial/tutorial.py",
29
+ "tests/coverage.config",
30
+ "tests/external-geometry/fluent_aneurysm.msh",
31
+ "tests/input-files-ref/test_block_function.4C.yaml",
32
+ "tests/input-files-ref/test_contact_condition_beam_to_surface.4C.yaml",
33
+ "tests/input-files-ref/test_contact_condition_curve_to_curve.4C.yaml",
34
+ "tests/input-files-ref/test_contact_condition_surface_to_surface.4C.yaml",
35
+ "tests/input-files-ref/test_create_block.4C.yaml",
36
+ "tests/input-files-ref/test_create_block_unaltered_element_dict.4C.yaml",
37
+ "tests/input-files-ref/test_create_block_unaltered_element_dict_exo.4C.yaml",
38
+ "tests/input-files-ref/test_create_block_unaltered_element_dict_exo.exo",
39
+ "tests/input-files-ref/test_create_brick_by_corner_points.4C.yaml",
40
+ "tests/input-files-ref/test_create_wedge6.4C.yaml",
41
+ "tests/input-files-ref/test_cubit_tutorial_coreform.4C.yaml",
42
+ "tests/input-files-ref/test_cubit_tutorial_cubit15.4C.yaml",
43
+ "tests/input-files-ref/test_dump_numpy_array.4C.yaml",
44
+ "tests/input-files-ref/test_element_types_hex.4C.yaml",
45
+ "tests/input-files-ref/test_element_types_quad_yplane.4C.yaml",
46
+ "tests/input-files-ref/test_element_types_quad_zplane.4C.yaml",
47
+ "tests/input-files-ref/test_element_types_tet_coreform.4C.yaml",
48
+ "tests/input-files-ref/test_element_types_tet_cubit15.4C.yaml",
49
+ "tests/input-files-ref/test_element_types_tet_single_element_with_exo.4C.yaml",
50
+ "tests/input-files-ref/test_element_types_tet_single_element_with_exo.exo",
51
+ "tests/input-files-ref/test_element_types_tet_single_element_without_exo.4C.yaml",
52
+ "tests/input-files-ref/test_extrude_mesh_function.4C.yaml",
53
+ "tests/input-files-ref/test_extrude_mesh_function_average_normals_block.4C.yaml",
54
+ "tests/input-files-ref/test_extrude_mesh_function_average_normals_for_cylinder_and_sphere.4C.yaml",
55
+ "tests/input-files-ref/test_fluid_functionality_coreform.4C.yaml",
56
+ "tests/input-files-ref/test_fluid_functionality_cubit15.4C.yaml",
57
+ "tests/input-files-ref/test_fsi_functionality.4C.yaml",
58
+ "tests/input-files-ref/test_group_of_surfaces.4C.yaml",
59
+ "tests/input-files-ref/test_groups.4C.yaml",
60
+ "tests/input-files-ref/test_groups_multiple_sets.4C.yaml",
61
+ "tests/input-files-ref/test_mesh_import.4C.yaml",
62
+ "tests/input-files-ref/test_node_set_geometry_type.4C.yaml",
63
+ "tests/input-files-ref/test_node_sets_without_boundary_condition_with_exo.4C.yaml",
64
+ "tests/input-files-ref/test_node_sets_without_boundary_condition_with_exo.exo",
65
+ "tests/input-files-ref/test_node_sets_without_boundary_condition_without_exo.4C.yaml",
66
+ "tests/input-files-ref/test_point_coupling.4C.yaml",
67
+ "tests/input-files-ref/test_reset_block_1.4C.yaml",
68
+ "tests/input-files-ref/test_reset_block_2.4C.yaml",
69
+ "tests/input-files-ref/test_scatra_functionality.4C.yaml",
70
+ "tests/input-files-ref/test_serialize_nested_lists.4C.yaml",
71
+ "tests/input-files-ref/test_thermo_functionality.4C.yaml",
72
+ "tests/input-files-ref/test_user_defined_node_set_and_block_ids_with_exo.4C.yaml",
73
+ "tests/input-files-ref/test_user_defined_node_set_and_block_ids_with_exo.exo",
74
+ "tests/input-files-ref/test_user_defined_node_set_and_block_ids_without_exo.4C.yaml",
75
+ "tests/input-files-ref/test_yaml_with_exo_export_fsi.4C.yaml",
76
+ "tests/input-files-ref/test_yaml_with_exo_export_fsi.exo",
77
+ "tests/run_delete_test.py",
78
+ "tests/test_configurations.sh",
79
+ "tests/test_cubitpy.py",
80
+ "tests/test_cubitpy_performance.py",
81
+ "tests/test_tutorial.py"
82
+ ]
83
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.2.4",
3
+ "distance": 0,
4
+ "node": "g6fa66acbdf38eec28ecddfa5de87049c463dd7f3",
5
+ "dirty": false,
6
+ "branch": "main",
7
+ "node_date": "2026-10-28"
8
+ }
@@ -2561,3 +2561,34 @@ def test_exodus_to_dict():
2561
2561
  }
2562
2562
 
2563
2563
  compare_nested_dicts_or_lists(exo_dict, reference_exo_dict)
2564
+
2565
+
2566
+ def test_on_cubit_error_config(tmp_path):
2567
+ """The optional 'on_cubit_error' config key sets the error reaction."""
2568
+
2569
+ def write_config(extra=""):
2570
+ """Write a minimal remote config, optionally with an extra line."""
2571
+ path = tmp_path / "cubitpy_config.yaml"
2572
+ path.write_text(
2573
+ 'cubitpy_mode: "remote"\n'
2574
+ f"{extra}"
2575
+ "remote_config:\n"
2576
+ ' user: "user"\n'
2577
+ ' host: "host"\n'
2578
+ ' platform: "linux"\n'
2579
+ ' cubit_path: "/cubit"\n'
2580
+ )
2581
+ return path
2582
+
2583
+ saved_config = cupy._config
2584
+ try:
2585
+ cupy.load_cubit_config(write_config())
2586
+ assert cupy.on_cubit_error == "raise" # default when the key is absent
2587
+
2588
+ cupy.load_cubit_config(write_config('on_cubit_error: "warn"\n'))
2589
+ assert cupy.on_cubit_error == "warn"
2590
+
2591
+ with pytest.raises(RuntimeError, match="Invalid on_cubit_error"):
2592
+ cupy.load_cubit_config(write_config('on_cubit_error: "bogus"\n'))
2593
+ finally:
2594
+ cupy._config = saved_config
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes