Closed superstar54 closed 2 weeks ago
Attention: Patch coverage is 97.77778%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 80.15%. Comparing base (
5937b88
) to head (d8ba291
). Report is 45 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
aiida_workgraph/utils/analysis.py | 80.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
In workgraph, we use
aiida.orm.utils.serialize.serialize
(yaml serialize) to serialize the input data of a workgraph and save it to thenode.base.extras
. However, theyaml
seralizer can not handle the local function properly, as shown in #261 .This PR provide a solution. If a Python function is used as a task input, we first serialize it using pickle, then use yaml.
We created a
PickledLocalFunction
class to serialize the function, and this class is the same as thePickledFunction
. We use a different name just to label it, so that later we know we need to deserialize it and get the Python function back, before we pass it as a task input.Test
I change the
test_shell_workflow
totest_shell_graph_builder
and defined the parser inside thegraph_bulder.