Skip to content
Snippets Groups Projects
Commit eeec7916 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

fixed pretty_name bug in operators, disabled verbosity and debug during...

fixed pretty_name bug in operators, disabled verbosity and debug during continuous integration tests
parent f726ebb1
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -42,6 +42,8 @@ if [ "$HAS_CACHE_DIR" = true ]; then
fi
export PYTHONPATH="$INSTALL_DIR/lib/python2.7/site-packages:$PYTHONPATH"
export HYSOP_VERBOSE=0
export HYSOP_DEBUG=0
python -c 'import hysop; print hysop'
# long backend dependent tests
......
......@@ -82,6 +82,8 @@ class ComputationalGraphNode(OperatorBase):
----------
name: str
name of this node (used for printing and display purpose).
pretty_name: str
Pretty name of this node (used for printing and display purpose).
input_fields: dict
input fields as a dictionnary (see Notes).
output_fields: dict
......@@ -106,7 +108,8 @@ class ComputationalGraphNode(OperatorBase):
-----
For the input and output fields, the keys of the dicts have to be of
type :class:`hysop.fields.continuous_field.Field`.
and the values should consist of :class:`hysop.topology.topology_descriptor.TopologyDescriptors` instances
and the values should consist of
:class:`hysop.topology.topology_descriptor.TopologyDescriptors` instances
ie. an already defined topology or a topology descriptor.
For input and output parameters, the keys of the dicts can be arbitrary names that
......@@ -146,10 +149,13 @@ class ComputationalGraphNode(OperatorBase):
output_fields = first_not_None(output_fields, {})
input_params = first_not_None(input_params, {})
output_params = first_not_None(output_params, {})
method = method or {}
name = name or self.__class__.__name__
method = first_not_None(method, {})
name = first_not_None(name, self.__class__.__name__)
pretty_name = first_not_None(pretty_name, name)
if isinstance(pretty_name, unicode):
pretty_name = pretty_name.encode('utf-8')
if not isinstance(name, str):
msg='name is not a string but a {}.'
raise ValueError(msg.format(name.__class__))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment