Skip to content

Commit d5fbc89

Browse files
authored
Merge 7b29652 into d6ee64c
2 parents d6ee64c + 7b29652 commit d5fbc89

File tree

9 files changed

+569
-403
lines changed

9 files changed

+569
-403
lines changed

docs/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Individual node computations can be shipped off to parallel processes for scalab
2626

2727
Once you're happy with a workflow, it can be easily turned it into a macro for use in other workflows. This allows the clean construction of increasingly complex computation graphs by composing simpler graphs.
2828

29-
Nodes (including macros) can be stored in plain text, and registered by future workflows for easy access. This encourages and supports an ecosystem of useful nodes, so you don't need to re-invent the wheel. (This is a beta-feature, with full support of [FAIR](https://en.wikipedia.org/wiki/FAIR_data) principles for node packages planned.)
29+
Nodes (including macros) can be stored in plain text as python code, and registered by future workflows for easy access. This encourages and supports an ecosystem of useful nodes, so you don't need to re-invent the wheel. (This is a beta-feature, with full support of [FAIR](https://en.wikipedia.org/wiki/FAIR_data) principles for node packages planned.)
3030

3131
Executed or partially-executed graphs can be stored to file, either by explicit call or automatically after running. When creating a new node(/macro/workflow), the working directory is automatically inspected for a save-file and the node will try to reload itself if one is found. (This is an alpha-feature, so it is currently only possible to save entire graphs at once and not individual nodes within a graph, all the child nodes in a saved graph must have been instantiated by `Workflow.create` (or equivalent, i.e. their code lives in a `.py` file that has been registered), and there are no safety rails to protect you from changing the node source code between saving and loading (which may cause errors/inconsistencies depending on the nature of the changes).)
3232

@@ -60,13 +60,13 @@ But the intent is to collect them together into a workflow and leverage existing
6060
... return np.arange(n)
6161
>>>
6262
>>> @Workflow.wrap.as_macro_node("fig")
63-
... def PlotShiftedSquare(macro, n: int, shift: int = 0):
64-
... macro.arange = Arange(n)
65-
... macro.plot = macro.create.plotting.Scatter(
66-
... x=macro.arange + shift,
67-
... y=macro.arange**2
63+
... def PlotShiftedSquare(self, n: int, shift: int = 0):
64+
... self.arange = Arange(n)
65+
... self.plot = self.create.plotting.Scatter(
66+
... x=self.arange + shift,
67+
... y=self.arange**2
6868
... )
69-
... return macro.plot
69+
... return self.plot
7070
>>>
7171
>>> wf = Workflow("plot_with_and_without_shift")
7272
>>> wf.n = wf.create.standard.UserInput()

0 commit comments

Comments
 (0)