diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e2dd3bd0c4..baf28f9f425 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: runs-on: [self-hosted, pyfluent] env: DOC_DEPLOYMENT_IMAGE_TAG: v24.2.0 - PYFLUENT_CONTAINER_MOUNT_SOURCE: "/home/ansys/Documents/ansys_fluent_core_examples" + PYFLUENT_CONTAINER_MOUNT_SOURCE: "/home/ansys/Downloads/ansys_fluent_core_examples" steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/doc-build-dev-nightly.yml b/.github/workflows/doc-build-dev-nightly.yml index f1de3ca4f42..f9b3790088a 100644 --- a/.github/workflows/doc-build-dev-nightly.yml +++ b/.github/workflows/doc-build-dev-nightly.yml @@ -15,7 +15,7 @@ env: PYFLUENT_WATCHDOG_DEBUG: 'OFF' PYFLUENT_HIDE_LOG_SECRETS: 1 PYFLUENT_SKIP_API_UPGRADE_ADVICE: 1 - PYFLUENT_CONTAINER_MOUNT_SOURCE: "/home/ansys/Documents/ansys_fluent_core_examples" + PYFLUENT_CONTAINER_MOUNT_SOURCE: "/home/ansys/Downloads/ansys_fluent_core_examples" jobs: build_dev_docs: diff --git a/.github/workflows/doc-build-release.yml b/.github/workflows/doc-build-release.yml index e12beb43597..7b807334e5c 100644 --- a/.github/workflows/doc-build-release.yml +++ b/.github/workflows/doc-build-release.yml @@ -17,7 +17,7 @@ env: PYFLUENT_WATCHDOG_DEBUG: 'OFF' PYFLUENT_HIDE_LOG_SECRETS: 1 PYFLUENT_SKIP_API_UPGRADE_ADVICE: 1 - PYFLUENT_CONTAINER_MOUNT_SOURCE: "/home/ansys/Documents/ansys_fluent_core_examples" + PYFLUENT_CONTAINER_MOUNT_SOURCE: "/home/ansys/Downloads/ansys_fluent_core_examples" jobs: build_release_docs: diff --git a/.github/workflows/test-run-custom.yml b/.github/workflows/test-run-custom.yml index 693307c8ddc..05e6e1368bb 100644 --- a/.github/workflows/test-run-custom.yml +++ b/.github/workflows/test-run-custom.yml @@ -103,7 +103,7 @@ jobs: - name: Unit Testing run: | echo "Running custom unittest" - sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* make install-test poetry python -m pytest -v --no-cov --capture=no -k test_parametric_workflow --nightly env: diff --git a/Makefile b/Makefile index 939698dc887..da8ad824ce6 100644 --- a/Makefile +++ b/Makefile @@ -30,97 +30,97 @@ unittest: unittest-dev-242 unittest-dev-222: @echo "Running unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --fluent-version=22.2 $(PYTESTEXTRA) || poetry run python -m pytest --fluent-version=22.2 $(PYTESTRERUN) unittest-dev-231: @echo "Running unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --fluent-version=23.1 $(PYTESTEXTRA) || poetry run python -m pytest --fluent-version=23.1 $(PYTESTRERUN) unittest-dev-232: @echo "Running unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --fluent-version=23.2 $(PYTESTEXTRA) || poetry run python -m pytest --fluent-version=23.2 $(PYTESTRERUN) unittest-dev-241: @echo "Running unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --fluent-version=24.1 $(PYTESTEXTRA) || poetry run python -m pytest --fluent-version=24.1 $(PYTESTRERUN) unittest-dev-242: @echo "Running unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --fluent-version=24.2 $(PYTESTEXTRA) || poetry run python -m pytest --fluent-version=24.2 $(PYTESTRERUN) unittest-dev-251: @echo "Running unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --fluent-version=25.1 $(PYTESTEXTRA) || poetry run python -m pytest --fluent-version=25.1 $(PYTESTRERUN) unittest-all-222: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=22.2 $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=22.2 $(PYTESTRERUN) unittest-all-222-no-codegen: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=22.2 -m "not codegen_required" $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=22.2 -m "not codegen_required" $(PYTESTRERUN) unittest-all-231: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=23.1 $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=23.1 $(PYTESTRERUN) unittest-all-231-no-codegen: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=23.1 -m "not codegen_required" $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=23.1 -m "not codegen_required" $(PYTESTRERUN) unittest-all-232: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=23.2 $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=23.2 $(PYTESTRERUN) unittest-all-232-no-codegen: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=23.2 -m "not codegen_required" $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=23.2 -m "not codegen_required" $(PYTESTRERUN) unittest-all-241: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=24.1 $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=24.1 $(PYTESTRERUN) unittest-all-241-no-codegen: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=24.1 -m "not codegen_required" $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=24.1 -m "not codegen_required" $(PYTESTRERUN) unittest-all-242: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=24.2 $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=24.2 $(PYTESTRERUN) unittest-all-242-no-codegen: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=24.2 -m "not codegen_required" $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=24.2 -m "not codegen_required" $(PYTESTRERUN) unittest-all-251: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=25.1 $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=25.1 $(PYTESTRERUN) unittest-solvermode-251: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --fluent-version=25.1 --solvermode $(PYTESTEXTRA) || poetry run python -m pytest --fluent-version=25.1 --solvermode $(PYTESTRERUN) unittest-all-251-no-codegen: @echo "Running all unittests" - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @poetry run python -m pytest --nightly --fluent-version=25.1 -m "not codegen_required" $(PYTESTEXTRA) || poetry run python -m pytest --nightly --fluent-version=25.1 -m "not codegen_required" $(PYTESTRERUN) api-codegen: @@ -137,7 +137,7 @@ build-doc-source: @sudo rm -rf doc/source/api/solver/datamodel @sudo rm -rf doc/source/api/solver/tui @sudo rm -rf doc/source/api/solver/_autosummary/settings - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @xvfb-run poetry run -- make -C doc html build-all-docs: @@ -145,9 +145,9 @@ build-all-docs: @python doc/datamodel_rstgen.py @python doc/tui_rstgen.py @python doc/settings_rstgen.py - @sudo rm -rf /home/ansys/Documents/ansys_fluent_core_examples/* + @sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* @xvfb-run poetry run -- make -C doc html - @python doc/modify_html.py + @poetry run python doc/modify_html.py compare-flobject: @python .ci/compare_flobject.py diff --git a/src/ansys/fluent/core/utils/__init__.py b/src/ansys/fluent/core/utils/__init__.py index 50d80a95fff..7c98f70737f 100644 --- a/src/ansys/fluent/core/utils/__init__.py +++ b/src/ansys/fluent/core/utils/__init__.py @@ -23,8 +23,7 @@ def load_module(module_name, file_path): def get_examples_download_dir(): """Return the path to the examples download directory.""" parent_path = Path.home() / "Downloads" - if not parent_path.exists(): - parent_path = Path.home() + parent_path.mkdir(exist_ok=True) return parent_path / "ansys_fluent_core_examples"