Skip to content

Commit

Permalink
ci: Some changes for the new Downloads path (#3450)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkundu1 authored Nov 5, 2024
1 parent e545db6 commit 4b645d8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-build-dev-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-run-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
44 changes: 22 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -137,17 +137,17 @@ 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:
@python doc/api_rstgen.py
@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
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/fluent/core/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down

0 comments on commit 4b645d8

Please sign in to comment.