From 18ac4a8862db2e1ff02ed248ccbc90e4ef8db774 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 17 Apr 2023 11:06:01 +0200 Subject: [PATCH 1/3] Run 08-python-operators examples on Linux --- .ci/run_examples.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/run_examples.py b/.ci/run_examples.py index c18a1d4d43..3644e3fea3 100644 --- a/.ci/run_examples.py +++ b/.ci/run_examples.py @@ -24,8 +24,8 @@ for subdirectory in subdirectories: subdir = os.path.join(root, subdirectory) for file in glob.iglob(os.path.join(subdir, "*.py")): - if sys.platform == "linux" and "08-python-operators" in file: - continue + # if sys.platform == "linux" and "08-python-operators" in file: + # continue print("\n--------------------------------------------------") print(file) minimum_version_str = get_example_required_minimum_dpf_version(file) From 2851817f75d42669e0cb5c804c641fcae718d73f Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 17 Apr 2023 11:35:22 +0200 Subject: [PATCH 2/3] Try fix 00-wrapping_numpy_capabilities.py --- .../08-python-operators/00-wrapping_numpy_capabilities.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/08-python-operators/00-wrapping_numpy_capabilities.py b/examples/08-python-operators/00-wrapping_numpy_capabilities.py index 271626586d..13da2599fc 100644 --- a/examples/08-python-operators/00-wrapping_numpy_capabilities.py +++ b/examples/08-python-operators/00-wrapping_numpy_capabilities.py @@ -103,7 +103,9 @@ # Use the operator # ---------------- -ds = dpf.DataSources(dpf.upload_file_in_tmp_folder(examples.find_static_rst())) +ds = dpf.DataSources( + dpf.upload_file_in_tmp_folder(examples.find_static_rst(return_local_path=True)) +) displacement = dpf.operators.result.displacement(data_sources=ds) norm = dpf.operators.math.norm(displacement) new_operator.inputs.connect(norm) From 63c9c6cb8fcd1dbe49545991f4217c51060609f2 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 17 Apr 2023 11:35:39 +0200 Subject: [PATCH 3/3] Only run examples --- .github/workflows/ci.yml | 170 +++++++++++++++++++-------------------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd89b862f3..f161b4bd94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,26 +66,26 @@ jobs: - name: "Run pre-commit" run: pre-commit run --all-files --show-diff-on-failure - tests: - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "232" - python_versions: '["3.8"]' - wheel: true - wheelhouse: false - 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/v232/dist' }} - secrets: inherit - - docker_tests: - name: "Build and Test on Docker" - uses: ./.github/workflows/test_docker.yml - with: - 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-docker || './dpf-standalone/dist' }} - secrets: inherit +# tests: +# uses: ./.github/workflows/tests.yml +# with: +# ANSYS_VERSION: "232" +# python_versions: '["3.8"]' +# wheel: true +# wheelhouse: false +# 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/v232/dist' }} +# secrets: inherit + +# docker_tests: +# name: "Build and Test on Docker" +# uses: ./.github/workflows/test_docker.yml +# with: +# 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-docker || './dpf-standalone/dist' }} +# secrets: inherit docker_examples: name: "Run examples on Docker" @@ -98,28 +98,28 @@ jobs: custom-wheels: ${{ github.event.inputs.custom-wheels-docker || './dpf-standalone/dist' }} secrets: inherit - docs: - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/docs.yml - with: - ANSYS_VERSION: "232" - 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/v232/dist' }} - event_name: ${{ github.event_name }} - secrets: inherit - - upload-development-docs: - runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' }} - needs: [docs] - steps: - - name: "Upload development documentation" - uses: pyansys/actions/doc-deploy-dev@v4 - with: - cname: ${{ env.DOCUMENTATION_CNAME }} - token: ${{ secrets.GITHUB_TOKEN }} - doc-artifact-name: HTML-doc-ansys-dpf-core.zip +# docs: +# if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft +# uses: ./.github/workflows/docs.yml +# with: +# ANSYS_VERSION: "232" +# 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/v232/dist' }} +# event_name: ${{ github.event_name }} +# secrets: inherit + +# upload-development-docs: +# runs-on: ubuntu-latest +# if: ${{ github.ref == 'refs/heads/master' }} +# needs: [docs] +# steps: +# - name: "Upload development documentation" +# uses: pyansys/actions/doc-deploy-dev@v4 +# with: +# cname: ${{ env.DOCUMENTATION_CNAME }} +# token: ${{ secrets.GITHUB_TOKEN }} +# doc-artifact-name: HTML-doc-ansys-dpf-core.zip examples: if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft @@ -132,46 +132,46 @@ jobs: custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v232/dist' }} secrets: inherit - retro_231: - name: "retro 231" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "231" - python_versions: '["3.8"]' - DOCSTRING: false - custom-wheels: './.github' - secrets: inherit - - retro_222: - name: "retro 222" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "222" - python_versions: '["3.8"]' - DOCSTRING: false - custom-wheels: './.github' - secrets: inherit - - retro_221: - name: "retro 221" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "221" - python_versions: '["3.8"]' - DOCSTRING: false - custom-wheels: './.github' - secrets: inherit - - pydpf-post: - name: "PyDPF-Post" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/pydpf-post.yml - with: - ANSYS_VERSION: "232" - 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/v232/dist' }} - secrets: inherit +# retro_231: +# name: "retro 231" +# if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft +# uses: ./.github/workflows/tests.yml +# with: +# ANSYS_VERSION: "231" +# python_versions: '["3.8"]' +# DOCSTRING: false +# custom-wheels: './.github' +# secrets: inherit +# +# retro_222: +# name: "retro 222" +# if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft +# uses: ./.github/workflows/tests.yml +# with: +# ANSYS_VERSION: "222" +# python_versions: '["3.8"]' +# DOCSTRING: false +# custom-wheels: './.github' +# secrets: inherit +# +# retro_221: +# name: "retro 221" +# if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft +# uses: ./.github/workflows/tests.yml +# with: +# ANSYS_VERSION: "221" +# python_versions: '["3.8"]' +# DOCSTRING: false +# custom-wheels: './.github' +# secrets: inherit + +# pydpf-post: +# name: "PyDPF-Post" +# if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft +# uses: ./.github/workflows/pydpf-post.yml +# with: +# ANSYS_VERSION: "232" +# 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/v232/dist' }} +# secrets: inherit