Skip to content

Commit

Permalink
Merge pull request #328 from wanghy-anl/devel
Browse files Browse the repository at this point in the history
Need to find a better way to specify "farm_loc"
  • Loading branch information
dylanjm authored Jan 24, 2024
2 parents 5e830ee + aa0cacc commit af68aed
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/validators/Factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
# set up path of raven
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import _utils as hutils
# try:
# import FARM.src
# farm_loc = FARM.__path__
# except ModuleNotFoundError:
try:
import FARM.src
farm_loc = FARM.__path__
raven_path = hutils.get_raven_loc()

# set up path of farm
farm_loc = hutils.get_farm_loc(raven_path=raven_path)

if farm_loc is not None:
farm_path = os.path.abspath(os.path.join(farm_loc))
sys.path.append(farm_path)
except ModuleNotFoundError:
try:
raven_path = hutils.get_raven_loc()

# set up path of farm
farm_loc = hutils.get_farm_loc(raven_path=raven_path)

if farm_loc is not None:
farm_path = os.path.abspath(os.path.join(farm_loc))
sys.path.append(farm_path)
except ModuleNotFoundError:
farm_loc = None
except OSError:
farm_loc = None
farm_loc = None
except OSError:
farm_loc = None

if farm_loc is not None:
from FARM.src.FARMValidatorsForHeron import FARM_SISO, FARM_MIMO
Expand Down

0 comments on commit af68aed

Please sign in to comment.