-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
π§βππ’ Fix numeric triples factory #862
Conversation
trigger ci
trigger ci
trigger ci
trigger ci
@@ -932,13 +941,15 @@ def from_labeled_triples( | |||
@classmethod | |||
def from_path( | |||
cls, | |||
*, |
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.
this seems to conflict with the fact that you removed the path from the usages of TriplesFactory.from_path in the examples. Typically, I still leave the first required argument before the *
since common usage might not have the keyword
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 added the path keyword parameter
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.
Thanks!
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.
On second thought, this looks a bit redundant since the function is already called from_path
.
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.
Other than wondering if the doctests on data.rst are broken and addressing my comment, this looks good to me
cls, | ||
*, | ||
triples: LabeledTriples, | ||
numeric_triples: LabeledTriples = None, |
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 there a meaningful case in which numeric_triples
could be none? I see it raises an error, but why even allow this? Is this so it can follow the parent's signature?
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 there a meaningful case in which numeric_triples could be none?
no
Is this so it can follow the parent's signature?
yes
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.
So if you want to leave it as is, then this is good to merge
trigger ci
This PR is a spin-off of #857 , which extracts the changes to numeric triples factory.