Skip to content

Commit bfbfd4c

Browse files
authored
Merge branch 'main' into refactor/typing_workflow_record
2 parents a0c89bd + 9aaff16 commit bfbfd4c

30 files changed

+2553
-82
lines changed

.ci/code_generation.py

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,36 @@
1111
core.set_default_server_context(core.AvailableServerContexts.premium)
1212
core.start_local_server(config=core.AvailableServerConfigs.LegacyGrpcServer)
1313

14+
files_to_keep = {
15+
"operator.mustache": "",
16+
"build.py": "",
17+
"specification.py": "",
18+
"translator.py": "",
19+
# Deprecated operator scripting names
20+
"result": [
21+
"gasket_deformation.py",
22+
"gasket_deformation_X.py",
23+
"gasket_deformation_XY.py",
24+
"gasket_deformation_XZ.py",
25+
],
26+
}
27+
1428
local_dir = Path(__file__).parent
1529
TARGET_PATH = local_dir.parent / "src" / "ansys" / "dpf" / "core" / "operators"
1630
files = TARGET_PATH.glob("*")
1731
for file_path in files:
18-
if file_path.stem == "specification":
19-
continue
20-
if file_path.stem == "translator":
21-
continue
22-
if file_path.name == "build.py":
32+
if file_path.is_file() and (file_path.name in files_to_keep):
2333
continue
24-
if file_path.name == "operator.mustache":
25-
continue
26-
try:
27-
if file_path.is_dir():
28-
shutil.rmtree(file_path)
34+
if file_path.is_dir():
35+
shutil.rmtree(file_path / "__pycache__", ignore_errors=True)
36+
if file_path.name in files_to_keep:
37+
sub_files = file_path.glob("*")
38+
for sub_file in sub_files:
39+
if sub_file.name not in files_to_keep[file_path.name]:
40+
sub_file.unlink()
2941
else:
30-
file_path.unlink()
31-
except:
32-
pass
42+
shutil.rmtree(file_path)
43+
else:
44+
file_path.unlink()
3345

3446
build.build_operators()

.github/workflows/ci.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -225,28 +225,23 @@ jobs:
225225
secrets: inherit
226226

227227
tests-retro:
228-
name: "Test DPF ${{ matrix.dpf.version }} compatibility"
228+
name: "Test DPF ${{ matrix.version }} compatibility"
229229
if: |
230230
github.event.action != 'closed' &&
231231
(github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
232232
(startsWith(github.head_ref, 'main') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
233233
strategy:
234234
fail-fast: false
235235
matrix:
236-
dpf:
237-
- {"version": "252", "standalone-suffix": ""}
238-
- {"version": "251", "standalone-suffix": ""}
239-
- {"version": "242", "standalone-suffix": ""}
240-
- {"version": "241", "standalone-suffix": ".sp01"}
241-
- {"version": "232", "standalone-suffix": ""}
242-
- {"version": "231", "standalone-suffix": ""}
243-
- {"version": "222", "standalone-suffix": ""}
236+
version:
237+
- ${{ fromJson(vars.ANSYS_VERSIONS_RETRO) }}
238+
- ${{ fromJson(vars.ANSYS_VERSION_LAST_RELEASED) }}
244239
uses: ./.github/workflows/tests.yml
245240
with:
246-
ANSYS_VERSION: ${{ matrix.dpf.version }}
241+
ANSYS_VERSION: ${{ matrix.version }}
247242
python_versions: '["3.10"]'
248243
DOCSTRING: false
249-
standalone_suffix: ${{ matrix.dpf.standalone-suffix }}
244+
standalone_suffix: ${{ matrix.version == '241' && '.sp01' || '' }}
250245
secrets: inherit
251246

252247
sync-main-with-master:

.github/workflows/ci_release.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -126,43 +126,40 @@ jobs:
126126
secrets: inherit
127127

128128
tests-retro:
129-
name: "Test DPF ${{ matrix.dpf.version }} compatibility"
129+
name: "Test DPF ${{ matrix.version }} compatibility"
130130
strategy:
131131
fail-fast: false
132132
matrix:
133-
dpf:
134-
- {"version": "251", "standalone-suffix": ""}
135-
- {"version": "242", "standalone-suffix": ""}
136-
- {"version": "241", "standalone-suffix": ".sp01"}
137-
- {"version": "232", "standalone-suffix": ""}
138-
- {"version": "231", "standalone-suffix": ""}
139-
- {"version": "222", "standalone-suffix": ""}
133+
version:
134+
- ${{ fromJson(vars.ANSYS_VERSIONS_RETRO) }}
140135
uses: ./.github/workflows/tests.yml
141136
with:
142-
ANSYS_VERSION: ${{ matrix.dpf.version }}
137+
ANSYS_VERSION: ${{ matrix.version }}
143138
python_versions: '["3.10"]'
144139
DOCSTRING: false
145-
standalone_suffix: ${{ matrix.dpf.standalone-suffix }}
140+
standalone_suffix: ${{ matrix.version == '241' && '.sp01' || '' }}
146141
secrets: inherit
147142

148143
tests-pydpf-post:
149-
name: "Test PyDPF-Post with ${{ matrix.dpf.version}}"
144+
name: "Test PyDPF-Post with ${{ matrix.version}}"
150145
strategy:
151146
fail-fast: false
152147
matrix:
153-
dpf:
154-
- {"version": "252", "standalone-suffix": "${{ github.event.inputs.standalone_branch_suffix || '' }}", "test_docstrings": "true"}
155-
- {"version": "251", "standalone-suffix": "", "test_docstrings": "false"}
156-
- {"version": "242", "standalone-suffix": "", "test_docstrings": "false"}
157-
- {"version": "241", "standalone-suffix": "", "test_docstrings": "false"}
158-
- {"version": "232", "standalone-suffix": "", "test_docstrings": "false"}
159-
- {"version": "231", "standalone-suffix": "", "test_docstrings": "false"}
160-
- {"version": "222", "standalone-suffix": "", "test_docstrings": "false"}
148+
version:
149+
- ${{ fromJson(vars.ANSYS_VERSIONS_RETRO) }}
150+
standalone_suffix:
151+
- ""
152+
test_docstrings:
153+
- "false"
154+
include:
155+
- version: ${{ vars.ANSYS_VERSION_LAST_RELEASED }}
156+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
157+
test_docstrings": "true"
161158
uses: ./.github/workflows/pydpf-post.yml
162159
with:
163-
ANSYS_VERSION: ${{ matrix.dpf.version }}
164-
standalone_suffix: ${{ matrix.dpf.standalone-suffix }}
165-
test_docstrings: ${{ matrix.dpf.test_docstrings }}
160+
ANSYS_VERSION: ${{ matrix.version }}
161+
standalone_suffix: ${{ matrix.version == '241' && '.sp01' || matrix.standalone_suffix }}
162+
test_docstrings: ${{ matrix.test_docstrings }}
166163
secrets: inherit
167164

168165
docker_tests:

doc/source/getting_started/compatibility.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ package should also be synchronized with the server version.
4949
- ``ansys.grpc.dpf`` Python module version
5050
- ``ansys.dpf.gatebin`` binaries Python module version
5151
- ``ansys.dpf.gate`` Python module version
52+
* - 11.0 (Ansys 2026 R1 pre0)
53+
- 0.14.0 and later
54+
- None
55+
- None
56+
- None
5257
* - 10.0 (Ansys 2025 R2)
5358
- 0.13.8 and later
5459
- None

doc/source/operators_doc/operator-specifications/operator_doc_template.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ license: {{ scripting_info.license }}
1818
|-------|-------|------------------|-------------|
1919
{%- for input in inputs %}
2020
| {% if not input.optional %}<strong>Pin {{ input.pin_number }}</strong> <br><span style="background-color:#d93025; color:white; padding:2px 6px; border-radius:3px; font-size:0.75em;">Required</span>{% else %}<strong>Pin {{ input.pin_number }}</strong>{% endif %}| {{ input.name }} |
21-
{%- for t in input.types -%}{% if "::" in t %}{{ t }}{% elif t == "int32" or t == "bool" or t == char or t == "double" or t == "string" or t == "uint32" or t == "uint64" or t == "vector<int32>" or t == "vector<bool>" or t == "vector<char>" or t == "vector<double>" or t == "vector<string>" or t == "vector<float>" %}[`{{ t }}`](../../core-concepts/dpf-types.md#standard-types){% elif t.startswith("abstract_") %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("abstract_", "") | replace("_", "-") | replace (" ", "-") | lower}}){% else %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("_", "-") | replace(" ", "-") | lower}}){% endif %}{% if not loop.last %}, {% endif %}{%- endfor %} | {{ input.document | replace("\n", "<br>") }} |
21+
{%- for t in input.types -%}{% if "::" in t or t == "materials_container" or t == "materials" or t == "binary_operation_enum" or t == "umap<int32,int32>" or t == "stream" or t == "vector<shared_ptr<any_collection>>" or t == "vector<shared_ptr<field>>" or t == "umap<string,shared_ptr<abstract_field_support>>" or t == "vector<shared_ptr<abstract_meshed_region>>" or t == "vector<shared_ptr<materials>>" or t == "ans_dispatch_holder" or t == "struct IAnsDispatch" or t == "abstract_field_support" or t == "vector<shared_ptr<fields_container>>" or t == "vector<shared_ptr<data_tree>>" or t == "vector<shared_ptr<generic_data_container>>" or t == "vector<shared_ptr<time_freq_support>>" or t == "mesh_selection_manager" or t == "vector<shared_ptr<abstract_field_support>>" or t == "vector<shared_ptr<string_field>>" or t == "vector<shared_ptr<scopings_container>>" or t == "vector<shared_ptr<scoping>>" or t == "vector<shared_ptr<result_info>>" or t == "vector<shared_ptr<meshes_container>>"
22+
%}{{ t }}{% elif t == "int32" or t == "bool" or t == char or t == "double" or t == "string" or t == "uint32" or t == "uint64" or t == "vector<int32>" or t == "vector<bool>" or t == "vector<char>" or t == "vector<double>" or t == "vector<string>" or t == "vector<float>" %}[`{{ t }}`](../../core-concepts/dpf-types.md#standard-types){% elif t.startswith("abstract_") %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("abstract_", "") | replace("_", "-") | replace (" ", "-") | lower}}){% else %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("_", "-") | replace(" ", "-") | lower}}){% endif %}{% if not loop.last %}, {% endif %}{%- endfor %} | {{ input.document | replace("\n", "<br>") }} |
2223
{%- endfor %}
2324

2425
## Outputs
@@ -27,7 +28,7 @@ license: {{ scripting_info.license }}
2728
|-------|------|------------------|-------------|
2829
{%- for output in outputs %}
2930
| **Pin {{ output.pin_number }}**| {{ output.name }} |
30-
{%- for t in output.types -%}{% if "::" in t %}{{ t }}{% elif t == "int32" or t == "bool" or t == char or t == "double" or t == "string" or t == "uint32" or t == "uint64" or t == "vector<int32>" or t == "vector<bool>" or t == "vector<char>" or t == "vector<double>" or t == "vector<string>" or t == "vector<float>" %}[`{{ t }}`](../../core-concepts/dpf-types.md#standard-types){% elif t.startswith("abstract_") %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("abstract_", "") | replace("_", "-") | replace (" ", "-") | lower}}){% else %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("_", "-") | replace(" ", "-") | lower}}){% endif %}{% if not loop.last %}, {% endif %}{%- endfor %} | {{ output.document }} |
31+
{%- for t in output.types -%}{% if "::" in t or t == "materials_container" or t == "materials" or t == "binary_operation_enum" or t == "umap<int32,int32>" or t == "stream" or t == "vector<shared_ptr<any_collection>>" or t == "vector<shared_ptr<field>>" or t == "umap<string,shared_ptr<abstract_field_support>>" or t == "vector<shared_ptr<abstract_meshed_region>>" or t == "vector<shared_ptr<materials>>" or t == "ans_dispatch_holder" or t == "struct IAnsDispatch" or t == "abstract_field_support" or t == "vector<shared_ptr<fields_container>>" or t == "vector<shared_ptr<data_tree>>" or t == "vector<shared_ptr<generic_data_container>>" or t == "vector<shared_ptr<time_freq_support>>" or t == "mesh_selection_manager" or t == "vector<shared_ptr<abstract_field_support>>" or t == "vector<shared_ptr<string_field>>" or t == "vector<shared_ptr<scopings_container>>" or t == "vector<shared_ptr<scoping>>" or t == "vector<shared_ptr<result_info>>" or t == "vector<shared_ptr<meshes_container>>" %}{{ t }}{% elif t == "int32" or t == "bool" or t == char or t == "double" or t == "string" or t == "uint32" or t == "uint64" or t == "vector<int32>" or t == "vector<bool>" or t == "vector<char>" or t == "vector<double>" or t == "vector<string>" or t == "vector<float>" %}[`{{ t }}`](../../core-concepts/dpf-types.md#standard-types){% elif t.startswith("abstract_") %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("abstract_", "") | replace("_", "-") | replace (" ", "-") | lower}}){% else %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("_", "-") | replace(" ", "-") | lower}}){% endif %}{% if not loop.last %}, {% endif %}{%- endfor %} | {{ output.document }} |
3132
{%- endfor %}
3233

3334
## Configurations
@@ -36,7 +37,7 @@ license: {{ scripting_info.license }}
3637
|-----|------|----------|-------------|
3738
{%- for configuration in configurations %}
3839
| **{{ configuration.name }}** |
39-
{%- for t in configuration.types -%}{% if "::" in t %}{{ t }}{% elif t == "int32" or t == "bool" or t == char or t == "double" or t == "string" or t == "uint32" or t == "uint64" or t == "vector<int32>" or t == "vector<bool>" or t == "vector<char>" or t == "vector<double>" or t == "vector<string>" or t == "vector<float>" %}[`{{ t }}`](../../core-concepts/dpf-types.md#standard-types){% elif t.startswith("abstract_") %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("abstract_", "") | replace("_", "-") | replace (" ", "-") | lower}}){% else %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("_", "-") | replace(" ", "-") | lower}}){% endif %}{% if not loop.last %}, {% endif %}{%- endfor %} | {{ configuration.default_value }} | {{ configuration.document }} |
40+
{%- for t in configuration.types -%}{% if "::" in t or t == "materials_container" or t == "materials" or t == "binary_operation_enum" or t == "umap<int32,int32>" or t == "stream" or t == "vector<shared_ptr<any_collection>>" or t == "vector<shared_ptr<field>>" or t == "umap<string,shared_ptr<abstract_field_support>>" or t == "vector<shared_ptr<abstract_meshed_region>>" or t == "vector<shared_ptr<materials>>" or t == "ans_dispatch_holder" or t == "struct IAnsDispatch" or t == "abstract_field_support" or t == "vector<shared_ptr<fields_container>>" or t == "vector<shared_ptr<data_tree>>" or t == "vector<shared_ptr<generic_data_container>>" or t == "vector<shared_ptr<time_freq_support>>" or t == "mesh_selection_manager" or t == "vector<shared_ptr<abstract_field_support>>" or t == "vector<shared_ptr<string_field>>" or t == "vector<shared_ptr<scopings_container>>" or t == "vector<shared_ptr<scoping>>" or t == "vector<shared_ptr<result_info>>" or t == "vector<shared_ptr<meshes_container>>" %}{{ t }}{% elif t == "int32" or t == "bool" or t == char or t == "double" or t == "string" or t == "uint32" or t == "uint64" or t == "vector<int32>" or t == "vector<bool>" or t == "vector<char>" or t == "vector<double>" or t == "vector<string>" or t == "vector<float>" %}[`{{ t }}`](../../core-concepts/dpf-types.md#standard-types){% elif t.startswith("abstract_") %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("abstract_", "") | replace("_", "-") | replace (" ", "-") | lower}}){% else %}[`{{ t }}`](../../core-concepts/dpf-types.md#{{ t | replace("_", "-") | replace(" ", "-") | lower}}){% endif %}{% if not loop.last %}, {% endif %}{%- endfor %} | {{ configuration.default_value }} | {{ configuration.document }} |
4041
{%- endfor %}
4142

4243
## Scripting

doc/source/user_guide/tutorials/plot/index.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,19 @@ These tutorials demonstrate different ways one can visualize the data in plots u
3939

4040
This tutorial shows how to plot graphs using matplotlib.
4141

42+
.. grid-item-card:: Plot mesh scopings
43+
:link: ref_tutorials_plot_mesh_scopings
44+
:link-type: ref
45+
:text-align: center
46+
47+
This tutorial shows how to plot mesh scopings.
48+
4249
.. toctree::
4350
:maxdepth: 2
4451
:hidden:
4552

4653
plot_mesh.rst
4754
plot_deformed_mesh.rst
4855
plot_contour.rst
49-
plot_a_graph.rst
56+
plot_a_graph.rst
57+
plot_mesh_scopings.rst

0 commit comments

Comments
 (0)