neurodocker.reproenv.template module#

Template objects.

class neurodocker.reproenv.template.Template(template: TemplateType, binaries_kwds: Mapping[str, str] | None = None, source_kwds: Mapping[str, str] | None = None)[source]#

Bases: object

Template object.

This class makes it more convenient to work with templates. It also allows one to set keyword arguments for instances of templates. For example, if a template calls for an argument version, this class can be used to hold both the template and the value for version.

Keywords are not validated during initialization. To validate keywords, use the instance method self.binaries.validate_kwds() and`self.source.validate_kwds()`.

Parameters:
  • template (TemplateType) – Dictionary that defines how to install software from pre-compiled binaries and/or from source.

  • binaries_kwds (dict) – Keyword arguments to pass to the binaries section of the template. All keys and values must be strings.

  • source_kwds (dict) – Keyword arguments passed to the source section of the template. All keys and values must be strings.

property alert: str#

Return the template’s alert property. Return an empty string if it does not exist.

property binaries: None | _BinariesTemplate#
property name: str#
property source: None | _SourceTemplate#