Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/requirements/sphinx-7.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
PProfizi authored Sep 18, 2024
2 parents b2c6d46 + 18bc120 commit 49e21b2
Show file tree
Hide file tree
Showing 374 changed files with 21,758 additions and 1,682 deletions.
25 changes: 17 additions & 8 deletions .ci/update_dpf_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Script to update ansys-dpf-gate, ansys-dpf-gatebin and ansys-grpc-dpf based on repositories
"""Script to update ansys.dpf.gate.generated, ansys.dpf.gatebin and ansys.grpc.dpf.
This script should only be used to quickly test changes to any of these dependencies.
Actual commit of updated code should not occur.
Expand All @@ -12,6 +12,7 @@
It will update the current repo
or the repo defined by the environment variable "ANSYSDPFCORE_ROOT" if it exists.
"""

import os
import glob
import pathlib
Expand Down Expand Up @@ -45,24 +46,32 @@
file,
path=destination,
)
print("Done updating ansys-grpc-dpf")
print("Done updating ansys.grpc.dpf")
else:
print(f"{grpc_path_key} environment variable is not defined. " "Cannot update ansys-grpc-dpf.")

if gate_path is not None:
# Update ansys-dpf-gate
print("Updating ansys.dpf.gate")
dist_path = os.path.join(gate_path, "ansys-dpf-gate", "ansys")
print("Updating ansys.dpf.gate generated code")
dist_path = os.path.join(gate_path, "ansys-dpf-gate", "ansys", "dpf", "gate", "generated")
print(f"from {dist_path}")
destination = os.path.join(core_path, "src", "ansys")
destination = os.path.join(core_path, "src", "ansys", "dpf", "gate", "generated")
print(f"into {destination}")
shutil.copytree(
src=dist_path,
dst=destination,
dirs_exist_ok=True,
ignore=lambda directory, contents: ["__pycache__"] if directory[-5:] == "gate" else [],
)
print("Done updating ansys-dpf-gate")
dist_path = os.path.join(gate_path, "ansys-dpf-gate", "ansys", "dpf", "gate", "__init__.py")
print(f"from {dist_path}")
destination = os.path.join(core_path, "src", "ansys", "dpf", "gate", "__init__.py")
print(f"into {destination}")
shutil.copy(
src=dist_path,
dst=destination,
)
print("Done updating ansys.dpf.gate generated code")

# Update ansys-dpf-gatebin
print("Updating ansys.dpf.gatebin")
Expand All @@ -75,9 +84,9 @@
dst=destination,
dirs_exist_ok=True,
)
print(f"Done updating ansys-dpf-gatebin for {platform.system()}")
print(f"Done updating ansys.dpf.gatebin for {platform.system()}")
else:
print(
f"{gate_path_key} environment variable is not defined. "
"Cannot update ansys-dpf-gate or ansys-dpf-gatebin."
"Cannot update ansys.dpf.gate or ansys.dpf.gatebin."
)
9 changes: 0 additions & 9 deletions .flake8

This file was deleted.

3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ body:
label: Which DPF/Ansys version are you using?
multiple: true
options:
- 'DPF Server 2025.1.pre0'
- 'Ansys 2024 R2'
- 'DPF Server 2024.2.pre1'
- 'DPF Server 2024.2.pre0'
- 'Ansys 2024 R1'
Expand Down Expand Up @@ -89,6 +91,7 @@ body:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
validations:
required: true

Expand Down
41 changes: 23 additions & 18 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
changelog:
categories:
- title: Enhancements
labels:
- enhancement
- title: Bug fixes
labels:
- bug
- title: Documentation
labels:
- documentation
- examples
- title: CI/CD
labels:
- CI/CD
- title: Maintenance
labels:
- maintenance
- dependencies
exclude:
authors:
- dependabot[bot]
categories:
- title: Enhancements
labels:
- enhancement
- title: Bug fixes
labels:
- bug
- title: Documentation
labels:
- documentation
- title: Examples
labels:
- examples
- title: CI/CD
labels:
- CI/CD
- title: Maintenance
labels:
- maintenance
- dependencies
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
name: "Style Check"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/code-style@v6
- uses: ansys/actions/code-style@v7
with:
use-python-cache: false

Expand All @@ -98,7 +98,7 @@ jobs:
cd ..
- name: "Upload wheel any as artifact"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.wheel.outputs.wheel_name }}
path: dist/${{ steps.wheel.outputs.wheel_name }}
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
needs: [docs]
steps:
- name: "Upload development documentation"
uses: ansys/actions/doc-deploy-dev@v4
uses: ansys/actions/doc-deploy-dev@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -174,7 +174,7 @@ jobs:
needs: upload-development-docs
steps:
- name: "Deploy the latest documentation index"
uses: ansys/actions/doc-deploy-index@v4
uses: ansys/actions/doc-deploy-index@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev
index-name: pydpf-core-vdev
Expand Down
48 changes: 27 additions & 21 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:
ansys_version:
description: "Ansys version of the standalone."
required: false
default: '242'
default: '251'
standalone_branch_suffix:
description: 'Suffix of the branch on standalone'
required: false
default: '.pre1'
default: '.pre0'

#┌───────────── minute (0 - 59)
#│ ┌───────────── hour (0 - 23)
Expand All @@ -29,7 +29,6 @@ on:

env:
DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com'
MAIN_PYTHON_VERSION: '3.9'

jobs:
debug:
Expand Down Expand Up @@ -69,46 +68,46 @@ jobs:
cd ..
- name: "Upload wheel any as artifact"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.wheel.outputs.wheel_name }}
path: dist/${{ steps.wheel.outputs.wheel_name }}

tests:
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '242' }}
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
python_versions: '["3.9", "3.10", "3.11"]'
wheel: true
wheel: ${{ matrix.python-version == '3.9' }}
wheelhouse: true
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre1' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit

tests_any:
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '242' }}
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
python_versions: '["3.9", "3.10", "3.11"]'
wheel: true
wheel: ${{ matrix.python-version == '3.9' }}
wheelhouse: false
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre1' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
test_any: true
secrets: inherit

docs:
uses: ./.github/workflows/docs.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '242' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre1' }}
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
event_name: ${{ github.event_name }}
secrets: inherit

examples:
uses: ./.github/workflows/examples.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '242' }}
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
python_versions: '["3.9", "3.10", "3.11"]'
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre1' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit

retro_241:
Expand Down Expand Up @@ -148,13 +147,20 @@ jobs:
DOCSTRING: false
secrets: inherit

pydpf-post_251:
name: "PyDPF-Post with 251"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
test_docstrings: "true"
secrets: inherit

pydpf-post_242:
name: "PyDPF-Post with 242"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '242' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre1' }}
test_docstrings: "true"
ANSYS_VERSION: "242"
secrets: inherit

pydpf-post_241:
Expand Down Expand Up @@ -189,17 +195,17 @@ jobs:
name: "Build and Test on Docker"
uses: ./.github/workflows/test_docker.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '242' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre1' }}
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit

docker_examples:
name: "Run examples on Docker"
uses: ./.github/workflows/examples_docker.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '242' }}
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
python_versions: '["3.9", "3.10", "3.11"]'
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre1' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit

draft_release:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Running documentation style checks"
uses: ansys/actions/doc-style@v5.0
uses: ansys/actions/doc-style@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
if: always()

- name: "Upload Documentation Build log"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: doc-${{env.PACKAGE_NAME}}-log
path: doc/*.txt
Expand All @@ -193,7 +193,7 @@ jobs:
if: always()

- name: "Upload HTML Documentation"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: HTML-doc-${{env.PACKAGE_NAME}}.zip
path: HTML-doc-${{env.PACKAGE_NAME}}.zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pydpf-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
run: |
pytest $DEBUG --reruns 2 .
if: always()
timeout-minutes: 20
timeout-minutes: 60

- name: "Kill all servers"
uses: ansys/pydpf-actions/[email protected]
4 changes: 2 additions & 2 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
path: HTML-doc-ansys-dpf-core.zip

- name: "Deploy the stable documentation"
uses: ansys/actions/doc-deploy-stable@v5
uses: ansys/actions/doc-deploy-stable@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV
- name: "Deploy the latest documentation index"
uses: ansys/actions/doc-deploy-index@v5
uses: ansys/actions/doc-deploy-index@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
index-name: pydpf-core-v${{ env.VERSION_MEILI }}
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,15 @@ jobs:
command: |
pytest $DEBUG $COVERAGE $RERUNS --junitxml=tests/junit/test-results9.xml test_service/.
- name: "Test Operators"
uses: nick-fields/retry@v2
with:
timeout_minutes: 3
max_attempts: 2
shell: bash
command: |
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results12.xml tests/operators/.
# - name: "Test API Entry"
# shell: bash
# working-directory: tests
Expand All @@ -205,7 +214,7 @@ jobs:
# timeout-minutes: 10

- name: "Upload Test Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_docker
path: tests/junit/test-results.xml
Expand Down
Loading

0 comments on commit 49e21b2

Please sign in to comment.