[04:56:48] infobliss: not sleeping in the day? [04:59:44] hi zhuyifei1999_ [05:00:12] I will have to work on the comments you both gave and finish them [05:00:32] I don't wish the project to be a failure [05:00:39] don't worry [05:01:18] It's the last week so this has to be more extensive than all other weeks [05:03:45] could you setup a tool on toolforge that is not 'sibutest'? [05:05:04] sure I will do it now [05:05:15] k [05:05:19] glam2commons? [05:05:25] sure [05:05:29] ok [05:05:32] add me and basvb as maintainer [05:05:44] in case something goes wrong [05:05:58] how to do that? [05:06:05] wikitech [05:06:14] ok let me check [05:06:27] https://wikitech.wikimedia.org/wiki/Special:NovaServiceGroup [05:07:05] https://wikitech.wikimedia.org/w/index.php?title=Special:NovaServiceGroup&action=managemembers&projectname=tools&servicegroupname=tools.glam2commons [05:11:30] do I keep the "Service user" textbox blank? [05:11:38] yes [05:12:07] done [05:12:40] thanks [05:13:04] Do you want me to migrate the code too? [05:13:10] yes [05:13:10] or later? [05:13:14] ok [05:13:56] IMO the code shouldn't be dependent on path changes, but it's not that easy on toolforge and v2c can't do it either :/ [05:14:49] you mean there are dependencies [05:15:00] I will get to know once I migrate the code [05:15:44] I mean optimally the tool should work regardless whether it's /glam2commons, /sibu, /sibutest, /glam2commonstest, whatever [05:15:49] but ^ is not easy [05:16:32] strange it should work whatever the name be [05:19:31] I will get the code migrated after an hour or so since I will need to go to the lab and connect to Toollabs via wifi [05:19:49] meanwhile I will be working to resolve your comments from yesterday [05:19:57] ok [05:40:17] 05:40:02 0 ✓ zhuyifei1999@tools-bastion-02: ~$ become glam2commons [05:40:17] tools.glam2commons@tools-bastion-02:~$ [05:40:19] ;) [05:40:54] yeah [05:41:38] you are in, that's as expected. Isn't it? [05:42:59] yeah [05:43:51] ok good [05:44:15] I thought I might have made a misteke [05:44:38] *mistake [06:20:05] zhuyifei1999_: Since we do not want to see the category textbox for multiple image upload should we keep a separate page for upload by search term? [06:20:14] I think that will be much cleaner [06:21:15] I had already planned a separate page for this purpose [06:21:28] the "Batch-Upload" menu button [06:22:16] otherwise I will have to be able to hide the category textbox if the search term textbox is empty [06:24:11] ???? [06:24:13] tl;dr? [06:24:45] ok [06:25:19] if the user gives a search term then we don't want to ask the category right away [06:25:31] yes [06:25:32] rather we show him the image gallery [06:25:42] yeah [06:25:42] and there ask the category [06:26:02] but for single image upload we ask the category [06:26:23] since both single image and multi image uplaod are in the same page [06:26:37] yeah [06:26:41] we have to selectively show category textbox [06:27:10] well, I don't think it is too bad to put the category input in the first page for multi upload [06:27:10] rather may we keep 2 different pages for single and multi upload? [06:27:20] ok [06:27:23] hmm [06:27:36] 2 different pages are okay as well imo [06:27:45] as long as you don't repeat a lot of code [06:28:23] yeah that brings me here [06:28:24] [02:30:27] https://github.com/infobliss/sibutest2/blob/master/app.py#L73 https://github.com/infobliss/sibutest2/blob/master/app.py#L89 https://github.com/infobliss/sibutest2/blob/master/app.py#L110 repearying code [06:28:49] yeah [06:28:53] I think the whole code will be less repeatitive if we have separate pages [06:29:01] maybe [06:29:22] otherwise I don't know how repetition may be avoided [06:29:30] in the above three places [06:29:40] util function [06:30:01] a generic method? [06:30:06] or complete rewrite your frontend and make it like v2c :P [06:30:09] no [06:30:17] function, not method [06:31:29] well imo in those 3 places we are doing completely different things [06:31:44] no, you are doing the exact same thing [06:31:55] find the class [06:32:00] in one place we are instantiating in the other we don't [06:32:12] that's irrelevant [06:34:56] so you are saying looping to find the class should have been avoided [06:35:04] no [06:35:20] I mean repeating the loop three times should be avoided [06:36:01] will a utility function be available for call at two routes? [06:36:13] depends on how you write it [06:36:18] I am sorry I didn't write one before [06:36:43] then write one and see if it works [06:37:03] Is it going to be inside app.py? [06:37:18] you can write elsewhere and import it [06:37:47] then is it ok to be in gen_lib.py? [06:38:01] we have the generic methods there [06:38:06] btw, I would love to rewrite the whole frontend :P [06:38:10] * zhuyifei1999_ looks [06:39:05] oh my god [06:39:11] have you flake8-ed? [06:39:33] basvb added some code [06:39:46] I think I will flake8 them [06:39:51] ok [06:40:02] I'll read after it's flake8-ed [06:40:12] * zhuyifei1999_ can't read unreadable code :P [06:40:27] ok a few minutes please [06:40:40] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L87 also get rid of these prints [06:40:52] when file exists you should have an exception [06:41:08] not print and ignore the error [06:41:32] yeah I rewrote them last night [06:41:42] let me checkin them [06:52:45] zhuyifei1999_ : https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L49 I think you said not to exploit {} [06:53:03] yes [06:53:21] so get rid of it [06:53:31] instead shall we put the var name inside {}? [06:53:39] yeah [06:53:44] ok [06:53:49] and constants in the string [06:53:55] no need to seperate [07:10:56] zhuyifei1999_ : https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py [07:11:25] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L17 dedent 4 spaces [07:11:48] ok [07:11:58] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L25 why? keep the original exception is usually easier to debug [07:12:16] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L45 no () [07:12:21] we aren't java [07:12:39] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L42 speace after # [07:13:04] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L50 what even is the elements [07:13:37] no one would understand element{0..2} [07:14:12] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L74 join [07:14:29] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L104 unreachable raise [07:15:12] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L92 errors are exceptions, not a string [07:15:16] just raise [07:15:26] use exceptions to control flow [07:15:33] again, we aren't java [07:16:19] thanks [07:17:39] how do I rename the elements [07:18:23] look, don't abuse .format if it doesn't improve readability [07:18:40] I'd use join [07:18:56] oh I see [07:19:51] a few more minutes [07:19:59] let me change them [07:30:11] have rewritten https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py [07:31:07] ... [07:31:26] do you see issues? [07:31:33] filetitle = ''.join(elements[order[0]], separator, elements[order[1]], separator, elements[order[2]], '.', image_ext) [07:31:50] nobody knows elements, order, etc. [07:32:04] https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py#L90 same issue [07:32:13] actually, I'll rewrite that thing [07:40:45] sorry, chatting with someone from WMCN [07:40:51] np [07:41:22] what even is order? [07:42:08] why does it need to be dynamic? [07:43:14] imo the order is keeping in mind other glams [07:43:24] ? [07:43:35] basvb probably wants to ahve that flexibility [07:43:47] for e.g [07:44:04] well, then don't have numbers to represent stuffs [07:44:14] File:Penantspiegel behorend bij de ontvangstzaal uit perceel Keizersgracht 185 - 20931 - AM.jpg [07:44:32] here the order is name, identifier, glamname [07:45:09] I mean, nobody is gonna to read through tons of code to finally arrive to what 2 means [07:45:21] yeah [07:45:46] a sec [07:45:50] ok [07:46:47] also can you try to make it under 80 chars? [07:46:59] ok [07:47:09] in a few minutes [07:47:37] I'll edit once the lines are shorter. [07:47:45] alright [07:47:58] * zhuyifei1999_ hates scrolling, especially horizontally [07:48:11] (my mouse doesn't support it) [07:56:55] zhuyifei1999_ : please check now https://github.com/infobliss/sibutest2/blob/master/libraries/gen_lib.py [07:57:41] docs included though [07:58:18] but I'll work on the join rewrite [07:58:30] strictly <80 for docs? [08:01:01] https://usercontent.irccloud-cdn.com/file/N2TxJJsC/Screenshot%20from%202017-08-14%2016-00-48.png [08:01:21] not strictly, but <80 is usually easier to read [08:04:50] I don't see the difference [08:04:54] https://usercontent.irccloud-cdn.com/file/WKX0HmQd/Screenshot%20from%202017-08-14%2016-04-30.png [08:05:00] rewrite ^ [08:05:17] I mean that first screenshot is what I see on my screen [08:05:43] uh [08:05:54] separator.join([elements[elmt] for elmt in order] [08:06:02] don't quote seperator [08:07:00] ok [08:07:07] thanks [08:07:26] well, do see how this one is easier to read/understand? [08:07:57] yeah I do [08:08:08] far easier to understand what elements are [08:09:17] by the way we were discussing whether to put the 'util function' in gen_lib.py [08:09:26] oh yeah sure [08:09:35] but idk why it's named gen_lib [08:09:45] ok [08:11:25] oh about the name what do you suggest? [08:11:33] utils [08:11:53] ok will get renamed [08:17:22] as of now I have changed the UI as suggested by basvb [08:17:35] and resolved some of your comments [08:17:41] I'll look once you get it deployed to /glam2commons [08:17:52] I mean the UI [08:17:53] ok [08:18:04] I will do it today [08:18:12] and before you sleep [08:18:47] well I will go have lunch now and work on the rest of the things after coming back [08:19:09] https://codeshare.io/GqN1yR is for my reference. Here I mark things done once they are done [08:19:37] ok [18:03:28] hi [18:03:48] hello [18:04:27] https://codeshare.io/5ge1gY [18:05:14] regarding the category textbox I had a discussion with zhuyifei1999_ [18:05:49] I'm reading the log [18:05:55] ok [18:06:14] 1. The limit for number of images loaded at a time is set to 100 [18:06:24] did you make that a parameter at the respective glams? [18:06:45] paramter of the search to identifier functions [18:07:26] no [18:07:42] for AM I did not do anything [18:07:58] gor NA I am fetching the json for 100 images [18:08:04] *for [18:13:08] ok it's very easy to make that a parameter [18:13:44] and I see you had a lengthy discussion about fixing mistakes in my (and I believe one of the other applicants) code [18:13:53] sorry for those mistakes in there [18:14:22] np [18:14:35] I should have flake8-ed them [18:15:25] https://quarry.wmflabs.org/ [18:15:28] http://tools.wmflabs.org/sibutest/ [18:15:43] You see that there they have a small description what it is [18:15:54] then I think: "hey this is where I should be I trust to login" [18:16:04] otherwise the login is stopping me if I don't know what I get [18:16:24] also "login with" is more correct [18:17:03] ok [18:17:05] So you could write something like: "import images from GLAMs to Wikimedia Commons". [18:17:14] and maybe: the following glams are supported: [18:18:18] I was also thinking of adding a flowchart in the homepage as you said the user should have no confusion about how to use the app [18:18:48] flowcharts won't help them [18:18:51] it just has to feel natural [18:19:04] how about screenshots? [18:19:08] no [18:19:14] it just should be natural [18:19:30] nobody want to have to first spend a minute or two minutes to understand a website [18:19:44] it's not that complicated of a website [18:19:44] ok [18:19:52] true [18:20:17] Please tell me when you think the website is ready for feedback [18:20:26] I will try to find some people to give feedback on it [18:20:39] please login to see the changes [18:20:41] I hope this will be ready for feedback in max 3 days, then you can use the other days to change it [18:20:42] inside [18:20:46] yes I see the changes [18:21:02] it's good, but this is about user flow so I want to ask some users [18:21:42] you should remove the batch-upload page [18:21:45] it's not there [18:22:00] the help page and the about page can be merged [18:22:12] we were discussing about the possibility of separating the single and multi image upload pages [18:22:34] ok for now we stick to the current together [18:22:43] and we will ask the people who test it [18:22:44] please comment on if you think it is ok to have the category asked for both single and multi image upload [18:23:05] it's ok, I'd prefer otherwise, but that wouldn't be that easy of a change [18:23:13] all of these things are about how users perceive them [18:23:22] so every user can have a different opinion [18:23:35] thus we will try to get some people to use the website and test it [18:23:46] and ask them these questions [18:23:49] I feel that after seeing the images in the gallery it is easier to decide the category [18:23:54] yes [18:23:59] I think so as well [18:24:03] so I'd prefer after [18:24:19] also if possible it would be nice to show the titles of the images [18:24:26] in the gallery [18:24:32] yeah that can be done [18:25:36] in the about page do we have only texts [18:25:38] ? [18:25:44] or some screenshots etc [18:27:29] only text [18:27:38] screenshots change often [18:28:00] alright [18:28:53] "Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application." [18:28:59] that's what I get [18:29:26] In the multiple image screen could you centre "Please select the images you want to upload" (a bit more to above) [18:29:39] also my initial attempt was to click images to select them [18:29:45] the select button is not that obvious [18:30:08] yeah there could be some things [18:30:22] I got the new code migrated to toollabs just now [18:30:26] still testing [18:30:37] ok, try multiple image upload [18:31:16] "Please select the images you want to upload" is centered already [18:32:46] I mean top-bottom centered [18:32:47] it's very much to the bottom [18:33:18] ok [18:33:27] Do you have any more questions for today? [18:33:35] And do you know what you can work on for tomorrow? [18:33:47] (I've to do some other stuff so like to keep it to 30 mins talk today) [18:34:04] If you think it is ready for real users testing it please indicate so [18:34:11] and I will ask some dutch users in person [18:34:21] + we will post something in the village pump [18:34:40] Nothing else to ask [18:34:45] I think making the pages on commons with documentation should be attempted to be done by then as well [18:34:46] For tomorrow [18:35:03] I will try two things [18:35:35] 1. Make the glamFullList.py and index.html be created dynamically [18:35:37] you still have to get app.py scalable correct? [18:35:41] aah ok [18:36:00] glamFullList, should dat be a .py file or can it be a .json or .config? [18:36:02] 2. Add a util function to app.py to avoid repetitive code [18:36:24] could be a json [18:36:36] I will ask zhuyifei1999_ what he thinks is right [18:36:55] https://github.com/infobliss/sibutest2/blob/master/glamFullList.py [18:37:03] remove the ones we don't support [18:37:12] and add the help texts [18:37:36] it looks like it could be a json [18:38:04] also think one more time about where which file (which folder) is logical and which files are no longer used (e.g. the glammappings folder) [18:38:26] yeah I will check that again [18:38:42] and add the help texts <= help texts meaning? [18:38:46] docs? [18:39:20] can you do quotes either with times or quotation marks/ [18:39:22] > [18:39:25] ? [18:39:54] ow help texts like the example url [18:40:07] every text which is glam dependent basicly needs to be in there [18:40:25] ok I gotit [18:40:39] which quotes are you referring to? [18:42:07] I thought you quoted me from long before [18:42:13] [20:40] which quotes are you referring to? [18:42:15] like that [18:42:20] or even better: "[20:40] which quotes are you referring to?" [18:42:37] oh alright [18:42:45] sure I will do that from next time [18:49:13] not a big thing, but a little clearer [18:50:00] yeah of course I get your point. otherwise it's hard to read. [19:02:44] I'm off nn