Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add Atomic Graph #262

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Conversation

Simaris
Copy link

@Simaris Simaris commented Mar 8, 2020

No description provided.

@white-gecko
Copy link
Member

Just as a link: RDFLib/rdflib#1294

Copy link
Collaborator

@GordianDziwis GordianDziwis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot say anything about the big picture stuff, I am not familiar enough with the code base.
And I cannot comment multiple lines at once, is there a trick to it?

try:
(f, context, nameMap) = result
except ValueError:
print(result)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the error actually handled?

self._merge_test(join(testPath, d), "context")

def _merge_test(self, dirPath, method):
# Prepate a git Repository
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

@@ -558,7 +654,7 @@ def _applyKnownGraphs(self, delta, blobs, parent_commit, index):

self._blobs.remove(blob)
blob = fileName, index.stash[file_reference.path][0]
self._blobs.set(blob, (file_reference, context))
self._blobs.set(blob, (file_reference, context, nameMap))
blobs_new.add(blob)
except KeyError:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error actually handled?

@@ -413,17 +423,74 @@ def getFileReferenceAndContext(self, blob, commit):
content = commit.node(path=name).content
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if blob in self._blobs:
  return self._blobs.get(blob)
else
  ...
  return quitWorkingData

A BNode('a') found in parsedQuery would be replaced by the blanknode _:a found in the graph.nt.
That way, updates can pass Blanknodes as instances and do not have to work on string representations.
"""
def replaceBlankNode(parsedQuery, nameMap):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very very big: three for loops and four ifs, try to split in multiple functions and maybe use list comprehension for more conciseness.


if len(nameMap) == 0:
return
for change in changes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also too deep, difficult to understand.

@@ -117,6 +118,19 @@ def __repr__(self):
len((c for c in self.graphs() if c not in self.store.contexts()))
)

#def update(self, update_object):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code

@white-gecko white-gecko marked this pull request as draft January 25, 2022 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants