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
DTS Resolver, available in your closest store #184
Conversation
… of unwanted resources
… pagineted collections
…moved debugging print
From MyCapytain.resources.prototypes.text to MyCapytain.resources.prototypes.cts.text : - CtsNode now PrototypeCtsNode - CtsPassage now PrototypeCtsPassage - CtsText now PrototypeCtsText
Oh, and going in, I did some cleaning. Mostly I intent to remove any misused |
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.
There was a bit here that I do not feel qualified to comment on. And I didn't look at the tests since I don't feel like I have a good enough grasp on the codebase to judge them. But I did make a few suggestions. I am sure I will have more once I try to implement it.
if ascendants != 0 and self.updwards[t] is True: | ||
self.updwards[t] = False | ||
for s, p in graph.subject_predicates(object=target): | ||
if desc == 0 and isinstance(s, BNode): |
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.
Should this be if asc == 0 and isinstance(s, BNode):
since this if
clause is about ascendants as opposed to descendants?
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.
I think I understand now why it is desc == 0
and not asc
(because it is getting the descendants of the subjects in the graph?). But I will leave the comment here just to make sure.
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.
Damn, you throw some doubts about this. It works so assu,e it's working ok. But honnestly, this is some part of the code where I don't feel too good about my own readability...
It is true it needs more docstrings :P |
I thinkit's time |
This is a complete implementation of the DTS Resolver, even so passage metadata are a bit tricky and not perfectly handled from my point of view. Could be better but I need more use cases.