Skip to content

Commit

Permalink
bump ansys version, change install path error handling and nightly bu…
Browse files Browse the repository at this point in the history
…ild times (#189)
  • Loading branch information
viseshrp authored Nov 22, 2024
1 parent 9474f85 commit 35c7b6c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly-docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Nightly Documentation Build

on:
schedule: # UTC at 0400 - 12am EDT
- cron: '0 4 * * *'
schedule: # UTC at 23:00 = 7pm EDT
- cron: '0 23 * * *'
workflow_dispatch:

env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Nightly Build and Test

on:
schedule: # UTC at 0300 = 11pm EDT
- cron: '0 3 * * *'
schedule: # UTC at 22:00 = 6pm EDT
- cron: '0 22 * * *'
workflow_dispatch:

env:
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/dynamicreporting/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
__version__ = importlib_metadata.version(__name__.replace(".", "-"))

VERSION = __version__
DEFAULT_ANSYS_VERSION = "251"
DEFAULT_ANSYS_VERSION = "252"

ansys_version = "2025R1"
ansys_version = "2025R2"

# Ansys version number that this release is associated with
__ansys_version__ = DEFAULT_ANSYS_VERSION
Expand Down
15 changes: 9 additions & 6 deletions src/ansys/dynamicreporting/core/serverless/adr.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ def _get_install_directory(self, ansys_installation: str) -> Path:
if launch_file.exists():
return install_dir

raise InvalidAnsysPath(f"Unable to detect an installation in: {','.join(dirs_to_check)}")
raise InvalidAnsysPath(
f"Unable to detect an installation in: {[str(d) for d in dirs_to_check]}"
)

def _check_dir(self, dir_):
dir_path = Path(dir_) if not isinstance(dir_, Path) else dir_
Expand Down Expand Up @@ -174,13 +176,14 @@ def setup(self, collect_static: bool = False) -> None:
if settings.configured:
raise RuntimeError("ADR has already been configured. setup() can be called only once.")

# import hack
try:
# import hack
sys.path.append(
str(self._ansys_installation / f"nexus{self._ansys_version}" / "django")
)
adr_path = (
self._ansys_installation / f"nexus{self._ansys_version}" / "django"
).resolve(strict=True)
sys.path.append(str(adr_path))
from ceireports import settings_serverless
except ImportError as e:
except (ImportError, OSError) as e:
raise ImportError(f"Failed to import from the Ansys installation: {e}")

overrides = {}
Expand Down
1 change: 0 additions & 1 deletion src/ansys/dynamicreporting/core/serverless/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import shlex
from typing import Any, get_args, get_origin
import uuid
from uuid import UUID

from django.core.exceptions import (
FieldDoesNotExist,
Expand Down

0 comments on commit 35c7b6c

Please sign in to comment.