Skip to content

Commit

Permalink
add mantid config file
Browse files Browse the repository at this point in the history
  • Loading branch information
MialLewis committed Nov 13, 2023
1 parent 95bc2c8 commit e430772
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions EVSVesuvio/scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Package defining entry points.
"""
import argparse
from os import environ, path
from EVSVesuvio.scripts import handle_config


Expand Down Expand Up @@ -43,6 +44,7 @@ def __setup_config(args):


def __run_analysis():
environ['MANTIDPROPERTIES'] = path.join(handle_config.VESUVIO_CONFIG_PATH, "Mantid.user.properties")
from EVSVesuvio import analysis_runner
analysis_runner.run()

Expand Down
2 changes: 2 additions & 0 deletions EVSVesuvio/scripts/handle_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
VESUVIO_CONFIG_FILE = "vesuvio.user.properties"
VESUVIO_INPUTS_FILE = "analysis_inputs.py"
VESUVIO_PACKAGE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
MANTID_CONFIG_FILE = "Mantid.user.properties"


def __read_config(config_file_path, throw_on_not_found=True):
Expand Down Expand Up @@ -58,6 +59,7 @@ def setup_config_dir(config_dir):
success = __mk_dir('config', config_dir)
if success:
copyfile(os.path.join(VESUVIO_PACKAGE_PATH, "config", VESUVIO_CONFIG_FILE), os.path.join(config_dir, VESUVIO_CONFIG_FILE))
copyfile(os.path.join(VESUVIO_PACKAGE_PATH, "config", MANTID_CONFIG_FILE), os.path.join(config_dir, MANTID_CONFIG_FILE))


def setup_expr_dir(cache_dir, experiment):
Expand Down

0 comments on commit e430772

Please sign in to comment.