Hey all, > I'll be linking the code here as soon as there is something substantial to look at.
We're now 6 years later and I finally have something to show! A quick recap: writing result formats for SMW is a big pain due to a number of serious design issues. And testing is (almost??) impossible. That is why I have designed a *new way to create result printers*. This is still very much in draft stage (though perhaps not for long). So you cannot use it yet to write new formats. However you can, and are encouraged to, give feedback on the new design. You can find the code at https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/4313 The linked pull request has examples of registration and implementation, which should give you a quick idea of what the new approach is like to work with. After all, making this important SMW extension point easier to work with is the core goal, so the primary thing *I want your feedback* on. Cheers -- Jeroen De Dauw | www.EntropyWins.wtf <https://entropywins.wtf> | www.Professional.Wiki <https://professional.wiki/> Software Crafter | Entrepreneur | Speaker | Strategist | Contributor to Wikimedia and Open Source ~=[,,_,,]:3 On Thu, 24 Oct 2013 at 23:55, James HK <jamesin.hongkon...@gmail.com> wrote: > Hi, > > +1 > > This last time I had to write a unit test for the table format, I had > to bit my hand off to get some sane results. > > If you can make it in time, don't show them "old" interface as this > one is not going to last and it doesn't improve one's understanding in > how to interact with a query format or what that matter with the > result itself. > > Cherrs > > On 10/25/13, Jeroen De Dauw <jeroended...@gmail.com> wrote: > > Hey, > > > > While working on my dev workshop for SMWCon, I noticed it is currently > > rather impossible to write a sane unit test for a result format. The > > reasons for this are that the result object, SMWQueryResult and the > objects > > it is composed of, contain a ton of stuff not relevant to those tests, > > including database access to get the actual results. > > > > I figured it'd be good to have a cleaner interface that can be used by > new > > code, and demonstrated in the workshop. So I'm now working on creating a > > fresh implementation of the result objects, that will be available as an > > alternative to the current way of doing things to result printer authors. > > In other words, this will not be a compatibility breaking change, the > > current approach will remain usable for the foreseeable future. > > > > This is just a heads up I'm going to work on this, no real work has > > happened yet. I'll be linking the code here as soon as there is something > > substantial to look at. > > > > Cheers > > > > -- > > Jeroen De Dauw >
_______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel