[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
The proposal to merge lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
The proposal to merge lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module has been updated. Commit Message changed to: Update to 3.0 module guidelines; make JSON-ready. For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
The proposal to merge lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Review: Needs Fixing Basically the same comments as the queue proposal: 1. Make the error QName variables %private; 2. Fix or eliminate the XQDoc for the error QNames; 3. Replace "node" with "item" in function XQDoc. In addition: 4. You have a stray at the beginning of the header XQDoc comment (diff line 21). 5. You have in at least 8 places, instead of . -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
> After that, I'm afraid we've got some more substantive changes to be made to > JSON-ify this module. I'll update the bug with details. If you'd like, we > could merge this first pass (after you've addressed the coding guidelines > issues) and then have a separate proposal for the JSONiq updates; otherwise > you can continue working on this branch. I worked in the changes, please check it, also added some testcases for the new behavior. -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Review: Needs Fixing -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Luis - thanks for getting to this module so quickly. Based on this you've raised some coding-guideline issues, such as the use of and error codes. After discussion with Matthias, I've proposed some clarifications to the coding guidelines document on the Wiki; please take a look and update this proposal accordingly. Thanks! -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
After that, I'm afraid we've got some more substantive changes to be made to JSON-ify this module. I'll update the bug with details. If you'd like, we could merge this first pass (after you've addressed the coding guidelines issues) and then have a separate proposal for the JSONiq updates; otherwise you can continue working on this branch. -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
> The documentation has several mentions to tests that are included but no > textual representations are made, Should I move some of the examples to the > code instead of sending the user to check the tests? No, the @example tags are better. The examples will be included in the documentation when the website is generated, but by having them under the test/ directory they're actually executed as part of the RQ, so we know they actually work. -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
The documentation has several mentions to tests that are included but no textual representations are made, Should I move some of the examples to the code instead of sending the user to check the tests? Aside from that the documentation seems to be pretty straight forward and all the errors that I can think for each case seems to be covered. Thanks, Luis. 2013/6/14 Chris Hillery > Also, Luis: Have you done any investigation to ensure that the > documentation is reasonable? In particular is the header comment clear, > clean, and possibly have an example or two? > > And, can you verify that all reasonably-possible error conditions are > documented? At least, are there any other XQuery error codes thrown by the > module functions (or from the module C++ code, if any)? > -- > https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 > You proposed lp:~zorba-coders/zorba/bug-1188061 for merging. > -- "The significant problems we face cannot be solved by the same level of thinking that created them." -- Albert Einstein https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Also, Luis: Have you done any investigation to ensure that the documentation is reasonable? In particular is the header comment clear, clean, and possibly have an example or two? And, can you verify that all reasonably-possible error conditions are documented? At least, are there any other XQuery error codes thrown by the module functions (or from the module C++ code, if any)? -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Review: Needs Information Looks pretty good so far! A couple questions for Matthias since he wrote the style guide: 1. Is this the correct way to use for splitting doc paragraphs - wrapping them in ... ? Or should there be single elements between paragraphs? 2. Is this the correct way to refer to error codes? I think there's supposed to be an actual module constant for each code, right? And then @error should list the constant? -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module
Luis Rodriguez Gonzalez has proposed merging lp:~zorba-coders/zorba/bug-1188061 into lp:zorba/stack-module. Requested reviews: Luis Rodriguez Gonzalez (kuraru) Chris Hillery (ceejatec) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 -- https://code.launchpad.net/~zorba-coders/zorba/bug-1188061/+merge/169553 Your team Zorba Coders is subscribed to branch lp:zorba/stack-module. === modified file 'src/CMakeLists.txt' --- src/CMakeLists.txt 2012-02-29 08:49:50 + +++ src/CMakeLists.txt 2013-06-14 22:52:43 + @@ -15,6 +15,6 @@ # Stack data structure -DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/store/data-structures/stack"; VERSION 1.0 FILE "stack.xq") +DECLARE_ZORBA_MODULE (URI "http://zorba.io/modules/stack"; VERSION 1.0 FILE "stack.xq") ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test") === modified file 'src/stack.xq' --- src/stack.xq 2012-04-30 15:28:04 + +++ src/stack.xq 2013-06-14 22:52:43 + @@ -22,7 +22,7 @@ : @author Daniel Turcanu, Sorin Nasoi : @project store/data structures :) -module namespace stack = "http://www.zorba-xquery.com/modules/store/data-structures/stack";; +module namespace stack = "http://zorba.io/modules/stack";; import module namespace collections-ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";; import module namespace collections-dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";; @@ -34,7 +34,7 @@ (:~ : Errors namespace URI. :) -declare variable $stack:errNS as xs:string := "http://www.zorba-xquery.com/modules/store/data-structures/stack";; +declare variable $stack:errNS as xs:string := "http://zorba.io/modules/stack";; (:~ : xs:QName with namespace URI="http://www.zorba-xquery.com/modules/store/data-structures/stack"; and local name "errNA" @@ -47,10 +47,11 @@ declare variable $stack:errExists as xs:QName := fn:QName($stack:errNS, "stack:errExists"); (:~ - : Create a stack with this name. If stack exists, an error is raised. - : @param $name name of the new stack. - : @return () - : @error stack:errExists if the stack identified by $name already exists. + : Create a stack with this name. If stack exists, an error is raised. + : + : @param $name name of the new stack. + : @return an empty sequence. + : @error stack:errExists if the stack identified by $name already exists. :) declare %ann:sequential function stack:create($name as xs:QName) as empty-sequence() { @@ -61,11 +62,12 @@ }; (:~ - : Return the top node in the stack, without removing it. - : @param $name name of the stack. - : @return the top node, or empty sequence if stack is empty. + : Return the top node in the stack, without removing it. + : + : @param $name name of the stack. + : @return the top node, or empty sequence if stack is empty. : @example test/Queries/top1.xq - : @error stack:errNA if the stack identified by $name does not exist. + : @error stack:errNA if the stack identified by $name does not exist. :) declare function stack:top($name as xs:QName) as node()? { @@ -76,11 +78,12 @@ }; (:~ - : Return the top node in the stack, and remove it. - : @param $name name of the stack. - : @return the top node, or empty sequence if stack is empty. + : Return the top node in the stack, and remove it. + : + : @param $name name of the stack. + : @return the top node, or empty sequence if stack is empty. : @example test/Queries/pop2.xq - : @error stack:errNA if the stack identified by $name does not exist. + : @error stack:errNA if the stack identified by $name does not exist. :) declare %ann:sequential function stack:pop($name as xs:QName) as node()? { @@ -95,12 +98,13 @@ }; (:~ - : Add a new node to the stack; the stack will contain a copy of the given node. - : @param $name name of the stack. - : @param $value the node to be added. - : @return () + : Add a new node to the stack; the stack will contain a copy of the given node. + : + : @param $name name of the stack. + : @param $value the node to be added. + : @return an empty sequence. : @example test/Queries/push1.xq - : @error stack:errNA if the stack identified by $name does not exist. + : @error stack:errNA if the stack identified by $name does not exist. :) declare %ann:sequential function stack:push($name as xs:QName, $value as node()) as empty-sequence() { @@ -108,11 +112,12 @@ }; (:~ - : Checks if a stack exists and is empty. - : @param $name name of the stack. - : @return true is the stack is empty or does not exist. + : Checks if a stack exists and is empty. + : + : @param $name name of the stack. + : @return true if the stack is empty or does not exist. : @example test/Queries/empty1.xq - : @error stack:errNA if the stack identified by $name does not exist. + : @error stack:errNA if the stack identified by $name does not exist. :) declare function stack:empty($name as xs:QName) as xs:boolean { @@ -123,11 +128,1