Skip to content

Commit 3ca756d

Browse files
Add a retrocompatibility workflow (#310)
* Add a retro-compatibility workflow * Trigger on pull_requests to retro/ branches Trigger also for release/ branches * Update pydpf-actions to 2.1.1 * Update to trigger on pull_requests FROM a retro or release branch * Fix vtk version in setup.py extras_require[plotting] * Add concurrency criterion * Revert Fix vtk version in setup.py extras_require[plotting]: vtk 9.0.3 not available for Python 3.10 * Fix unbuntu doctest error due to unsorted available_property_fields list * Rename job * Update run criteria * Update run criteria * Go back to Windows 3.8 only * Add empty line at end-of-file Co-authored-by: Paul P <[email protected]>
1 parent 9e6584a commit 3ca756d

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

.github/workflows/retro.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Retro-Compatibility check
2+
3+
on:
4+
schedule: # UTC at 0400
5+
- cron: '0 4 * * *'
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
PACKAGE_NAME: ansys-dpf-core
14+
MODULE: core
15+
16+
jobs:
17+
Retro_221:
18+
if: startsWith(github.head_ref, 'master') || contains(github.head_ref, 'retro')
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python-version: ["3.8"]
24+
os: [ "windows-latest"]
25+
env:
26+
ANSYS_VERSION: 221
27+
steps:
28+
- uses: actions/checkout@v3
29+
30+
- name: "Build Package"
31+
uses: pyansys/pydpf-actions/[email protected]
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
ANSYS_VERSION: ${{env.ANSYS_VERSION}}
35+
PACKAGE_NAME: ${{env.PACKAGE_NAME}}
36+
MODULE: ${{env.MODULE}}
37+
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
38+
install_extras: plotting
39+
40+
- name: "Test Package"
41+
uses: pyansys/pydpf-actions/[email protected]
42+
with:
43+
MODULE: ${{env.MODULE}}

ansys/dpf/core/meshed_region.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def available_property_fields(self):
230230
-------
231231
available_property_fields : list str
232232
"""
233-
return self._stub.List(self._message).available_prop
233+
return sorted(self._stub.List(self._message).available_prop)
234234

235235
def property_field(self, property_name):
236236
"""

tests/test_meshregion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_vtk_grid_from_model(simple_bar_model):
4141

4242
def test_meshed_region_available_property_fields(simple_bar_model):
4343
mesh = simple_bar_model.metadata.meshed_region
44-
properties = ['connectivity', 'elprops', 'eltype', 'apdl_element_type', 'mat']
44+
properties = sorted(['connectivity', 'elprops', 'eltype', 'apdl_element_type', 'mat'])
4545
assert mesh.available_property_fields == properties
4646

4747

0 commit comments

Comments
 (0)