[Wikidata-bugs] [Maniphest] [Updated] T118950: [Task] Introduce StatementGrouper and StatementFilter

2015-12-02 Thread thiemowmde
thiemowmde added a comment.

For the record, since there seems to be fundamental disagreement (here 

 and here ) 
on this:

- What you see in https://github.com/wmde/WikibaseDataModelServices/pull/91 is 
the result of part pair programming with @Jonas and me, part me alone.
- I started with the StatementGrouper interface and used it right away in the 
place(s) where we want to use it (see https://gerrit.wikimedia.org/r/254394).
- I started with a straight DataTypeStatementGrouper implementation that does 
everything itself, without any of the filter stuff. You gave it an array of 
data types in a slightly complicated but very flexible way, typically `array( 
'statements' => null, 'identifiers' => 'identifier' )`, and it turned a single 
StatementList into two, the second containing identifiers, the first containing 
everything else. You can still see this early attempt here: 
https://github.com/wmde/WikibaseDataModelServices/blob/fa09526a60dfd50b7cbf3c575ca05e7edc2248ec/src/Statement/Grouper/DataTypeStatementGrouper.php.
- I was told by @Jonas and @adrianheine's original proposal in 
https://phabricator.wikimedia.org/T117421#1807403 I should try the filter 
approach. I did that and realized that the implementations are much, much 
nicer. Much more focused on a single responsibility per class. So I decided to 
split my original DataTypeStatementGrouper into a FilteringStatementGrouper and 
a DataTypeStatementFilter.

Other design decisions include:

- I decided to add the most basic implementations we discussed, even if we are 
not going to use them right away in the same story 
(https://phabricator.wikimedia.org/T117421). One thing these implementations do 
is showing how the interfaces are intended to be used. And we already know we 
do have use for these implementations. Without them it would be almost 
pointless to put the two new classes in 
https://phabricator.wikimedia.org/tag/wikibase-datamodel-services/. It would 
probably be pointless to have interfaces at all. The code could just live in 
https://phabricator.wikimedia.org/tag/mediawiki-extensions-wikibaseview/. I 
already explained this in 
https://github.com/wmde/WikibaseDataModelServices/pull/91#discussion_r46273418.
- I did an actual (micro) benchmark and decided that any array_flip is 
pointless, in all the groupers and filters.


TASK DETAIL
  https://phabricator.wikimedia.org/T118950

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde
Cc: Jonas, adrianheine, thiemowmde, Aklapper, Wikidata-bugs, aude, Mbch331



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T118950: [Task] Introduce StatementGrouper and StatementFilter

2015-12-01 Thread Lydia_Pintscher
Lydia_Pintscher added a project: Wikidata-Sprint-2015-12-01.

TASK DETAIL
  https://phabricator.wikimedia.org/T118950

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde, Lydia_Pintscher
Cc: Jonas, adrianheine, thiemowmde, Aklapper, Wikidata-bugs, aude, Mbch331



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T118950: [Task] Introduce StatementGrouper and StatementFilter

2015-11-25 Thread adrianheine
adrianheine added a blocked task: T119596: Use trivial StatementGrouper in 
StatementSectionsView.

TASK DETAIL
  https://phabricator.wikimedia.org/T118950

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde, adrianheine
Cc: Jonas, adrianheine, thiemowmde, Aklapper, Wikidata-bugs, aude, Mbch331



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T118950: [Task] Introduce StatementGrouper and StatementFilter

2015-11-22 Thread Lydia_Pintscher
Lydia_Pintscher removed a project: Wikibase-Quality-Constraints.

TASK DETAIL
  https://phabricator.wikimedia.org/T118950

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde, Lydia_Pintscher
Cc: Jonas, adrianheine, thiemowmde, Aklapper, Wikidata-bugs, aude, Mbch331



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Updated] T118950: [Task] Introduce StatementGrouper and StatementFilter

2015-11-20 Thread thiemowmde
thiemowmde added a blocked task: T118951: [Task] Implement 
ByMainSnakPropertyDataTypeStatementFilter.

TASK DETAIL
  https://phabricator.wikimedia.org/T118950

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde
Cc: Jonas, adrianheine, thiemowmde, Aklapper, Wikidata-bugs, aude, Mbch331



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs