Skip to content

Commit

Permalink
sys.path via conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
ankona committed Oct 31, 2024
1 parent 8991282 commit 275a5f5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ jobs:
fail-fast: false
matrix:
subset: [dragon]
os: [macos-12, macos-14, ubuntu-22.04] # Operating systems
os: [ubuntu-22.04] # Operating systems
compiler: [8] # GNU compiler version
rai: [1.2.7] # Redis AI versions
py_v: ["3.9", "3.10", "3.11"] # Python versions
exclude:
- os: macos-14
py_v: "3.9"
# exclude:
# - os: macos-14
# py_v: "3.9"

steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 11 additions & 5 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
import typing as t
import uuid
import warnings
from glob import glob
from os import path as osp
from collections import defaultdict
from dataclasses import dataclass
from glob import glob
from os import path as osp
from subprocess import run

import psutil
Expand All @@ -53,15 +53,21 @@
from smartsim import Experiment
from smartsim._core.config import CONFIG
from smartsim._core.config.config import Config
from smartsim._core.generation.generator import Generator
from smartsim._core.generation.operations.operations import (
ConfigureOperation,
CopyOperation,
SymlinkOperation,
)
from smartsim._core.launcher.dragon.dragon_connector import DragonConnector
from smartsim._core.launcher.dragon.dragon_launcher import DragonLauncher
from smartsim._core.generation.operations.operations import ConfigureOperation, CopyOperation, SymlinkOperation
from smartsim._core.generation.generator import Generator
from smartsim._core.utils.telemetry.telemetry import JobEntity
from smartsim.database import FeatureStore
from smartsim.entity import Application
from smartsim.error import SSConfigError, SSInternalError
from smartsim.log import get_logger


# Mock imports
class AprunSettings: pass
class DragonRunSettings: pass
Expand All @@ -73,6 +79,7 @@ class RunSettings: pass
class SrunSettings: pass

logger = get_logger(__name__)
sys.path.insert(0, os.path.abspath("."))

# pylint: disable=redefined-outer-name,invalid-name,global-statement

Expand Down Expand Up @@ -1000,7 +1007,6 @@ def local_fs() -> t.Generator[DBConfiguration, None, None]:
_cleanup_fs(name)



@pytest.fixture(scope="session")
def single_fs(wlmutils: WLMUtils) -> t.Generator[DBConfiguration, None, None]:
hostlist = wlmutils.get_test_hostlist()
Expand Down

0 comments on commit 275a5f5

Please sign in to comment.