Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions reframe/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ class AbstractB(Bar):

:param loggable: Mark this parameter as loggable. If :obj:`True`, this
parameter will become a log record attribute under the name
``check_NAME``, where ``NAME`` is the name of the parameter.
``check_NAME``, where ``NAME`` is the name of the parameter (default:
:obj:`True`)

:returns: A new test parameter.

Expand All @@ -130,10 +131,14 @@ class AbstractB(Bar):

.. versionadded:: 3.11.0
The ``loggable`` argument is added.

.. versionchanged:: 4.5
Parameters are now loggable by default.

'''

def __init__(self, values=None, inherit_params=False,
filter_params=None, fmt=None, loggable=False):
filter_params=None, fmt=None, loggable=True):
if values is None:
values = []

Expand Down
88 changes: 44 additions & 44 deletions reframe/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ def pipeline_hooks(cls):
#:
#: .. versionchanged:: 3.11.0
#: Extend syntax to support features and key/value pairs.
valid_prog_environs = variable(typ.List[typ.Str[_VALID_ENV_SYNTAX]],
loggable=True)
valid_prog_environs = variable(typ.List[typ.Str[_VALID_ENV_SYNTAX]])

#: List of systems or system features or system properties required by this
#: test.
Expand Down Expand Up @@ -300,8 +299,7 @@ def pipeline_hooks(cls):
#:
#: .. versionchanged:: 3.11.0
#: Extend syntax to support features and key/value pairs.
valid_systems = variable(typ.List[typ.Str[_VALID_SYS_SYNTAX]],
loggable=True)
valid_systems = variable(typ.List[typ.Str[_VALID_SYS_SYNTAX]])

#: A detailed description of the test.
#:
Expand All @@ -328,7 +326,7 @@ def pipeline_hooks(cls):
#:
#: :type: :class:`str`
#: :default: ``''``
sourcepath = variable(str, value='', loggable=True)
sourcepath = variable(str, value='')

#: The directory containing the test's resources.
#:
Expand Down Expand Up @@ -358,7 +356,7 @@ def pipeline_hooks(cls):
#: .. versionchanged:: 3.0
#: Default value is now conditionally set to either ``'src'`` or
#: :class:`None`.
sourcesdir = variable(str, type(None), value='src', loggable=True)
sourcesdir = variable(str, type(None), value='src')

#: .. versionadded:: 2.14
#:
Expand All @@ -375,7 +373,8 @@ def pipeline_hooks(cls):
#:
#: :type: :class:`str` or :class:`reframe.core.buildsystems.BuildSystem`.
#: :default: :class:`None`.
build_system = variable(type(None), field=BuildSystemField, value=None)
build_system = variable(type(None), field=BuildSystemField, value=None,
loggable=False)

#: .. versionadded:: 3.0
#:
Expand All @@ -387,7 +386,7 @@ def pipeline_hooks(cls):
#:
#: :type: :class:`List[str]`
#: :default: ``[]``
prebuild_cmds = variable(typ.List[str], value=[], loggable=True)
prebuild_cmds = variable(typ.List[str], value=[])

#: .. versionadded:: 3.0
#:
Expand All @@ -399,7 +398,7 @@ def pipeline_hooks(cls):
#:
#: :type: :class:`List[str]`
#: :default: ``[]``
postbuild_cmds = variable(typ.List[str], value=[], loggable=True)
postbuild_cmds = variable(typ.List[str], value=[])

#: The name of the executable to be launched during the run phase.
#:
Expand All @@ -414,13 +413,13 @@ def pipeline_hooks(cls):
#: .. versionchanged:: 3.7.3
#: Default value changed from ``os.path.join('.', self.unique_name)`` to
#: :class:`required`.
executable = variable(str, loggable=True)
executable = variable(str)

#: List of options to be passed to the :attr:`executable`.
#:
#: :type: :class:`List[str]`
#: :default: ``[]``
executable_opts = variable(typ.List[str], value=[], loggable=True)
executable_opts = variable(typ.List[str], value=[])

#: .. versionadded:: 2.20
#:
Expand Down Expand Up @@ -460,7 +459,7 @@ def pipeline_hooks(cls):
#: This field is now set automatically from the current partition's
#: configuration.
container_platform = variable(field=ContainerPlatformField,
value=_NoRuntime())
value=_NoRuntime(), loggable=False)

#: .. versionadded:: 3.0
#:
Expand All @@ -472,7 +471,7 @@ def pipeline_hooks(cls):
#:
#: :type: :class:`List[str]`
#: :default: ``[]``
prerun_cmds = variable(typ.List[str], value=[], loggable=True)
prerun_cmds = variable(typ.List[str], value=[])

#: .. versionadded:: 3.0
#:
Expand All @@ -483,7 +482,7 @@ def pipeline_hooks(cls):
#:
#: :type: :class:`List[str]`
#: :default: ``[]``
postrun_cmds = variable(typ.List[str], value=[], loggable=True)
postrun_cmds = variable(typ.List[str], value=[])

#: List of files to be kept after the test finishes.
#:
Expand All @@ -503,7 +502,7 @@ def pipeline_hooks(cls):
#: .. versionchanged:: 3.3
#: This field accepts now also file glob patterns.
#:
keep_files = variable(typ.List[str], value=[], loggable=True)
keep_files = variable(typ.List[str], value=[])

#: List of files or directories (relative to the :attr:`sourcesdir`) that
#: will be symlinked in the stage directory and not copied.
Expand All @@ -513,23 +512,23 @@ def pipeline_hooks(cls):
#:
#: :type: :class:`List[str]`
#: :default: ``[]``
readonly_files = variable(typ.List[str], value=[], loggable=True)
readonly_files = variable(typ.List[str], value=[])

#: Set of tags associated with this test.
#:
#: This test can be selected from the frontend using any of these tags.
#:
#: :type: :class:`Set[str]`
#: :default: an empty set
tags = variable(typ.Set[str], value=set(), loggable=True)
tags = variable(typ.Set[str], value=set())

#: List of people responsible for this test.
#:
#: When the test fails, this contact list will be printed out.
#:
#: :type: :class:`List[str]`
#: :default: ``[]``
maintainers = variable(typ.List[str], value=[], loggable=True)
maintainers = variable(typ.List[str], value=[])

#: Mark this test as a strict performance test.
#:
Expand All @@ -539,7 +538,7 @@ def pipeline_hooks(cls):
#:
#: :type: boolean
#: :default: :class:`True`
strict_check = variable(typ.Bool, value=True, loggable=True)
strict_check = variable(typ.Bool, value=True)

#: Number of tasks required by this test.
#:
Expand Down Expand Up @@ -582,15 +581,15 @@ def pipeline_hooks(cls):
#: number of required tasks by the test.
#: .. versionchanged:: 4.1
#: Allow :attr:`num_tasks` to be :obj:`None`.
num_tasks = variable(int, type(None), value=1, loggable=True)
num_tasks = variable(int, type(None), value=1)

#: Number of tasks per node required by this test.
#:
#: Ignored if :class:`None`.
#:
#: :type: integral or :class:`None`
#: :default: :class:`None`
num_tasks_per_node = variable(int, type(None), value=None, loggable=True)
num_tasks_per_node = variable(int, type(None), value=None)

#: Number of GPUs per node required by this test.
#: This attribute is translated internally to the ``_rfm_gpu`` resource.
Expand All @@ -602,40 +601,39 @@ def pipeline_hooks(cls):
#:
#: .. versionchanged:: 4.0.0
#: The default value changed to :const:`None`.
num_gpus_per_node = variable(int, type(None), value=None, loggable=True)
num_gpus_per_node = variable(int, type(None), value=None)

#: Number of CPUs per task required by this test.
#:
#: Ignored if :class:`None`.
#:
#: :type: integral or :class:`None`
#: :default: :class:`None`
num_cpus_per_task = variable(int, type(None), value=None, loggable=True)
num_cpus_per_task = variable(int, type(None), value=None)

#: Number of tasks per core required by this test.
#:
#: Ignored if :class:`None`.
#:
#: :type: integral or :class:`None`
#: :default: :class:`None`
num_tasks_per_core = variable(int, type(None), value=None, loggable=True)
num_tasks_per_core = variable(int, type(None), value=None)

#: Number of tasks per socket required by this test.
#:
#: Ignored if :class:`None`.
#:
#: :type: integral or :class:`None`
#: :default: :class:`None`
num_tasks_per_socket = variable(int, type(None), value=None, loggable=True)
num_tasks_per_socket = variable(int, type(None), value=None)

#: Specify whether this tests needs simultaneous multithreading enabled.
#:
#: Ignored if :class:`None`.
#:
#: :type: boolean or :class:`None`
#: :default: :class:`None`
use_multithreading = variable(
typ.Bool, type(None), value=None, loggable=True)
use_multithreading = variable(typ.Bool, type(None), value=None)

#: .. versionadded:: 3.0
#:
Expand All @@ -646,19 +644,19 @@ def pipeline_hooks(cls):
#: :type: :class:`str` or :class:`datetime.timedelta`
#: :default: :class:`None`
max_pending_time = variable(type(None), typ.Duration, value=None,
loggable=True, allow_implicit=True)
allow_implicit=True)

#: Specify whether this test needs exclusive access to nodes.
#:
#: :type: boolean
#: :default: :class:`False`
exclusive_access = variable(typ.Bool, value=False, loggable=True)
exclusive_access = variable(typ.Bool, value=False)

#: Always execute this test locally.
#:
#: :type: boolean
#: :default: :class:`False`
local = variable(typ.Bool, value=False, loggable=True)
local = variable(typ.Bool, value=False)

#: The set of reference values for this test.
#:
Expand Down Expand Up @@ -721,7 +719,7 @@ def pipeline_hooks(cls):
typ.Tuple[~Deferrable, ~Deferrable, ~Deferrable],
typ.Dict[str, typ.Dict[str, typ.Tuple[~Deferrable, ~Deferrable,
~Deferrable, ~Deferrable]]],
field=fields.ScopedDictField, value={}
field=fields.ScopedDictField, value={}, loggable=False
)

#: Require that a reference is defined for each system that this test is
Expand All @@ -734,7 +732,7 @@ def pipeline_hooks(cls):
#: :default: :const:`False`
#:
#: .. versionadded:: 4.0.0
require_reference = variable(typ.Bool, value=False)
require_reference = variable(typ.Bool, value=False, loggable=False)

#:
#: Refer to the :doc:`ReFrame Tutorials </tutorials>` for concrete usage
Expand All @@ -761,7 +759,7 @@ def pipeline_hooks(cls):
#:
#: .. versionchanged:: 3.6
#: The default value has changed from ``None`` to ``required``.
sanity_patterns = variable(_DeferredExpression)
sanity_patterns = variable(_DeferredExpression, loggable=False)

#: Patterns for verifying the performance of this test.
#:
Expand All @@ -780,7 +778,8 @@ def pipeline_hooks(cls):
#: <reframe.core.builtins.performance_function>` builtin or the
#: :attr:`perf_variables`, as :attr:`perf_patterns` will likely be
#: deprecated in the future.
perf_patterns = variable(typ.Dict[str, _DeferredExpression], type(None))
perf_patterns = variable(typ.Dict[str, _DeferredExpression], type(None),
loggable=False)

#: The performance variables associated with the test.
#:
Expand Down Expand Up @@ -816,7 +815,7 @@ def pipeline_hooks(cls):
#:
#: .. versionadded:: 3.8.0
perf_variables = variable(typ.Dict[str, _DeferredPerformanceExpression],
value={})
value={}, loggable=False)

#: List of modules to be loaded before running this test.
#:
Expand All @@ -825,7 +824,7 @@ def pipeline_hooks(cls):
#: :type: :class:`List[str]` or :class:`Dict[str, object]`
#: :default: ``[]``
modules = variable(typ.List[str], typ.List[typ.Dict[str, object]],
value=[], loggable=True)
value=[])

#: Environment variables to be set before running this test.
#:
Expand All @@ -837,7 +836,7 @@ def pipeline_hooks(cls):
#:
#: .. versionadded:: 4.0.0
env_vars = variable(typ.Dict[str, str],
typ.Dict[str, object], value={}, loggable=True)
typ.Dict[str, object], value={})
# NOTE: We still keep the original type, just to allow setting this
# variable from the command line, because otherwise, ReFrame will not know
# how to convert a value to an arbitrary object.
Expand All @@ -848,7 +847,7 @@ def pipeline_hooks(cls):
#:
#: .. deprecated:: 4.0.0
#: Please use :attr:`env_vars` instead.
variables = deprecate(variable(alias=env_vars, loggable=True),
variables = deprecate(variable(alias=env_vars),
f"the use of 'variables' is deprecated; "
f"please use 'env_vars' instead")

Expand Down Expand Up @@ -880,7 +879,7 @@ def pipeline_hooks(cls):
#: The default value is now :class:`None` and it can be set globally
#: per partition via the configuration.
time_limit = variable(type(None), typ.Duration, value=None,
loggable=True, allow_implicit=True)
allow_implicit=True)

#: .. versionadded:: 3.5.1
#:
Expand All @@ -891,7 +890,7 @@ def pipeline_hooks(cls):
#: :type: :class:`str` or :class:`float` or :class:`int`
#: :default: :class:`None`
build_time_limit = variable(type(None), typ.Duration, value=None,
loggable=True, allow_implicit=True)
allow_implicit=True)

#: .. versionadded:: 2.8
#:
Expand Down Expand Up @@ -964,7 +963,7 @@ def pipeline_hooks(cls):
#: A new more powerful syntax was introduced
#: that allows also custom job script directive prefixes.
extra_resources = variable(typ.Dict[str, typ.Dict[str, object]],
value={}, loggable=True)
value={})

#: .. versionadded:: 3.3
#:
Expand All @@ -980,7 +979,7 @@ def pipeline_hooks(cls):
#:
#: :type: boolean
#: :default: :class:`True`
build_locally = variable(typ.Bool, value=True, loggable=True)
build_locally = variable(typ.Bool, value=True)

#: .. versionadded:: 4.2
#:
Expand All @@ -1003,12 +1002,13 @@ def pipeline_hooks(cls):
#:
#: :type: :class:`dict`
#: :default: ``{}``
ci_extras = variable(typ.Dict[typ.Str['gitlab'], object], value={})
ci_extras = variable(typ.Dict[typ.Str['gitlab'], object], value={},
loggable=False)

# Special variables

#: Dry-run mode
_rfm_dry_run = variable(typ.Bool, value=False)
_rfm_dry_run = variable(typ.Bool, value=False, loggable=False)

def __new__(cls, *args, **kwargs):
obj = super().__new__(cls)
Expand Down
Loading