[02:06:12] One thing struck my mind. How should we maintain tests for functions that don't have a static answer? Let's say I want to have a function that returns the current mayor of a municipality, or to make it more complicated, the longest serving one for it. These are answers that might change over time. Should we update tests manually for this? [02:06:55] perhaps the function should be more general, such that picking a defunct municipality returns their last mayor? [02:08:05] Hmm, I was not thinking about municipalities becoming defunct, only that the mayor gets changed after elections. (re @mahir256: perhaps the function should be more general, such that picking a defunct municipality returns their last mayor?) [02:08:18] Great question, not sure about a good answer. I would suggest not to have such queries, and possibly to rather ask questions like "who's the mayor of Lansing on August 14 2023" [02:09:47] In general our system assumes that function results are more or less static, and use quite some caching in order to benefit from that assumption. So for things that change, maybe it would be good to put a date as a parameter [02:18:26] Oh, that kind of makes sense. But how would one write a Abstract Wikipedia article then if we can't say either who is the current mayor or the longest serving? We have to write all abstract articles in past tense? "On August 14 2023 the mayor of Lansing was X. As of August 13 2013, the longest serving mayor was Y." [03:14:30] Not every sentence in Abstract Wikipedia will need to be a query against or otherwise come from Wikidata. If we want to write on Mayor Fernandez' article that she was the longest-serving mayor, this might be accomplished by checking every politician for all their roles and see whether they have been the longest-serving in this role. I don't think we have actually enough coverage [03:14:31] to support these queries in a meaningful way, but also it would be rather expensive to run these queries. [03:14:33] [03:14:34] What I'd expect is that on those articles where we want to add this, we will add a constructor for, e.g. longest serving roles, manually. But that's at that point just a sentence that was added manually. [03:14:36] [03:14:37] Now someone could go and look for all the instances of that constructor, and try to see whether that is consistent with what Wikidata says, and create lists about the contradictions. That would be really cool, but it doesn't have to happen everytime that page is rendered. [03:14:39] [03:14:40] Again, just my expectiations. I am not going to tell folks how to do it. [03:14:47] Newsletter #124: Wikifunctions at Wikimania 2023 - https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Updates/2023-08-14 [03:15:00] I'm working on this during the hackathon. One question, does capitalization in function names have any meaning? (That is, should I add alternative capitalizations as aliases?) (re @Jan_ainali: Another suggestion: isItem(string) which returns true if the string is a valid Qid.) [03:16:25] if you're working on manipulating/returning Qids as strings, be mindful of phabricator.wikimedia.org/T343593#9074979 (which is actually a bit baffling to learn) [03:17:16] I was more thinking about a template like abstract article that could be used for all municipalities. Or at least the Swedish ones, since I know there is data for those. (re @vrandecic: Not every sentence in Abstract Wikipedia will need to be a query against or otherwise come from Wikidata. If we want to write on...) [03:18:12] I would not care about capitalization for search. That's something we need to fix in the search, not make you enter all possible combinations by hand. (re @Jan_ainali: I'm working on this during the hackathon. One question, does capitalization in function names have any meaning? (That is, should...) [03:19:00] Ha, I forgot entirely about that, but it makes sense in the greater scheme of things (and better to break already now than to introduce a breaking change later) (re @mahir256: if you're working on manipulating/returning Qids as strings, be mindful of phabricator.wikimedia.org/T343593#9074979 (which is a...) [03:19:39] Thanks for the heads up! (re @mahir256: if you're working on manipulating/returning Qids as strings, be mindful of phabricator.wikimedia.org/T343593#9074979 (which is a...) [03:19:42] Yeah, that should work. (re @Jan_ainali: I was more thinking about a template like abstract article that could be used for all municipalities. Or at least the Swedish on...) [03:29:25] Perhaps it is just early in the morning here, but the UI is confusing to me. After I have created a test case, how am I supposed to find my way back to the function? [03:30:13] in the middle column, the first link for me takes me back to the function [03:31:27] Doh, yes. Right in the middle :) [03:31:28] I was expecting somewhere in the upper left corner, like where the page link is. That's where I usually look on other Mediawiki entities to "move back up" (re @mahir256: in the middle column, the first link for me takes me back to the function) [03:32:30] also we don't have Wikidata access from functions yet (boo!) so implementing isItem will have to wait [03:32:37] Yeah, we intentionally didn't model different types of Objects as different namespaces, or as sub-pages, for flexibility, but this means that MW-expert users may have expectations that we don't meet. For them (you and me) and newbies alike, we should make this workflow very clear and simple. [03:36:12] BTW for those in-person in Singapore for Wikimania, I'm sitting at a table in room 308 and happy to chat about Wikifunctions. [03:42:48] Is there a bug in the language for the UI? I just changed in my preferences to English, but it keeps showing pages (even though I never visited before) in Swedish. [03:43:49] if these pages are ones you're clicking links to, it might be this (re @wikilinksbot: T343483 – Links to objects remember language of user who recently purged the page [open]) [03:46:46] And I get this popup saying it switched from English : https://tools-static.wmflabs.org/bridgebot/b6a51b2e/Sk_rmbild_fr_n_2023_08_15_05_45_49.png [03:47:38] yes T343203 confuses the ULS people as well [03:51:09] Is there a way to list functions that have implementations in a specific language? (like javascript) [03:56:42] Is there a preference to get a larger code editor window? Or to turn on automatic line wrapping? [04:04:18] It should be possible, though not terribly efficiently, with some sort of JavaScript (re @Jan_ainali: Is there a way to list functions that have implementations in a specific language? (like javascript)) [04:05:24] at the moment https://www.wikifunctions.org/w/index.php?search=insource%3A%22%5C%22Z61K1%5C%22%3A+%5C%22python%5C%22%22&title=Special:Search&profile=advanced&fulltext=1&ns0=1 suggests there are in total 108 Python function implementations and https://www.wikifunctions.org/w/index.php?search=insource%3A%22%5C%22Z61K1%5C%22%3A+%5C%22javascript%5C%22%22&title=Special:Search&profile= [04:05:25] advanced&fulltext=1&ns0=1 suggests there are in total 71 JavaScript function implementations [04:06:07] That's usable for me now, thanks! (re @mahir256: at the moment https://www.wikifunctions.org/w/index.php?search=insource%3A%22%5C%22Z61K1%5C%22%3A+%5C%22python%5C%22%22&title=Sp...) [04:06:56] s/108/102/, s/71/62/ (re @mahir256: at the moment https://www.wikifunctions.org/w/index.php?search=insource%3A%22%5C%22Z61K1%5C%22%3A+%5C%22python%5C%22%22&title=Sp...) [04:24:52] here's a full list for you anyways: [[User:Mahir256/sandbox2]] (re @Jan_ainali: That's usable for me now, thanks!) [05:01:16] Do one have to publish an implementation in order to "Try this implementation"? [05:02:10] (It feels counter intuitive to have to publish it before I run the tests on it.) [05:13:04] And if one have to publish them, have we had any community discussions about publishing incomplete implementations with TODOs just to be able to test the progress? [05:15:38] I agree with you. We're still working this out, and the current situation is a compromise between security and product. But I hope to get to the point to test before publishing. [05:43:27] So I can't make a function that takes any of the quarters Q1-Q4 as values? (re @vrandecic: Ha, I forgot entirely about that, but it makes sense in the greater scheme of things (and better to break already now than to in...) [05:54:35] That should work, you can have the string Q1 or Z1. I wonder if it would make more sense to have this as a type though. (re @Jan_ainali: So I can't make a function that takes any of the quarters Q1-Q4 as values?) [06:02:22] Hmm so this on Z10697 is another error? (It's not very easy to parse...) : https://tools-static.wmflabs.org/bridgebot/1e0cd726/Sk_rmbild_fr_n_2023_08_15_08_01_30.png [07:15:19] Or did I do something wrong in https://www.wikifunctions.org/view/en/Z10699 (I am not really a developer so this might very well be the case) (re @Jan_ainali: Hmm so this on Z10697 is another error? (It's not very easy to parse...)) [08:02:41] @Jan_ainali that looks like this? ^ (re @mahir256: if you're working on manipulating/returning Qids as strings, be mindful of phabricator.wikimedia.org/T343593#9074979 (which is a...) [08:06:40] Not exactly the same, but it has the same message about wrong content type. But I interpreted Denny's message just before this as Q1 as a String should be possible (re @Nikki: @Jan_ainali that looks like this? ^) [08:10:30] ah, was looking at it on my phone so not very easy to compare 😅 [08:11:26] Would it perhaps be possible to workaround it by submitting the strings with double Q (like QQ1) [08:19:47] Tried that and got another great error message: [08:19:48] `Errors: None [08:19:49] Validator Error Summary: [08:19:51] [Z507/Error In Evaluation] [08:19:52] Expected Result: {"Z1K1":"Z40","Z40K1":"Z41"} [08:19:54] Actual Result: {"Z1K1":"Z5","Z5K1":"Z507","Z5K2":"Executor Returned Some Nonsense: {\"Name\":\"Function-Orchestrator\",\"Hostname\":\"Function-Evaluator-Main-Evaluator-5c845f4b8d-Tt6w2\",\"Pid\":7507,\"Level\":50,\"LevelPath\":\"Error\",\"Msg\":\"Executor Error: ReferenceError: Candidate Is Not Defined\",\"Time\":\"2023-08-15T08:14:54.930Z\",\"V\":0}\N{\"Z1K1\":` [08:20:12] Returned Some Nonsense 😆 [08:31:09] Pressing the `undo` link on the history page just takes me to editing the current state. Is that expected behavior? [08:32:24] T335713 [08:35:57] And now I added other test cases with only strings as input, and don't understand why they fail. 🤔 [09:01:22] See the reply from wmf about my suggestion of enabling structured data T344038 [09:02:56] It's considered a big task and it should require more explanation, since I saw different proposals on project chat they could be consolidated [15:42:22] Do one need full admin rights to delete a test? [15:42:43] what test do you need deleted? (re @Jan_ainali: Do one need full admin rights to delete a test?) [15:44:03] Or maybe not even deleted, just removed from a function. [15:44:39] I want to remove Z10698 from Z10696 [15:45:03] But we can keep it, because it is going to be used on another function [15:52:45] Or wait, is it not possible to add an existing test to a function? I only see `Create a new test` link. [19:40:31] Do we really want that deleted ZIDs can be reused or should this be prevented like on Wikidata? [19:41:23] See https://www.wikifunctions.org/w/index.php?title=Special:Log&page=Z10625 as an example [19:42:05] yeah that's not great, I assumed Zids worked like Qids [23:48:51] So what's the current policy about substituting strings for integers? I'm asking because I saw the function Z10599 [23:48:52] [23:48:54] I have some things in mind that I am waiting on until the integers start to be an option, has that discussion led somewhere?