Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

[INPROGRESS] #429

Closed
wants to merge 2 commits into from
Closed

[INPROGRESS] #429

wants to merge 2 commits into from

Conversation

amadolid
Copy link
Collaborator

Name of PR

Description

@amadolid amadolid force-pushed the patch/local_jaseci_plugin branch 3 times, most recently from 681d84e to 8aad219 Compare June 19, 2024 13:23
@amadolid
Copy link
Collaborator Author

amadolid commented Jun 19, 2024

@amadolid amadolid force-pushed the patch/local_jaseci_plugin branch 2 times, most recently from 8581c94 to 18a6b67 Compare June 19, 2024 14:02
test.jac Outdated Show resolved Hide resolved


@cmd_registry.register
def get_object(id: str, session: str = "") -> dict:
def get_object(id: str, session: str = "") -> dict[str, Any]:
Copy link
Contributor

@marsninja marsninja Jun 20, 2024

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 = "",
Copy link
Contributor

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?

Copy link
Collaborator Author

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/cli/cli.py Outdated Show resolved Hide resolved

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()))
Copy link
Contributor

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 Show resolved Hide resolved
jaclang/core/construct.py Outdated Show resolved Hide resolved
jaclang/core/construct.py Outdated Show resolved Hide resolved
self._save()
elif self.hash != (_hash := hash(dumps(self))):
self.hash = _hash
self._save()
Copy link
Contributor

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?

Copy link
Collaborator Author

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

jaclang/core/construct.py Outdated Show resolved Hide resolved
jaclang/plugin/default.py Outdated Show resolved Hide resolved
jaclang/plugin/default.py Outdated Show resolved Hide resolved
jaclang/plugin/memory.py Outdated Show resolved Hide resolved
jaclang/core/construct.py Outdated Show resolved Hide resolved
@amadolid amadolid force-pushed the patch/local_jaseci_plugin branch 4 times, most recently from df38c5a to 7ecb45e Compare June 21, 2024 09:57
@amadolid amadolid force-pushed the patch/local_jaseci_plugin branch 11 times, most recently from c840593 to 96a2454 Compare June 22, 2024 07:31
@amadolid amadolid force-pushed the patch/local_jaseci_plugin branch from 96a2454 to 855800b Compare June 22, 2024 07:36
@amadolid
Copy link
Collaborator Author

migrated to #478

@amadolid amadolid closed this Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants