-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- use `node-graph` package instead of `scinode`. - add `WorkTree.load()` to load a WorkTree from the AiiDA `WorkTree` process. - support continuing a finished worktree.
- Loading branch information
1 parent
b0a64c5
commit bb147c7
Showing
27 changed files
with
681 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from .decorator import node, build_node | ||
from .worktree import WorkTree | ||
from .node import Node | ||
from .decorator import node, build_node | ||
|
||
__version__ = "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from node_graph.node import Node as GraphNode | ||
|
||
|
||
class Node(GraphNode): | ||
"""Represent a Node in the AiiDA WorkTree. | ||
The class extends from node_graph.node.Node and add new | ||
attributes to it. | ||
""" | ||
|
||
socket_entry = "aiida_worktree.socket" | ||
property_entry = "aiida_worktree.property" | ||
|
||
def __init__(self, **kwargs): | ||
""" | ||
Initialize a Node instance. | ||
""" | ||
super().__init__(**kwargs) | ||
self.to_ctx = [] | ||
self.wait = [] | ||
self.process = None | ||
|
||
def to_dict(self): | ||
ndata = super().to_dict() | ||
ndata["to_ctx"] = self.to_ctx | ||
ndata["wait"] = self.wait | ||
ndata["process"] = self.process.uuid if self.process else None | ||
|
||
return ndata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.