SemanticMediaWiki / SemanticScribunto

Provides service functions to support the Scribunto extension
Other
24 stars 14 forks source link

1.0.0 release #11

Closed kghbln closed 7 years ago

kghbln commented 8 years ago
mwjames commented 8 years ago

After all these recent changes to this extension it may be desirable to make the first public release?

15 changed the base from mw.ext.smw to mw.smw.

Probably the shortcut should be SSC rather than SSO

15

mwjames commented 8 years ago

Let's see how https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1969 plays out.

kghbln commented 8 years ago

SSC rather than SSO #15

:+1:

Let's see how SemanticMediaWiki/SemanticMediaWiki#1969 plays out.

FYI @oetterer

oetterer commented 8 years ago

I opened PR's for #set (#18) , #subobject (#19), and #info (#20) .

I would also like to add the #ask implementation I suggested in SemanticMediaWiki/SemanticMediaWiki#1969, because I thing it has a purpose besides getQueryResult. The latter gives you full control over the data you receive from smw. But it also delegates some responsibilities back to you. You have to parse the printouts yourself, you have to extract the page names to page references yourself, you cannot use the new date and number formating from smw, and so on. These are all no deal breaker and pose no major problems, but in my case I would need to replicate a bunch of functionality in lua that smw gives me for free. I especially woudn't mind getting nicely formatted dates in my local timezone. ;)

To maybe get a better understanding, here is the data structure I would like to have:

-- call would look something like
local result = mw.smw.ask{'[[Modification date::+]]', 'Modification date#-F[F j, Y]=mdate', 'Last editor is=editor', 'limit=2'}
-- and _result_ would be
result = {
  {
    MainLabel = 'Main Page',
    mdate = 'March 4, 2015',
    editor = 'User:Admin'
  },
  {
    MainLabel = 'User:Admin',
    mdate = 'November 13, 2016',
    editor = 'User:Admin'
  }
}

Again, I am not looking to replace getQueryResult merely give the user a second, more simplistic way to retrieve smw data as a table. Any thoughts @mwjames ?

mwjames commented 8 years ago

Any thoughts @mwjames ?

I understand the thought process, so :+1: Maybe when amending the functions.md your statement could be provided as guideline.

kghbln commented 8 years ago

Maybe when amending the functions.md your statement could be provided as guideline.

@oetterer It will be very nice if you could work on this for the upcoming release. Thanks a lot in advance!

mwjames commented 8 years ago

if you could work on this for the upcoming release. Thanks a lot in advance!

He already did and I reorged the docs https://github.com/SemanticMediaWiki/SemanticScribunto/tree/master/docs.

kghbln commented 8 years ago

He already did

Oops, pardon me then. Sorry. Looking forward to a realease now?

oetterer commented 7 years ago

My last suggestion for augmentation is on GitHub (see PR #24). Maybe this could be added before the 1.0 release?

mwjames commented 7 years ago

Maybe this could be added before the 1.0 release?

It is looking good (without me being in a driver seat :+1: ) and in case @oetterer isn't too exhausted maybe creating some examples [0] should help others as well and can work as litmus test that what we believe to function does so on-wiki.

@kghbln After #24 got merged maybe a quick look in the [1] to avoid any obvious blunders.

@oetterer Thanks for the time investment especially on maintaining appropriate tests which sometimes may seem daunting, yet to be inevitable when creating a software package.

[0] https://sandbox.semantic-mediawiki.org/wiki/Cat%C3%A9gorie:Semantic_Scribunto_example [1] https://github.com/SemanticMediaWiki/SemanticScribunto/tree/master/docs

mwjames commented 7 years ago

Some feedback from @matthew-a-thompson @cicalese on the added functionality and documentation [0] would be much appreciated before the release.

[0] https://github.com/SemanticMediaWiki/SemanticScribunto/tree/master/docs

oetterer commented 7 years ago

I'm a little bit uncertain on how and where to add my name to this project. I'm willing to take responsibility and remain as maintainer but I don't want to take any unsolicited credit. I was thinking on adding my name to the extension page on smw.org but not on mediawiki.org. Also, I'm unsure if adding myself to the list of authors in the extension description (see initExtension()) was correct.

oetterer commented 7 years ago

and in case @oetterer isn't too exhausted maybe creating some examples [0] should help others as well and can work as litmus test that what we believe to function does so on-wiki.

Hopefully I find the time next week. But I have this on my todo list.

cicalese commented 7 years ago

Sure thing, @mwjames. We will take a look at it soon. @oetterer, thanks for adding the additional functionality!

mint-thompson commented 7 years ago

The updated page for getQueryResult looks good. There's only one thing I can think of to potentially add as a clarification, and that is: the elements of "results" (queryResult.results in the sample code) are 1-indexed. This is so that, as the sample code shows, the results can easily be iterated over in order by the pairs function. However, any other table contents that came from integer-keyed PHP arrays are likely to be 0-indexed instead.

mwjames commented 7 years ago

the elements of "results" (queryResult.results in the sample code) are 1-indexed. other table contents that came from integer-keyed PHP arrays are likely to be 0-indexed instead.

Good example for an integration test.

oetterer commented 7 years ago

Added a first set of examples. I somehow found it a good idea to start with a complex set of pages and modules :(

However: on my todo is

more suggestions?

oetterer commented 7 years ago

Having finished https://sandbox.semantic-mediawiki.org/wiki/Semantic_Scribunto_example, and https://sandbox.semantic-mediawiki.org/wiki/Module:Smw and also augmented https://sandbox.semantic-mediawiki.org/wiki/Module:SSC_base, and https://sandbox.semantic-mediawiki.org/wiki/Module:Person/class I would like to propose to check "Examples on sandbox" in the first post. Unless of course, there are more suggestions?

kghbln commented 7 years ago

Wow, all this great work. I guess it is about time to get the extension to the public - yes?!.

mwjames commented 7 years ago

Having finished https://sandbox.semantic-mediawiki.org/wiki/Semantic_Scribunto_example, and https://sandbox.semantic-mediawiki.org/wiki/Module:Smw

I'd say this is exemplary and should be sufficient for users who want to find some anchor points and interaction from a practical perspective with this extension.

Thanks for the dedication on the test part.

Unless of course, there are more suggestions?

Not for the 1.0 release but maybe as a feature for a next release is to track those #ask queries invoked via the library.

I guess it is about time to get the extension to the public - yes?!.

Yes. (Docs are covered, tests are available, and as always you can push another release anytime)

kghbln commented 7 years ago

Yes. (Docs are covered, tests are available, and as always you can push another release anytime)

@mwjames We still need the RELEASE NOTES we do not have at all yet. Just creating a 1.0.0 - Initial public release is perhaps not good enough. I believe that you have the best idea on what has to be in there.

I can do the rest once it is there.

mwjames commented 7 years ago

still need the RELEASE NOTES

https://github.com/SemanticMediaWiki/SemanticScribunto/blob/master/RELEASE-NOTES.md

kghbln commented 7 years ago

Done :)