osl_ephys.utils.version_utils#

Attributes#

osl_logger

Functions#

_parse_condition(cond)

Parse strings defining conditional statements.

check_version(test_statement[, mode])

Check whether the version of a package meets a specified condition.

Module Contents#

osl_ephys.utils.version_utils.osl_logger = None[source]#
osl_ephys.utils.version_utils._parse_condition(cond)[source]#

Parse strings defining conditional statements.

Borrowed from EMD package

osl_ephys.utils.version_utils.check_version(test_statement, mode='warn')[source]#

Check whether the version of a package meets a specified condition.

Parameters:
  • test_statement (str) – Package version comparison string in the standard format expected by python installs. eg ‘osl-ephys<1.0.0’ or ‘osl-ephys==0.6.dev0’

  • mode ({'warn', 'assert'}) – Flag indicating whether to warn the user or raise an error if the comparison fails