Skip to content

Commit 27f599a

Browse files
authored
Merge pull request #446 from pyansys/common_release-0.6.0
Common work on release 0.6.0
2 parents 819771d + 68a3998 commit 27f599a

File tree

211 files changed

+8064
-8349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+8064
-8349
lines changed

.ci/code_generation.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@
2121
else:
2222
LIB_TO_GENERATE = [
2323
"Ans.Dpf.Native.dll",
24+
"Ans.Dpf.Mechanical.dll",
2425
"Ans.Dpf.FEMutils.dll",
2526
"meshOperatorsCore.dll",
2627
"mapdlOperatorsCore.dll",
2728
"Ans.Dpf.Math.dll",
29+
"Ans.Dpf.PythonPluginWrapper.dll"
2830
"Ans.Dpf.Hdf5.dll",
31+
"Ans.Dpf.FlowDiagram.dll",
2932
"Ans.Dpf.LSDYNAHGP.dll",
3033
"Ans.Dpf.LivePost.dll",
3134
"Ans.Dpf.PointCloudSearch.dll",
@@ -38,14 +41,18 @@
3841
for f in files:
3942
if Path(f).stem == "specification":
4043
continue
44+
if Path(f).name == "build.py":
45+
continue
46+
if Path(f).name == "operator.mustache":
47+
continue
4148
try:
4249
if os.path.isdir(f):
4350
shutil.rmtree(f)
4451
else:
4552
os.remove(f)
4653
except:
4754
pass
48-
core.start_local_server()
55+
core.start_local_server(config=core.AvailableServerConfigs.LegacyGrpcServer)
4956
code_gen = core.Operator("python_generator")
5057
code_gen.connect(1, TARGET_PATH)
5158
for lib in LIB_TO_GENERATE:
@@ -55,6 +62,4 @@
5562
else:
5663
code_gen.connect(2, True)
5764
code_gen.run()
58-
time.sleep(0.1)
59-
60-
core.SERVER.shutdown()
65+
time.sleep(0.1)
-129 KB
Binary file not shown.
-5.2 MB
Binary file not shown.
Binary file not shown.
-75.1 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
PACKAGE_NAME: ansys-dpf-core
2020
MODULE: core
2121
ANSYS_VERSION: 231
22-
extra: "--pre --find-links .github/"
22+
extra: "--find-links .github/"
2323

2424
jobs:
2525
style:
@@ -122,75 +122,91 @@ jobs:
122122
123123
- name: "Kill all servers"
124124
uses: pyansys/pydpf-actions/[email protected]
125+
if: always()
125126

126127
- name: "Test API test_launcher"
127128
shell: bash
128129
working-directory: test_launcher
129130
run: |
130131
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results2.xml --reruns 2 .
132+
if: always()
131133

132134
- name: "Kill all servers"
133135
uses: pyansys/pydpf-actions/[email protected]
136+
if: always()
134137

135138
- name: "Test API test_server"
136139
shell: bash
137140
working-directory: test_server
138141
run: |
139142
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results4.xml --reruns 2 .
143+
if: always()
140144

141145
- name: "Kill all servers"
142146
uses: pyansys/pydpf-actions/[email protected]
147+
if: always()
143148

144149
- name: "Test API test_local_server"
145150
shell: bash
146151
working-directory: test_local_server
147152
run: |
148153
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results5.xml --reruns 2 .
154+
if: always()
149155

150156
- name: "Kill all servers"
151157
uses: pyansys/pydpf-actions/[email protected]
158+
if: always()
152159

153160
- name: "Test API test_multi_server"
154161
shell: bash
155162
working-directory: test_multi_server
156163
run: |
157164
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results6.xml --reruns 2 .
165+
if: always()
158166

159167
- name: "Kill all servers"
160168
uses: pyansys/pydpf-actions/[email protected]
169+
if: always()
161170

162171
- name: "Test API test_remote_workflow"
163172
shell: bash
164173
working-directory: test_remote_workflow
165174
run: |
166175
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results7.xml --reruns 2 .
176+
if: always()
167177

168178
- name: "Kill all servers"
169179
uses: pyansys/pydpf-actions/[email protected]
180+
if: always()
170181

171182
- name: "Test API test_remote_operator"
172183
shell: bash
173184
working-directory: test_remote_operator
174185
run: |
175186
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results8.xml --reruns 2 .
187+
if: always()
176188

177189
- name: "Kill all servers"
178190
uses: pyansys/pydpf-actions/[email protected]
191+
if: always()
179192

180193
- name: "Test API test_workflow"
181194
shell: bash
182195
working-directory: test_workflow
183196
run: |
184197
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results3.xml --reruns 3 .
198+
if: always()
185199

186200
- name: "Kill all servers"
187201
uses: pyansys/pydpf-actions/[email protected]
202+
if: always()
188203

189204
- name: "Upload Test Results"
190205
uses: actions/upload-artifact@v2
191206
with:
192207
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ env.ANSYS_VERSION }}
193208
path: tests/junit/test-results.xml
209+
if: always()
194210

195211
- name: "Upload coverage to Codecov"
196212
uses: codecov/codecov-action@v3
@@ -320,6 +336,7 @@ jobs:
320336
shell: bash
321337
run: |
322338
pip uninstall -y ansys-dpf-gatebin
339+
if: always()
323340

324341
- name: "Check sanity without gatebin INPROCESS"
325342
shell: bash
@@ -328,6 +345,7 @@ jobs:
328345
python run_non_regression_examples.py
329346
env:
330347
DPF_SERVER_TYPE: INPROCESS
348+
if: always()
331349

332350
- name: "Kill all servers"
333351
uses: pyansys/pydpf-actions/[email protected]
@@ -340,6 +358,7 @@ jobs:
340358
python run_non_regression_examples.py
341359
env:
342360
DPF_SERVER_TYPE: GRPC
361+
if: always()
343362

344363
- name: "Kill all servers"
345364
uses: pyansys/pydpf-actions/[email protected]
@@ -352,6 +371,7 @@ jobs:
352371
python run_non_regression_examples.py
353372
env:
354373
DPF_SERVER_TYPE: LEGACYGRPC
374+
if: always()
355375

356376
- name: "Kill all servers"
357377
uses: pyansys/pydpf-actions/[email protected]
@@ -366,7 +386,7 @@ jobs:
366386
matrix:
367387
python-version: ["3.8"]
368388
os: ["windows-latest", "ubuntu-latest"]
369-
ANSYS_VERSION: ["221"]
389+
ANSYS_VERSION: ["222", "221"]
370390
steps:
371391
- uses: actions/checkout@v3
372392

@@ -433,75 +453,91 @@ jobs:
433453
434454
- name: "Kill all servers"
435455
uses: pyansys/pydpf-actions/[email protected]
456+
if: always()
436457

437458
- name: "Test API test_launcher"
438459
shell: bash
439460
working-directory: test_launcher
440461
run: |
441462
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results2.xml --reruns 2 .
463+
if: always()
442464

443465
- name: "Kill all servers"
444466
uses: pyansys/pydpf-actions/[email protected]
467+
if: always()
445468

446469
- name: "Test API test_server"
447470
shell: bash
448471
working-directory: test_server
449472
run: |
450473
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results4.xml --reruns 2 .
474+
if: always()
451475

452476
- name: "Kill all servers"
453477
uses: pyansys/pydpf-actions/[email protected]
478+
if: always()
454479

455480
- name: "Test API test_local_server"
456481
shell: bash
457482
working-directory: test_local_server
458483
run: |
459484
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results5.xml --reruns 2 .
485+
if: always()
460486

461487
- name: "Kill all servers"
462488
uses: pyansys/pydpf-actions/[email protected]
489+
if: always()
463490

464491
- name: "Test API test_multi_server"
465492
shell: bash
466493
working-directory: test_multi_server
467494
run: |
468495
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results6.xml --reruns 2 .
496+
if: always()
469497

470498
- name: "Kill all servers"
471499
uses: pyansys/pydpf-actions/[email protected]
500+
if: always()
472501

473502
- name: "Test API test_remote_workflow"
474503
shell: bash
475504
working-directory: test_remote_workflow
476505
run: |
477506
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results7.xml --reruns 2 .
507+
if: always()
478508

479509
- name: "Kill all servers"
480510
uses: pyansys/pydpf-actions/[email protected]
511+
if: always()
481512

482513
- name: "Test API test_remote_operator"
483514
shell: bash
484515
working-directory: test_remote_operator
485516
run: |
486517
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results8.xml --reruns 2 .
518+
if: always()
487519

488520
- name: "Kill all servers"
489521
uses: pyansys/pydpf-actions/[email protected]
522+
if: always()
490523

491524
- name: "Test API test_workflow"
492525
shell: bash
493526
working-directory: test_workflow
494527
run: |
495528
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results3.xml --reruns 3 .
529+
if: always()
496530

497531
- name: "Kill all servers"
498532
uses: pyansys/pydpf-actions/[email protected]
533+
if: always()
499534

500535
- name: "Upload Test Results"
501536
uses: actions/upload-artifact@v2
502537
with:
503538
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ matrix.ANSYS_VERSION }}
504539
path: tests/junit/test-results.xml
540+
if: always()
505541

506542
- name: "Upload coverage to Codecov"
507543
uses: codecov/codecov-action@v3

ansys/dpf/core/label_space.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def _data_processing_core_api(self):
4343
return core_api
4444

4545
def fill(self, label_space):
46-
for key, id in label_space.items():
47-
self._api.label_space_add_data(self, key, id)
46+
for key, index in label_space.items():
47+
self._api.label_space_add_data(self, key, index)
4848

4949
def __dict__(self):
5050
if isinstance(self._internal_obj, dict):

ansys/dpf/core/operators/__init__.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
"""
2-
.. _ref_operators_package:
3-
4-
Operators
5-
---------
6-
"""
7-
8-
from . import result
91
from . import math
2+
from . import result
103
from . import utility
114
from . import min_max
125
from . import scoping
13-
from . import metadata
14-
from . import logic
15-
from . import mesh
166
from . import filter
7+
from . import logic
8+
from . import metadata
179
from . import serialization
10+
from . import mesh
1811
from . import geo
1912
from . import averaging
2013
from . import invariant

ansys/dpf/core/operators/averaging/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from .elemental_fraction_fc import elemental_fraction_fc
1414
from .to_nodal import to_nodal
1515
from .to_nodal_fc import to_nodal_fc
16+
from .nodal_extend_to_mid_nodes import nodal_extend_to_mid_nodes
1617
from .elemental_nodal_to_nodal_elemental import elemental_nodal_to_nodal_elemental
1718
from .extend_to_mid_nodes import extend_to_mid_nodes
1819
from .extend_to_mid_nodes_fc import extend_to_mid_nodes_fc

0 commit comments

Comments
 (0)