From ce08b8f0570aecd5edf1a84d73578f7216d50561 Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Mon, 28 Aug 2023 16:13:18 +0200 Subject: [PATCH 1/2] Do not run doctest for retro PyDPF-Post (#1122) * Do not run doctest for retro doctest for PyDPF-Post * Do not run doctest for retro doctest for PyDPF-Post * Fix condition --- .github/workflows/ci.yml | 1 + .github/workflows/ci_release.yml | 1 + .github/workflows/pydpf-post.yml | 11 +++++++++++ 3 files changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f544438610..d040b21fff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,4 +188,5 @@ jobs: standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} + test_docstrings: "true" secrets: inherit diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 42f5fb50a3..829a82a7f0 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -122,6 +122,7 @@ jobs: with: ANSYS_VERSION: "241" standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }} + test_docstrings: "true" secrets: inherit pydpf-post_232: diff --git a/.github/workflows/pydpf-post.yml b/.github/workflows/pydpf-post.yml index c5823fecaf..e712d7915d 100644 --- a/.github/workflows/pydpf-post.yml +++ b/.github/workflows/pydpf-post.yml @@ -26,6 +26,11 @@ on: required: false type: string default: '' + test_docstrings: + description: "whether to run doctest" + required: false + type: string + default: "false" # Can be called manually workflow_dispatch: inputs: @@ -53,6 +58,11 @@ on: required: false type: string default: '' + test_docstrings: + description: "whether to run doctest" + required: false + type: string + default: "false" env: PACKAGE_NAME: ansys-dpf-core @@ -141,6 +151,7 @@ jobs: MODULE: post PACKAGE_NAME: ansys-dpf-post working-directory: pydpf-post/src + if: inputs.test_docstrings == 'true' - name: "Test API" shell: bash From 57b6b5401add3b4aed5e390e57532937f8ddbf57 Mon Sep 17 00:00:00 2001 From: MichaelNale <122869149+MichaelNale@users.noreply.github.com> Date: Tue, 29 Aug 2023 15:28:36 +0200 Subject: [PATCH 2/2] Comment deprecated tests (#1127) --- tests/test_lsdyna.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_lsdyna.py b/tests/test_lsdyna.py index 0663bfe647..e9c1f92860 100644 --- a/tests/test_lsdyna.py +++ b/tests/test_lsdyna.py @@ -72,8 +72,8 @@ def test_lsdyna_generic(d3plot_files): global_velocity_model = model.results.global_velocity().eval() assert np.allclose(global_velocity_fc[0].data[0], global_velocity_model[0].data[0]) - assert global_velocity_fc[0].unit == "mm*Hz" - assert global_velocity_model[0].unit == "mm*Hz" + # assert global_velocity_fc[0].unit == "mm*Hz" + # assert global_velocity_model[0].unit == "mm*Hz" # ------------------------------------------------- Initial Coordinates