[17:41:51] hi [17:44:01] @basvb: For the AM glam some images don't have maker['creator.role']. [17:44:23] So gives KeyError: 'creator.role' from https://github.com/infobliss/sibutest2/blob/master/glams/AmsterdamMuseumGLAM.py#L202 [17:45:07] for e.g, http://amdata.adlibsoft.com/wwwopac.ashx?database=AMcollect&search=priref=20931&output=json [17:53:49] so you check for the key [17:54:00] like I did for 20 of the other keys? [17:54:52] I used your code only [17:54:53] if 'creator.role' in maker [17:55:08] yep well there can very well be some mistakes in there [17:55:25] I tried to prevent those, but if you find a mistake feel free to just fix them [17:56:05] ok sure [17:56:23] other than that I think everything is working as expected [17:56:33] I made a few classmethods [17:56:47] to avoid instantiating objects pre-maturely [17:57:43] fore.g., https://github.com/infobliss/sibutest2/blob/master/glams/AmsterdamMuseumGLAM.py#L108 [17:57:43] why not instantiate when calling get thumbnail? [17:58:42] because get_thumbnail() is called prior to building gallery. Object instantiation is done after the final upload button is clicked [17:59:13] otherwise we will lose the objects already instantiated in the gallery building phase [17:59:48] generate_image_information is called later, so shouldn't cost that much resources [17:59:57] but not sure what's best there, just looks a bit odd to me [18:00:39] ok [18:00:46] I second you [18:01:34] excdpt that I don't think it is logical to instantiate for every image returned by the search [18:01:49] rather it's better to instantiate only for the chosen images [18:02:13] not sure whether I agree [18:02:18] the data has to be gotten anyhow [18:03:28] Do you propose to store the objects in the session? [18:03:39] for use in the other route [18:08:07] preferably I think so [18:10:07] ok [18:10:28] https://github.com/infobliss/sibutest2/commit/9e5c8f0948e6d1bde734267b3731d7d2f1799098#diff-7e4874f648e3d826a911e1ab8037b588R100 [18:10:36] are there files with cc0 in amsterdam museum? [18:10:50] yes [18:10:57] wait a sec [18:11:15] https://github.com/infobliss/sibutest2/commit/9e5c8f0948e6d1bde734267b3731d7d2f1799098#diff-7e4874f648e3d826a911e1ab8037b588R113 [18:11:21] that's code duplication [18:11:23] http://amdata.adlibsoft.com/wwwopac.ashx?database=AMcollect&search=priref=20931&output=json [18:11:37] I don't like this stacking of class methods and the code duplication it results in [18:11:48] aah ok [18:11:57] then I need to make a cc0 appendix to the other part as wel [18:12:15] cc0 aapendix? [18:12:52] add it to def_artwork license [18:13:01] ok [18:13:25] weird that that one is cc0 [18:15:05] nice work on the NA glam [18:15:25] :) [18:16:24] there is no duplicate methods in the NA GLAM class [18:21:41] There will much extra computation if we instantiate for each image returned by the search and keep the objects in the session. [18:21:48] Also it will be complicated [18:22:17] 1. For each image checkboxed by the user we have find out in a loop which object among the objects stored in the session matches the identifier and then call other methods on that object [18:22:29] that is not that hard [18:22:30] there could be 100s or 1000s of such objects [18:22:43] not hard but time consuming [18:22:58] maybe yes [18:23:19] I think you should discuss that a bit more at length with zhuyifei tomorrow (if he's here) [18:23:35] ok he was here in the morning [18:23:46] I should find him tomorrow [18:29:38] basvb are you going through the new code committed? [18:29:59] I did shortyl [18:30:08] but wont be going through all of it [18:30:28] I think you should be able to produce ok code without me combing through everything [18:30:38] + there is still enough pointers to continue with [18:30:47] ok may be we can discuss our next tasks [18:30:51] (not naming each glam in the app.py and making it scalable for example [18:31:09] yeah that part is a TODO [18:31:25] what else is on the todo list? [18:31:36] do we require editing of wikitext? [18:31:52] it's a nice to hae [18:31:53] have [18:31:56] but lowest on the list [18:32:42] ok do we need to do some more glam's metadata mapping? [18:33:04] would be nice, but I want to have everything working first [18:33:10] there is a lot of cleanup to do [18:33:16] and in 1-2 weeks the project is over [18:33:58] I did make things separate [18:34:11] i.e., generic codes are out of glam classes [18:34:16] app.py should be scalable [18:34:23] yeah sure [18:34:55] did some incode documentation as well [18:35:05] removed print statements [18:35:47] external documentation is in todo list [18:36:14] and the info on the website should be a bit better and more clear for somebody who doesn't know how it works [18:36:18] that's not clear [18:36:24] is multi-image working on toollabs now/ [18:36:26] ? [18:36:34] toollabs no [18:36:38] local yes [18:36:47] toollabs code is old [18:37:08] but once updated it will work there for sure [18:37:52] I was waiting since we did not have a consensus on where to instantiate the objects [18:38:00] so that is plenty of work for tomorrow [18:39:32] yes [18:39:54] I will remove the batch-upload menu button [18:40:15] since the batch-upload is taking place in the same page as single upload [18:40:54] ok [18:41:57] oh also I have issue of image overlap in the image gallery [18:42:08] I will have to fix that too [18:42:52] this issue appeared after I made all images to appear as equal sized in the gallery [18:45:59] yep seems like a good one to fix [18:46:10] sounds a bit of a weird issue to me [18:46:42] css issue [19:02:14] ok I'm off for today [19:02:16] good night