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
Comprehensive entity editing #570
Conversation
Just FYI, I have added validation and tests for XUpdateImpl classes. Only JSON serialization and request optimization are left to test. |
Codecov is a bit flaky, but I think I have decent code coverage by now. I have settled on testing Remaining missing changes:
Builders follow a naming convention that makes it easy to add convenience methods:
So for example Please review. |
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.
Thank you so much! The tests address my concerns entirely.
I haven't had a close look at the new editing API but it's easier if I simply do so while updating OpenRefine to the new API. I can imagine I might have suggestions of things to change then but it will be much easier to address them individually rather than by requesting changes to this big PR :) All in all I think this is definitely going in the right direction and seems to have been done with a lot of care, so again thank you!
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 have not reviewed the code carefully but it seems good to me. As @wetneb said we can definitely fix things afterward. Feel free to merge whenever you think it's appropriate.
This PR includes entity editing via
WikibaseDataEditor.editEntityDocument
. Most of the code consists of update representations and update builders. All edit operations (add/modify/remove all parts of all entity types) have been manually tested. Some related changes have been omitted though, because this is already a moster PR:fromUpdate(EntityUpdate)
has been omitted.DatamodelConverter
,DatamodelFilter
,ToString
, andValueVisitor
need new methods to support the newEntityUpdate
interfaces.EntityUpdateImpl
classes don't have validation. They rely on validation inEntityUpdateBuilder
classes.wbsetsitelink
,wbsetclaimvalue
,wbsetqualifier
,wbsetreference
,wbremovequalifiers
,wbremovereferences
.Some of this missing functionality needs further discussion. I think all of it needs separate PR in order to limit size of this PR. Some of these should be a separate issue.
This PR resolves #437, #376, and most of #403.