Skip to content

Run 08-python-operators examples on Linux #907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/run_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
170 changes: 85 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down