Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .ci/code_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@
else:
LIB_TO_GENERATE = [
"Ans.Dpf.Native.dll",
"Ans.Dpf.Mechanical.dll",
"Ans.Dpf.FEMutils.dll",
"meshOperatorsCore.dll",
"mapdlOperatorsCore.dll",
"Ans.Dpf.Math.dll",
"Ans.Dpf.PythonPluginWrapper.dll"
"Ans.Dpf.Hdf5.dll",
"Ans.Dpf.FlowDiagram.dll",
"Ans.Dpf.LSDYNAHGP.dll",
"Ans.Dpf.LivePost.dll",
"Ans.Dpf.PointCloudSearch.dll",
Expand All @@ -38,14 +41,18 @@
for f in files:
if Path(f).stem == "specification":
continue
if Path(f).name == "build.py":
continue
if Path(f).name == "operator.mustache":
continue
try:
if os.path.isdir(f):
shutil.rmtree(f)
else:
os.remove(f)
except:
pass
core.start_local_server()
core.start_local_server(config=core.AvailableServerConfigs.LegacyGrpcServer)
code_gen = core.Operator("python_generator")
code_gen.connect(1, TARGET_PATH)
for lib in LIB_TO_GENERATE:
Expand All @@ -55,6 +62,4 @@
else:
code_gen.connect(2, True)
code_gen.run()
time.sleep(0.1)

core.SERVER.shutdown()
time.sleep(0.1)
Binary file removed .github/ansys_dpf_gate-0.2.0-py3-none-any.whl
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .github/ansys_grpc_dpf-0.6.0-py3-none-any.whl
Binary file not shown.
40 changes: 38 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
PACKAGE_NAME: ansys-dpf-core
MODULE: core
ANSYS_VERSION: 231
extra: "--pre --find-links .github/"
extra: "--find-links .github/"

jobs:
style:
Expand Down Expand Up @@ -122,75 +122,91 @@ jobs:

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_launcher"
shell: bash
working-directory: test_launcher
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_server"
shell: bash
working-directory: test_server
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_local_server"
shell: bash
working-directory: test_local_server
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_multi_server"
shell: bash
working-directory: test_multi_server
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_remote_workflow"
shell: bash
working-directory: test_remote_workflow
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_remote_operator"
shell: bash
working-directory: test_remote_operator
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_workflow"
shell: bash
working-directory: test_workflow
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

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

- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
Expand Down Expand Up @@ -320,6 +336,7 @@ jobs:
shell: bash
run: |
pip uninstall -y ansys-dpf-gatebin
if: always()

- name: "Check sanity without gatebin INPROCESS"
shell: bash
Expand All @@ -328,6 +345,7 @@ jobs:
python run_non_regression_examples.py
env:
DPF_SERVER_TYPE: INPROCESS
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
Expand All @@ -340,6 +358,7 @@ jobs:
python run_non_regression_examples.py
env:
DPF_SERVER_TYPE: GRPC
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
Expand All @@ -352,6 +371,7 @@ jobs:
python run_non_regression_examples.py
env:
DPF_SERVER_TYPE: LEGACYGRPC
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
Expand All @@ -366,7 +386,7 @@ jobs:
matrix:
python-version: ["3.8"]
os: ["windows-latest", "ubuntu-latest"]
ANSYS_VERSION: ["221"]
ANSYS_VERSION: ["222", "221"]
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -433,75 +453,91 @@ jobs:

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_launcher"
shell: bash
working-directory: test_launcher
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_server"
shell: bash
working-directory: test_server
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_local_server"
shell: bash
working-directory: test_local_server
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_multi_server"
shell: bash
working-directory: test_multi_server
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_remote_workflow"
shell: bash
working-directory: test_remote_workflow
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_remote_operator"
shell: bash
working-directory: test_remote_operator
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

- name: "Test API test_workflow"
shell: bash
working-directory: test_workflow
run: |
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 .
if: always()

- name: "Kill all servers"
uses: pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
if: always()

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

- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
Expand Down
4 changes: 2 additions & 2 deletions ansys/dpf/core/label_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def _data_processing_core_api(self):
return core_api

def fill(self, label_space):
for key, id in label_space.items():
self._api.label_space_add_data(self, key, id)
for key, index in label_space.items():
self._api.label_space_add_data(self, key, index)

def __dict__(self):
if isinstance(self._internal_obj, dict):
Expand Down
15 changes: 4 additions & 11 deletions ansys/dpf/core/operators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
"""
.. _ref_operators_package:

Operators
---------
"""

from . import result
from . import math
from . import result
from . import utility
from . import min_max
from . import scoping
from . import metadata
from . import logic
from . import mesh
from . import filter
from . import logic
from . import metadata
from . import serialization
from . import mesh
from . import geo
from . import averaging
from . import invariant
Expand Down
1 change: 1 addition & 0 deletions ansys/dpf/core/operators/averaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from .elemental_fraction_fc import elemental_fraction_fc
from .to_nodal import to_nodal
from .to_nodal_fc import to_nodal_fc
from .nodal_extend_to_mid_nodes import nodal_extend_to_mid_nodes
from .elemental_nodal_to_nodal_elemental import elemental_nodal_to_nodal_elemental
from .extend_to_mid_nodes import extend_to_mid_nodes
from .extend_to_mid_nodes_fc import extend_to_mid_nodes_fc
Expand Down
Loading