From 792ff7b7b718de247743a97594c5857eb5576865 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Fri, 13 Oct 2023 16:05:15 +0200 Subject: [PATCH 01/10] Update package metadata supported Python --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 422ac4907a7..92dcb3c5da9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ name = "ansys-dpf-core" version = "0.9.1.dev0" description = "Data Processing Framework - Python Core " readme = "README.md" -requires-python = ">=3.8, <4" +requires-python = ">=3.9, <4" license = {file = "LICENSE"} authors = [ {name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}, From 53b303b08fb8620fa7ab98238371052355768ac2 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Fri, 13 Oct 2023 16:15:00 +0200 Subject: [PATCH 02/10] Bump CI to Python 3.9 and add Python 3.11 to testing --- .github/ISSUE_TEMPLATE/bug.yml | 1 + .github/ISSUE_TEMPLATE/examples.yml | 46 --------------------------- .github/workflows/ci.yml | 16 +++++----- .github/workflows/ci_release.yml | 16 +++++----- .github/workflows/docs.yml | 4 +-- .github/workflows/examples.yml | 4 +-- .github/workflows/examples_docker.yml | 4 +-- .github/workflows/pydpf-post.yml | 4 +-- .github/workflows/releaser.yml | 1 - .github/workflows/test_docker.yml | 2 +- .github/workflows/tests.yml | 4 +-- 11 files changed, 28 insertions(+), 74 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 5d106e6ee25..1c5a7ca1604 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -85,6 +85,7 @@ body: - '3.9' - '3.10' - '3.11' + - '3.12' validations: required: true diff --git a/.github/ISSUE_TEMPLATE/examples.yml b/.github/ISSUE_TEMPLATE/examples.yml index f440f58c7de..beb9d6d4a8e 100644 --- a/.github/ISSUE_TEMPLATE/examples.yml +++ b/.github/ISSUE_TEMPLATE/examples.yml @@ -27,49 +27,3 @@ body: as a .zip file. validations: required: true - - - type: dropdown - id: os-name - attributes: - label: '💻 Which operating system are you using?' - multiple: false - options: - - 'Windows' - - 'MacOS' - - 'Linux' - validations: - required: true - - - type: textarea - id: ansys-version - attributes: - label: '📀 Which ANSYS version are you using?' - placeholder: Indicate the ANSYS version of the products you are using. - - validations: - required: false - - - type: dropdown - id: python-version - attributes: - label: '🐍 Which Python version are you using?' - description: Run `python --version` to verify your Python version - multiple: false - options: - - '3.7' - - '3.8' - - '3.9' - - '3.10' - - '3.11' - validations: - required: true - - - type: textarea - id: installed-packages - attributes: - label: '📦 Installed packages' - description: Run `python -m pip freeze` to list installed packages - placeholder: Paste the output of `python -m pip freeze` here. - render: shell - validations: - required: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3416db207fd..2e87cf8506d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ concurrency: env: DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com' - MAIN_PYTHON_VERSION: '3.8' + MAIN_PYTHON_VERSION: '3.9' MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }} @@ -82,7 +82,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "241" - python_versions: '["3.8"]' + python_versions: '["3.9"]' wheel: true wheelhouse: false standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} @@ -92,7 +92,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "241" - python_versions: '["3.8"]' + python_versions: '["3.9"]' wheel: true wheelhouse: false standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} @@ -112,7 +112,7 @@ jobs: uses: ./.github/workflows/examples_docker.yml with: ANSYS_VERSION: "241" - python_versions: '["3.8"]' + python_versions: '["3.9"]' standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} secrets: inherit @@ -158,7 +158,7 @@ jobs: uses: ./.github/workflows/examples.yml with: ANSYS_VERSION: "241" - python_versions: '["3.8"]' + python_versions: '["3.9"]' standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} secrets: inherit @@ -168,7 +168,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "232" - python_versions: '["3.8"]' + python_versions: '["3.9"]' DOCSTRING: false standalone_suffix: '' secrets: inherit @@ -179,7 +179,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "231" - python_versions: '["3.8"]' + python_versions: '["3.9"]' DOCSTRING: false secrets: inherit @@ -189,7 +189,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "222" - python_versions: '["3.8"]' + python_versions: '["3.9"]' DOCSTRING: false secrets: inherit diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 2853699dc9e..dda888b5efb 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -26,7 +26,7 @@ on: env: ANSYS_VERSION: 241 DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com' - MAIN_PYTHON_VERSION: '3.8' + MAIN_PYTHON_VERSION: '3.9' jobs: debug: @@ -84,7 +84,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "241" - python_versions: '["3.8", "3.9", "3.10"]' + python_versions: '["3.9", "3.10", "3.11"]' wheel: true wheelhouse: true standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }} @@ -94,7 +94,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "241" - python_versions: '["3.8", "3.9", "3.10"]' + python_versions: '["3.9", "3.10", "3.11"]' wheel: true wheelhouse: false standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }} @@ -113,7 +113,7 @@ jobs: uses: ./.github/workflows/examples.yml with: ANSYS_VERSION: "241" - python_versions: '["3.8", "3.9", "3.10"]' + python_versions: '["3.9", "3.10", "3.11"]' standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }} secrets: inherit @@ -122,7 +122,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "232" - python_versions: '["3.8"]' + python_versions: '["3.9"]' DOCSTRING: false secrets: inherit @@ -131,7 +131,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "231" - python_versions: '["3.8"]' + python_versions: '["3.9"]' DOCSTRING: false secrets: inherit @@ -140,7 +140,7 @@ jobs: uses: ./.github/workflows/tests.yml with: ANSYS_VERSION: "222" - python_versions: '["3.8"]' + python_versions: '["3.9"]' DOCSTRING: false secrets: inherit @@ -187,7 +187,7 @@ jobs: uses: ./.github/workflows/examples_docker.yml with: ANSYS_VERSION: "241" - python_versions: '["3.8", "3.9", "3.10"]' + python_versions: '["3.9", "3.10", "3.11"]' standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }} secrets: inherit diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7af112e4144..9fcebbb5cda 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,7 +7,7 @@ on: python_version: required: false type: string - default: "3.8" + default: "3.9" ANSYS_VERSION: required: false type: string @@ -29,7 +29,7 @@ on: description: "Python interpreter" required: true type: string - default: "3.8" + default: "3.9" ANSYS_VERSION: description: "ANSYS version" required: true diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index a0dc1df79ed..35d89222cd9 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -7,7 +7,7 @@ on: python_versions: required: false type: string - default: '["3.8"]' + default: '["3.9"]' ANSYS_VERSION: required: false type: string @@ -24,7 +24,7 @@ on: description: "Python interpreters to test." required: true type: string - default: '["3.8"]' + default: '["3.9"]' ANSYS_VERSION: description: "ANSYS version to run." required: true diff --git a/.github/workflows/examples_docker.yml b/.github/workflows/examples_docker.yml index b20ac52b057..ba2ae27ca75 100644 --- a/.github/workflows/examples_docker.yml +++ b/.github/workflows/examples_docker.yml @@ -7,7 +7,7 @@ on: python_versions: required: false type: string - default: '["3.8"]' + default: '["3.9"]' ANSYS_VERSION: required: false type: string @@ -24,7 +24,7 @@ on: description: "Python interpreters to test." required: true type: string - default: '["3.8"]' + default: '["3.9"]' ANSYS_VERSION: description: "ANSYS version to run." required: true diff --git a/.github/workflows/pydpf-post.yml b/.github/workflows/pydpf-post.yml index b9005e12904..dd85345f44d 100644 --- a/.github/workflows/pydpf-post.yml +++ b/.github/workflows/pydpf-post.yml @@ -56,7 +56,7 @@ jobs: fail-fast: false matrix: os: ["windows-latest", "ubuntu-latest"] - python-version: ["3.8"] + python-version: ["3.9"] steps: - uses: actions/checkout@v3 @@ -71,7 +71,7 @@ jobs: - name: "Setup Python" uses: actions/setup-python@v4.6.0 with: - python-version: "3.8" + python-version: ${{ matrix.python-version }} - name: "Install ansys-dpf-core build requirements" run: pip install -r requirements/requirements_build.txt diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index a42d04e76c4..584b8e0aab6 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -6,7 +6,6 @@ on: env: DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com' - PYTHON_MAIN_VERSION: '3.10' MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }} diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 18f1aa138c2..f6abacb706a 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -40,7 +40,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8"] + python-version: ["3.9"] os: ["ubuntu-latest"] steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7b0d49e6362..750bac4dec3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ on: python_versions: required: false type: string - default: '["3.8"]' + default: '["3.9"]' ANSYS_VERSION: required: false type: string @@ -41,7 +41,7 @@ on: description: "Python interpreters to test." required: true type: string - default: '["3.8", "3.9", "3.10"]' + default: '["3.9", "3.10", "3.11"]' ANSYS_VERSION: description: "ANSYS version" required: true From d5dfa72ee36adbf62baaab42fa1eb036c3a73843 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Fri, 13 Oct 2023 16:51:52 +0200 Subject: [PATCH 03/10] Switch docs generation to 3.10 --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9fcebbb5cda..98b94a0b0d5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,7 +7,7 @@ on: python_version: required: false type: string - default: "3.9" + default: "3.10" ANSYS_VERSION: required: false type: string @@ -29,7 +29,7 @@ on: description: "Python interpreter" required: true type: string - default: "3.9" + default: "3.10" ANSYS_VERSION: description: "ANSYS version" required: true From 1b3e96b950c93fb1675ac66ee7d3e0f53764e6e5 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Fri, 13 Oct 2023 17:12:26 +0200 Subject: [PATCH 04/10] Revert "Switch docs generation to 3.10" This reverts commit d5dfa72ee36adbf62baaab42fa1eb036c3a73843. --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 98b94a0b0d5..9fcebbb5cda 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,7 +7,7 @@ on: python_version: required: false type: string - default: "3.10" + default: "3.9" ANSYS_VERSION: required: false type: string @@ -29,7 +29,7 @@ on: description: "Python interpreter" required: true type: string - default: "3.10" + default: "3.9" ANSYS_VERSION: description: "ANSYS version" required: true From e35f9aa232662fb80e3bffe4d30d0d57f1cb3283 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Fri, 13 Oct 2023 17:49:44 +0200 Subject: [PATCH 05/10] Add debug prints to create_sites_for_python_operators.ps1 --- .../user_guide/create_sites_for_python_operators.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/source/user_guide/create_sites_for_python_operators.ps1 b/docs/source/user_guide/create_sites_for_python_operators.ps1 index 45f548c9113..6ff1004ee8b 100644 --- a/docs/source/user_guide/create_sites_for_python_operators.ps1 +++ b/docs/source/user_guide/create_sites_for_python_operators.ps1 @@ -21,11 +21,16 @@ if (Test-Path ($tempfolder + "/venv/Lib/site-packages/__pycache__")){ Remove-Item -Recurse -Force ($tempfolder + "/venv/Lib/site-packages/__pycache__") } $dirName=[System.IO.Path]::GetDirectoryName($zippath) +Write-Host "Create directory" echo $dirName if (-Not (Test-Path $dirName)){ New-Item $dirName -Type directory } +Write-Host "Compress archive" Compress-Archive ($tempfolder+"/venv/Lib/site-packages/*") -DestinationPath $zippath -Force +Write-Host "Deactivate venv" deactivate -Remove-Item -Recurse -Force ($tempfolder + "/venv") \ No newline at end of file +Write-Host "Remove venv" +Remove-Item -Recurse -Force ($tempfolder + "/venv") +Write-Host "Done creating site-packages for gltf plugin" \ No newline at end of file From 02f1981ae68904090fe8156bbc69699175897e6d Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Fri, 13 Oct 2023 18:09:18 +0200 Subject: [PATCH 06/10] Fix create_sites_for_python_operators.ps1 --- docs/source/user_guide/create_sites_for_python_operators.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/user_guide/create_sites_for_python_operators.ps1 b/docs/source/user_guide/create_sites_for_python_operators.ps1 index 6ff1004ee8b..a0198fb2ab3 100644 --- a/docs/source/user_guide/create_sites_for_python_operators.ps1 +++ b/docs/source/user_guide/create_sites_for_python_operators.ps1 @@ -5,6 +5,8 @@ Write-Host "-zippath" $zippath Write-Host "-pythonexe" $pythonexe Write-Host "-tempfolder" $tempfolder +# Expand shortcut in path +$tempfolder = Resolve-Path -Path $tempfolder Write-Host "make venv" Start-Process $pythonexe -ArgumentList ("-m venv "+ $tempfolder+"\venv") -NoNewWindow -Wait From 50d20816bc58c19c6c5f00917af714ea377a1aa5 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 16 Oct 2023 10:20:15 +0200 Subject: [PATCH 07/10] Fix 02-python_operators_with_dependencies.py --- .../02-python_operators_with_dependencies.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/08-python-operators/02-python_operators_with_dependencies.py b/examples/08-python-operators/02-python_operators_with_dependencies.py index b77f6a70fec..f1a22ac62e9 100644 --- a/examples/08-python-operators/02-python_operators_with_dependencies.py +++ b/examples/08-python-operators/02-python_operators_with_dependencies.py @@ -149,9 +149,10 @@ import subprocess process = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if process.stderr: + if process.returncode != 0 and process.stderr: raise RuntimeError( "Installing pygltf in a virtual environment failed with error:\n" + + f"return code = {process.returncode}\n" + process.stderr.decode() + "\n\n and log:\n" + process.stdout.decode() From 14db39442f044471356b76044ab5a1661414cb5c Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 16 Oct 2023 10:20:31 +0200 Subject: [PATCH 08/10] Augment test timeout to 35mn --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 750bac4dec3..1fcef2a0ccd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -91,7 +91,7 @@ jobs: tests: name: "Tests" needs: setup - timeout-minutes: 30 + timeout-minutes: 35 runs-on: ${{ matrix.os }} strategy: fail-fast: false From 539edce9f15ee7a38baa2e5d3cf25ee0845af02a Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:48:25 +0200 Subject: [PATCH 09/10] Fix gltf (#1213) * Only run gltf example * Remove superfluous prints * Raise on stderr * Fix path expansion * Final fix for create_sites_for_python_operators.ps1 * Revert "Remove superfluous prints" This reverts commit fb81e4a52e74b76f9fe5464f883135154e9deffb. * Revert "Only run gltf example" This reverts commit df37386371d3d8df6e54793ddb4061a36f0ee780. --- docs/source/user_guide/create_sites_for_python_operators.ps1 | 2 +- .../02-python_operators_with_dependencies.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/user_guide/create_sites_for_python_operators.ps1 b/docs/source/user_guide/create_sites_for_python_operators.ps1 index a0198fb2ab3..86ada6f0439 100644 --- a/docs/source/user_guide/create_sites_for_python_operators.ps1 +++ b/docs/source/user_guide/create_sites_for_python_operators.ps1 @@ -6,7 +6,7 @@ Write-Host "-pythonexe" $pythonexe Write-Host "-tempfolder" $tempfolder # Expand shortcut in path -$tempfolder = Resolve-Path -Path $tempfolder +$tempfolder = Resolve-Path -Path $tempfolder -Relative Write-Host "make venv" Start-Process $pythonexe -ArgumentList ("-m venv "+ $tempfolder+"\venv") -NoNewWindow -Wait diff --git a/examples/08-python-operators/02-python_operators_with_dependencies.py b/examples/08-python-operators/02-python_operators_with_dependencies.py index f1a22ac62e9..720de18daf9 100644 --- a/examples/08-python-operators/02-python_operators_with_dependencies.py +++ b/examples/08-python-operators/02-python_operators_with_dependencies.py @@ -149,7 +149,7 @@ import subprocess process = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if process.returncode != 0 and process.stderr: + if process.stderr: raise RuntimeError( "Installing pygltf in a virtual environment failed with error:\n" + f"return code = {process.returncode}\n" From 677a2b870a08f35aa9533978d8be80fb2b0864de Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:10:42 +0200 Subject: [PATCH 10/10] Ci/update supported python fix gltf2 (#1215) * Only run gltf example * Remove superfluous prints * Run docs * Fix create_sites_for_python_operators.ps1 * Fix create_sites_for_python_operators.ps1 * Fix create_sites_for_python_operators.ps1 * Fix create_sites_for_python_operators.ps1 * Revert "Remove superfluous prints" This reverts commit 6f2018117c57bfc6dfe5db6ded9c1e7e6cda9ddd. * Revert "Only run gltf example" This reverts commit 1b32b576 * Fix create_sites_for_python_operators.ps1 --- .github/workflows/ci.yml | 2 +- docs/source/user_guide/create_sites_for_python_operators.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e87cf8506d..a627f0ed233 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,7 +137,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} doc-artifact-name: HTML-doc-ansys-dpf-core.zip decompress-artifact: true - + doc-index-dev: name: "Deploy dev index docs" runs-on: ubuntu-latest diff --git a/docs/source/user_guide/create_sites_for_python_operators.ps1 b/docs/source/user_guide/create_sites_for_python_operators.ps1 index 86ada6f0439..5c6fbb7358c 100644 --- a/docs/source/user_guide/create_sites_for_python_operators.ps1 +++ b/docs/source/user_guide/create_sites_for_python_operators.ps1 @@ -6,7 +6,7 @@ Write-Host "-pythonexe" $pythonexe Write-Host "-tempfolder" $tempfolder # Expand shortcut in path -$tempfolder = Resolve-Path -Path $tempfolder -Relative +$tempfolder = (Get-Item -LiteralPath $tempfolder).FullName Write-Host "make venv" Start-Process $pythonexe -ArgumentList ("-m venv "+ $tempfolder+"\venv") -NoNewWindow -Wait