-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
681d84e
to
8aad219
Compare
8581c94
to
18a6b67
Compare
jaclang/cli/cli.py
Outdated
|
||
|
||
@cmd_registry.register | ||
def get_object(id: str, session: str = "") -> dict: | ||
def get_object(id: str, session: str = "") -> dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to use object here instead of any, Let me explain using ChatGPT
Choosing Between object and Any
Use object: When you want to accept any type but still want to maintain some level of type checking and indicate that you don't expect to perform operations that assume a specific type.
Use Any: When you want to explicitly allow any type and operations without any type checking.
@@ -73,6 +72,7 @@ def run( | |||
cache: bool = True, | |||
walker: str = "", | |||
node: str = "", | |||
root: str = "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this to support multi users? indexed by root?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically, yes. The idea is, graph "owner"/root will be the base permission layer for the whole graph regardless if it's associated with a user or not
jaclang/core/construct.py
Outdated
|
||
all: int = 0 | ||
nodes: tuple[set[T], set[T]] = field(default_factory=lambda: (set(), set())) | ||
roots: tuple[set[T], set[T]] = field(default_factory=lambda: (set(), set())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on our discussion yesterday, how about we only introduce roots-based access control for now? We can add nodes in later. This PR is already quite large so I am trying to limit its scope a little tool.
jaclang/core/construct.py
Outdated
self._save() | ||
elif self.hash != (_hash := hash(dumps(self))): | ||
self.hash = _hash | ||
self._save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the underlying NodeArchitype being saved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's always tied up with NodeAnchor.
NodeAnchor from Shelf will always have architype field
df38c5a
to
7ecb45e
Compare
c840593
to
96a2454
Compare
96a2454
to
855800b
Compare
migrated to #478 |
Name of PR
Description