Hamilton helps data scientists and engineers define testable, modular, self-documenting dataflows, that encode lineage/tracing and metadata. Runs and scales everywhere python does.
This follows #1200. The solution follows the suggestion of @MG-MW.
This problem is specific to config values. Instead of displaying their node_name and type, they display their node_name and value. In the function _get_node_label(), the type_string argument is actually the result of str(value).
Essentially, we use html.escape to encode unsafe characters ", &, <, > and the Graphviz engine will convert them back (e.g., the string lt&; is rendered as <). Inserting this safe string inside the f-string ensures a valid final string.
At the same time, we added truncation for the config value. Displaying values can quickly get messy when people pass pd.Series as config values. Escaping characters after truncations give as better results
This follows #1200. The solution follows the suggestion of @MG-MW.
This problem is specific to config values. Instead of displaying their
node_name
andtype
, they display theirnode_name
and value. In the function_get_node_label()
, thetype_string
argument is actually the result ofstr(value)
.Essentially, we use
html.escape
to encode unsafe characters"
,&
,<
,>
and the Graphviz engine will convert them back (e.g., the stringlt&;
is rendered as<
). Inserting this safe string inside the f-string ensures a valid final string.At the same time, we added truncation for the config value. Displaying values can quickly get messy when people pass
pd.Series
as config values. Escaping characters after truncations give as better results