Skip to content

Commit

Permalink
Add /OMERO as a middle configuration path as well. Generally shared
Browse files Browse the repository at this point in the history
  • Loading branch information
TorecLuik committed Jan 29, 2025
1 parent 19b9aec commit a5c9d91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion biomero/slurm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ class SlurmClient(Connection):
"""
_DEFAULT_CONFIG_PATH_1 = "/etc/slurm-config.ini"
_DEFAULT_CONFIG_PATH_2 = "~/slurm-config.ini"
_DEFAULT_CONFIG_PATH_2 = "/OMERO/slurm-config.ini"
_DEFAULT_CONFIG_PATH_3 = "~/slurm-config.ini"
_DEFAULT_HOST = "slurm"
_DEFAULT_INLINE_SSH_ENV = True
_DEFAULT_SLURM_DATA_PATH = "my-scratch/data"
Expand Down Expand Up @@ -891,6 +892,7 @@ def from_config(cls, configfile: str = '',
# Loads from default locations and given location, missing files are ok
configs.read([os.path.expanduser(cls._DEFAULT_CONFIG_PATH_1),
os.path.expanduser(cls._DEFAULT_CONFIG_PATH_2),
os.path.expanduser(cls._DEFAULT_CONFIG_PATH_3),
os.path.expanduser(configfile)])

# Read the required parameters from the configuration file,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_slurm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@ def items_side_effect(section):
mock_configparser_instance.read.assert_called_once_with([
os.path.expanduser(SlurmClient._DEFAULT_CONFIG_PATH_1),
os.path.expanduser(SlurmClient._DEFAULT_CONFIG_PATH_2),
os.path.expanduser(SlurmClient._DEFAULT_CONFIG_PATH_3),
os.path.expanduser(configfile)
])
mock_SlurmClient.assert_called_with(
Expand Down

0 comments on commit a5c9d91

Please sign in to comment.