Skip to content

mns

Module naming scheme API.

Authors:

  • Jens Timmerman (Ghent University)
  • Kenneth Hoste (Ghent University)

ModuleNamingScheme

Bases: BaseModuleNamingScheme

Abstract class for a module naming scheme implementation.

__init__(*args, **kwargs)

Initialize logger.

det_full_module_name(ec)

Determine full module name, relative to the top of the module path.

PARAMETER DESCRIPTION
ec

dict-like object with easyconfig parameter values; for now only the 'name', 'version', 'versionsuffix' and 'toolchain' parameters are guaranteed to be available

RETURNS DESCRIPTION

string with full module name, e.g.: '///'

det_init_modulepaths(ec)

Determine initial module paths, where the modules that are top of the hierarchy (if any) live.

det_install_subdir(ec)

Determine name of software installation subdirectory of install path.

PARAMETER DESCRIPTION
ec

dict-like object with easyconfig parameter values; for now only the 'name', 'version', 'versionsuffix' and 'toolchain' parameters are guaranteed to be available

RETURNS DESCRIPTION

string with name of subdirectory, e.g.: '///'

det_make_devel_module()

Determine if a devel module should be generated. Can be used to create a separate set of modules with a different naming scheme. Software is already installed beforehand with one naming scheme, including development module.

det_modpath_extensions(ec)

Determine list of subdirectories for which to extend $MODULEPATH with when this module is loaded (if any).

PARAMETER DESCRIPTION
ec

dict-like object with easyconfig parameter values; for now only the 'name', 'version', 'versionsuffix' and 'toolchain' parameters are guaranteed to be available

RETURNS DESCRIPTION

A list of $MODULEPATH subdirectories.

det_module_subdir(ec)

Determine subdirectory for module file in $MODULEPATH. This determines the separation between module names exposed to users, and what's part of the $MODULEPATH.

PARAMETER DESCRIPTION
ec

dict-like object with easyconfig parameter values; for now only the 'name', 'version', 'versionsuffix' and 'toolchain' parameters are guaranteed to be available

RETURNS DESCRIPTION

string with subdir path (relative to $MODULEPATH), e.g. '/'

Determine list of paths in which symlinks to module files must be created.

det_short_module_name(ec)

Determine short module name, i.e. the name under which modules will be exposed to users.

PARAMETER DESCRIPTION
ec

dict-like object with easyconfig parameter values; for now only the 'name', 'version', 'versionsuffix' and 'toolchain' parameters are guaranteed to be available

RETURNS DESCRIPTION

string with module name, e.g. '/'

det_user_modpath_extensions(ec)

Determine list of subdirectories relative to the user-specific modules directory for which to extend $MODULEPATH with when this module is loaded (if any).

PARAMETER DESCRIPTION
ec

dict-like object with easyconfig parameter values; for now only the 'name', 'version', 'versionsuffix' and 'toolchain' parameters are guaranteed to be available

RETURNS DESCRIPTION

A list of $MODULEPATH subdirectories.

expand_toolchain_load(ec=None)

Determine whether load statements for a toolchain should be expanded to load statements for its dependencies. This is useful when toolchains are not exposed to users.

is_short_modname_for(short_modname, name)

Determine whether the specified (short) module name is a module for software with the specified name. Default implementation checks via a strict regex pattern, and assumes short module names are of the form: /[-]

is_sufficient(keys)

Determine whether specified list of easyconfig parameters is sufficient for this module naming scheme.

requires_toolchain_details()

Determine whether toolchain details are required by this module naming scheme, e.g. whether one of det_toolchain_* functions are relied upon.