Skip to content

Commit

Permalink
Make envmodules_configfile names consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
percyfal committed Jan 10, 2025
1 parent a1a2c7d commit b1ed508
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/nbis/snakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ def directory_callback(
)


def envmodules_config_option(
def envmodules_configfile_option(
default: str = None,
envmodules_config: str = "envmodules.yaml",
envmodules_configfile: str = "envmodules.yaml",
expose_value: bool = True,
) -> Callable[[FC], FC]:
"""Add snakemake envmodules yaml config file option."""

def envmodules_config_callback(
def envmodules_configfile_callback(
ctx: click.core.Context, # pylint: disable=unused-argument
param: click.core.Option, # pylint: disable=unused-argument
value: str,
Expand All @@ -284,9 +284,9 @@ def envmodules_config_callback(
except AttributeError:
value = None
if value is not None:
configfile = Path(value) / envmodules_config
configfile = Path(value) / envmodules_configfile
else:
configfile = Path(envmodules_config)
configfile = Path(envmodules_configfile)
if not configfile.exists():
logger.warning("envmodules config file %s does not exist", configfile)
return []
Expand All @@ -296,7 +296,7 @@ def envmodules_config_callback(
"--envmodules-configfile",
help=("Specify environment modules configuration file."),
default=default,
callback=envmodules_config_callback,
callback=envmodules_configfile_callback,
expose_value=expose_value,
type=click.Path(exists=True, file_okay=True, dir_okay=False),
)
Expand Down

0 comments on commit b1ed508

Please sign in to comment.