15:07:58 #startmeeting Koha Developer IRC meeting, 9 September 2014 - part 1 15:07:59 Meeting started Tue Sep 9 15:07:58 2014 UTC. The chair is tcohen. Information about MeetBot at http://wiki.debian.org/MeetBot. 15:07:59 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 15:07:59 The meeting name has been set to 'koha_developer_irc_meeting__9_september_2014___part_1' 15:08:11 #topic Introductions 15:08:12 #info wahanui, a bot that has become sentient 15:08:19 #info Owen Leonard, Athens County Public Libraries 15:08:27 please introduce yourselves using #info name 15:08:44 #info Tomas Cohen Arazi, Universidad Nacional de Cordoba 15:08:47 #info Claire Hernandez, developments manager at BibLibre 15:08:48 #info Thomas Dukleth, Agogme, New York City 15:09:22 #info Jonathan Druart, BibLibre 15:10:09 ok, moving on 15:10:14 #topic RM 3.18 comments 15:10:46 #info facet retrieval from Zebra is complete, feedback is needed 15:11:13 good job tcohen :) 15:11:16 #info Zeno Tajoli, Cineca (Italy)ù 15:12:01 tcohen: what is the bug number for that 15:12:02 ? 15:12:09 thd, was looking for it 15:12:14 #info Kyle M Hall, ByWater Solutions 15:12:19 bug 11232 15:12:23 i heard bug 11232 was relevant in the medium term, as one of the side effects of using Zebra to calculate facets will be to make library facets both more correct as well as easier to tweak 15:12:23 04Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11232 new feature, P5 - low, ---, gmcharlt, Needs Signoff , Retrieve facets from Zebra 15:12:28 #info Martin Renvoize, PTFS Europe 15:12:29 #info facets from zebra is needs sign off, bug 11232 15:13:06 i have added a new syntax for facets specification 15:13:23 #info Nicole Engard, ByWater Solutions 15:13:38 https://github.com/tomascohen/koha/commit/5b0b36895bad75052e8a0e362e561a8631f103f2 15:13:47 ^^^^^ there you can see the syntax 15:13:48 fantastic work there tcohen 15:14:12 ashimema: we need to first see how it develops 15:14:18 then drink some beers 15:14:19 :-P 15:14:42 ok, next 15:14:44 deffo 15:14:50 tcohen: Is this still bound to subfield a? 15:15:02 thd: no 15:15:05 ah no 15:15:09 tcohen: it's worth some beers, definitely ;) 15:15:20 yes I just saw the good part of the code 15:15:25 thd: https://github.com/tomascohen/koha/commit/281808cce6cc94e26beb6281ec44daada0a85595 15:15:34 Great tcohen++ 15:15:45 UNIMARC is better as an example 15:15:56 #info Barton Chittenden, ByWater Solutions, Louisville, KY, USA 15:16:08 #info Alex Sassmannshausen, PTFS Europe, UK 15:16:21 people that tested it already proposed future enhancements 15:16:58 ok, next topic 15:16:59 next topic is a tricky one... 15:17:09 we didn't know how to call it 15:17:12 Certainly there are enhancements to come.. but this is certainly an awesome start! 15:17:16 but here we go 15:17:21 #topic General technical discussion 15:17:43 This discussion might as well take place on the list 15:17:54 #subtopic To mock or not to mock...? 15:17:57 heh 15:18:36 that is the question... 15:18:41 discussion already started on trello: https://trello.com/c/vsrkdpvv/27-tests-mocking-when-to-and-when-not-to-that-is-the-question 15:18:47 * ashimema couldn't resist 15:19:10 as i wrote on trello, I think unit tests should be fully mocked 15:19:26 and integration tests should be written for using the DB 15:19:37 What are people thoughts generally.. I'm with tcohen and beleive if possible we should mock.. using db is as a last resort in my mind. 15:19:38 the problem is we don't have infinite time to do it 15:20:30 It's not a problem not to mock. I think the main problem is to be data agnostic, isn't it? 15:20:48 yes 15:20:58 I suppose they're two questions then.. 15:21:18 I have the same opinion of tcohen. 15:21:32 data agnostic is fine.. so long as you have a sql server running to push randomised data to.. 15:21:34 You cannot always have a good test which is really data agnostic. 15:21:49 data agnostic is good goal 15:22:00 Definitely being data agnostic would be good. The tests that I wrote using mock were a little painful, but I'm not sure how else I would have tested. 15:22:09 do we ever need to test without a sql server on the system at all? 15:22:12 So I'd rather go with mock than not to mock for unit tests :-) 15:22:13 Testing some behaviour requires data which will elicit the behaviour. 15:22:14 all data to test inside the test 15:22:41 (that's a question for the package builders out there.. currently I know packages build without running ANY db_dependant tests.. the question is why?) 15:22:52 clearly you need an sql working 15:22:58 ashimema: because when building a package there's no database available. 15:23:00 ashimema: during packages build, we run non db-dependent tests 15:24:01 so.. in the packages case.. it needs to be completely mocked.. not just data agnostic if we want it to get tested.. 15:24:05 that's my point of question 15:24:22 Is this question concerning building or patch testing? 15:24:31 the thing is using the DB might prevent us from detecting side effects 15:24:52 our tests should be organized in a way they could be run randomly 15:24:58 and mocked 15:25:17 I think that our standard db_dependant test could be: 1)insert data in sql server 2)test 3)drop data 15:25:18 and probably leave db-dependent tests to jenkins or smth like that 15:25:39 In which case.. do we need a TestBuilder like module that mocks instead of pushing random data to the database? 15:25:54 tcohen: What side effects would you have in a Db which would be missed there but caught by mocking? 15:26:27 thd: a test might be writing data that is making the next test to pass, just because the data is there 15:26:40 * ashimema is playing devils advocate.. 15:27:20 tcohen: Refreshing would be required then but that would add to the overhead. 15:27:29 Maybe the question is "what is the next step?", not "what could be the ideal situation?" 15:27:49 s/Refreshing/Dropping and starting again/ 15:27:52 ashimema: algorithmically mocking a package's API is harder than checking foreign key constrains, i guess 15:27:53 Joubu++ 15:28:26 Yohann proposed a way to generate random data, to be data agnostic, (see TestBuilder). 15:28:34 So.. I'm happy to say that db_dependant have their place.. 15:28:35 tcohen: Is this question concerning building or patch testing? 15:28:44 Who has already took a look?? 15:28:56 me ;) 15:29:06 thd: patch testing 15:29:11 so we agree that instead of 'To mock or not to Mock' the question is 'Should be be data agnostic' and the answer to that is obviosly yes. 15:29:33 morning (sorry to be late 15:29:42 #info Brendan Gallagher ByWater 15:29:45 ashimema: so, the next question: "how?" :) 15:29:49 hi bag 15:29:56 heya tcohen 15:29:59 and we come round to TestBuilder.. 15:30:25 ashimema: What do you do with random data which does not trigger the behaviour against which the past needs to be tested? 15:30:48 s/past/patch/ 15:31:41 thd: TestBuilder is supposed to (for example) create a branch (taking care of all needs to be set for that) and then you use the created branch 15:31:50 It's not random data so much, as adding foreign keys for you. 15:32:33 We have a bunch of tests that will fail if run against a database other than the one that resides on the jenkins server.. I think that wrong personally. 15:33:03 They fail due to the test assuming stuff about the data already in said database.. like default category codes for example.. 15:33:42 I think we should give TestBuilder a try. We can remove it later if we find a better solution. 15:33:50 So.. the point of testbuilder from my understanding is so you can put some specifics in your database to check against (and test builder will take care to add all random foreign keys for you).. 15:33:57 so it's not about randomising everything.. 15:34:22 it's just about ensuring you meet all foreign key constraints when attempting to add fake data for testing.. 15:34:27 is that all correct Joubu? 15:34:41 s/fake/random 15:34:42 yes 15:35:13 example: http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30090 15:35:30 not s/fake/random in that last case.. you should still be able to add some specific data to a specific field.. so you can test for fringe case that are only caught with such data.. 15:35:34 +my $order1 = $builder->build({ + source => 'Aqorder', + value => { + datecancellationprinted => undef, + }, + only_fk => 1, +}); +C4::Acquisition::NewOrder($order1); 15:35:37 oops 15:35:46 no need to create biblio, budget, etc. 15:35:53 exactly.. 15:35:57 they are created automatically with random data 15:36:08 anyone else care to chip back in? 15:36:47 Long term.. i'de prefer we added the functionality to the cpan module mentioned as an alternative in the bug.. 15:36:57 what does mean chip back in ashimema ? 15:37:03 but I tihnk for speeds sake we're probably best pushing TestBuilder as is? 15:37:23 clrh.. any other comments outside Joubu and My ramblings (conversation) 15:37:28 (ok thanks) 15:37:32 as is in debian stable better 15:38:00 ashimema: not sure, because we will certainly introduce some Koha specific stuff (the db structure is sometime not good, fk cannot be follow to create data). 15:38:27 attention on use modules from CPAN, only if mandatry for same feature/fix 15:38:34 either way.. can we agree on TestBuilder being pushed or not? 15:38:45 it's bascially passed qa now.. I just felt this discussion was needed 15:39:53 great, moving on? 15:40:00 In my opinion yes 15:40:07 tcohen? 15:40:07 tcohen is, like, obsessed with automated testing :) 15:40:20 sorry, i was called by te boss 15:40:58 i'm not sure about the approach to unit testing 15:41:05 i don't think we are doing unit testing either 15:41:27 but I see TestBuilder as a shortcut to something "closer" to unit testing 15:41:28 we're certainly mixing unit tests with integration tests.. 15:41:31 tcohen: some tests are unit tests, others are integration tests 15:41:34 and also have some integration tests 15:41:37 at the same time 15:42:05 so, in the short term, I'd agree we can have *better* tests using testBuilder 15:42:26 my only concern is technical debt 15:42:30 I don't think so 15:42:41 but easily to write, so more unit tests :) 15:42:50 we aught to more clearly define when you should write a 'db_dependant unit test', a 'db_independant unit test', a 'integration test' 15:43:39 My last questions regarding testbuilder can go on off meeting.. (there are to do with that dbic followup) 15:43:39 i think it was gmcharlt_that said we could separate context-dependent vs. non-context-dependent 15:44:00 mocking context is actually pretty straight forward.. 15:44:15 ashimema: mocking is pretty straightforward 15:44:16 :-D 15:44:28 and in fact.. there's a lib for it too t/lib/Mocks 15:44:45 quite empty... 15:44:51 i think we could push TestBuilder, butI'm confident I'll continue to write mocked tests 15:45:15 if you have a db_dependant test that passes, and a db_independant that doesn't, that could be useful information... 15:45:30 indeed.. 15:45:33 barton: we need both, I agree 15:45:38 but that measn writing both ;) 15:45:42 yeah 15:45:50 that's what i was saying about infinite time 15:46:15 see.. I would like TestBuilder at some point to morph into a 'got db, test agianst it, not got db.. mock it' module 15:46:34 yeah, that's where I was going with that. 15:46:41 anywho.. lets either move on or vote ;) 15:46:50 +1 15:47:09 ashimema: i moved Testbuilder specific discussion to next meeting yesterday 15:47:30 I missed that.. sos 15:47:36 not sure how to deal with that 15:47:41 next topic then :) 15:47:58 i pretended that we discussed the basis for the decision today 15:48:11 and also hear the folks from part 2 15:48:39 ok, moving on for now 15:49:07 #info we are voting the inclusion of TestBuilder next meeting 15:49:18 ok 15:49:27 #subtopic bugs that need feedback 15:49:36 - Bug 10273 GST/VAT/Tax rewrite - Needs more feedback! 15:49:37 04Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10273 normal, P5 - low, ---, jonathan.druart, ASSIGNED , Unit tests should not be dependent on the Jenkins database 15:49:51 :/ 15:50:12 tcohen: Can I explain a liittle or you just list them? 15:50:23 please, explain 15:50:32 ok, so the entry point is the wiki page (http://wiki.koha-community.org/wiki/GST_Rewrite_RFC). 15:50:57 I started to submit some patches last week (and today), I would like to get feedback on patches I already submitted. 15:51:06 I propose to explode the Acquisition module into small module under the Koha namespace. I will add missing unit tests and use DBIC when possible. 15:51:20 I really think this plumbing part is inevitable for the future of the Acquisition module and to add a correct vat management. 15:51:41 That's why I am a little bit stuck, I cannot continue to develop other parts if the method I used is not validated by the developer team. 15:52:19 How I see the next steps: I will try to provide as many small changes as I can without any behavior changes. 15:52:21 When the code will be refactored, it will be easy to change the way prices are calculated. 15:52:48 I still plan to add the column configuration stuff to the acquisition tables (invoices, basket, etc.). But this will be one of the last steps. 15:53:16 Some wording should be decide too. How the DB columns should be named? What about the rrp term? Is there a better appropriated term? 15:53:27 need native speakers here 15:53:30 Joubu: Do you know if the code supports tax rates which are more granular than the smallest unit of the currency? 15:53:34 i think refactoring that code is a valuable task, we need to support Joubu's effort 15:53:45 Native speakers who understand acquisitions :P 15:53:56 agreed.. refactoring is certainly super sensible. 15:54:14 so far so good Joubu.. 15:54:21 I am trying to add as many UT as I can 15:54:45 But I cannot continue without getting a consensus on the patches I already submited. 15:54:53 Refactoring may be essential to resolving the problem that every free software accounting program does rounding incorrectly from an accounting perspective. 15:54:58 can u add links to those small-step patches/bugs? 15:55:14 whats the bug number again? 15:55:19 what he said 15:55:26 thd: you can give feedback on the RFC if you want. Some of these questions have already been discuted 15:55:39 ashimema: the entry point is the wiki page :) 15:56:00 then bug 12825 15:56:01 04Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12825 enhancement, P5 - low, ---, jonathan.druart, ASSIGNED , GST / VAT rewrite 15:56:06 then bug 12826 15:56:07 04Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12826 enhancement, P5 - low, ---, jonathan.druart, ASSIGNED , GST / VAT rewrite - plumbing 15:56:10 As Cineca we have many attention on ACQ. We are starting to test the present patch as are on 'Need Sign off' status 15:56:27 #link GST rewrite http://wiki.koha-community.org/wiki/GST_Rewrite_RFC 15:56:40 Joubu: I know that the issue has been raised in the RFC. 15:56:57 #info feedback is needed urgently 15:57:20 Joubu: The same issues have been raised with free software accounting software without resolving the issue. 15:57:52 for us the refactory line on Joubu is OK. 15:58:21 thd: You can share on the wiki page what is a correct rounding management, if you like. 15:58:32 can everyone interested give Joubu feedback on the RFC? 15:58:50 For name of DB coloums we prefer the "long_name" policy 15:59:17 ztajoli: we will be discussing that on the next topics 15:59:47 Joubu: That is the problem that correct might even vary by the accountancy rules in a particular jurisdiction and defies programmer centric rules about significant figures etc. 16:01:13 thd, Joubu: please include those aspects of the problem on the RFC 16:01:18 I am not aware of these rules. 16:01:24 thd: yes, please 16:01:46 Joubu.. I'll take a look at those bugs.. but I'm currently working through qa on the UTF8 bug and QA on an emails bug.. they're tkaing allot of me qa time at the minute. 16:01:58 heh 16:02:01 tcohen: I will try to add appropriate comment and link to some discussions of the issue in free software accountancy programs. 16:02:10 thanks thd 16:02:13 moving on then 16:02:38 another one that needs feedback Bug 12830 16:02:40 04Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12830 enhancement, P5 - low, ---, jonathan.druart, Patch doesn't apply , Move the order-related code into its own module 16:03:18 12830 and 12896 (submited today). A (new) try with Class:Accessor and DbIC 16:03:45 I would like to base the code on these 2 new modules for the rest of the rewrite. 16:04:27 khall: maybe? :) 16:04:58 #info Jonathan needs feedback on bugs 12830 and 12896. Specifically his approach to Class::Accessor and DBIc 16:05:23 worth poking rangi too for Class::Accessor advice ;) 16:05:45 he will (hopefully) be on part 2 16:06:13 we need to move ahead 16:06:36 #topic Additions to Coding Guidelines 16:07:09 there is a proposal from dcook to amend the coding guidelines 16:07:21 https://trello.com/c/8d7pELLj/28-coding-guidelines-koha-preference 16:07:39 so TT plugins are used for fetching preferences instead of passing them from .pl 16:07:53 can everyone view that link? 16:08:14 tcohen: yes I think so, the board is public 16:08:37 "tcohen" at 172.16.248.212 pasted "Proposed text fro Koha.Preference usage on TT" (3 lines) at http://paste.koha-community.org/197 16:09:09 yep and agreed 16:09:16 agree 16:09:18 ok, objections? 16:10:01 Koha.Preference usage mandatory then 16:10:06 ? 16:10:13 out of curiosity, what is the reason for not passing in the variable in pl 16:10:14 ? 16:10:18 When is HTML 7 coming :) ? 16:10:19 is it purely conciseness? 16:10:35 atheia.. basically yes ;) 16:10:57 OK. I think I'm fine either way then :-) 16:11:46 #agreed (subject to votes from part 2) https://trello.com/c/8d7pELLj/28-coding-guidelines-koha-preference will be added to Coding guidelines 16:12:09 next one: should we use DBIC on .pl scripts? 16:13:33 opinions? 16:13:33 opinions are slightly divded :) 16:13:34 I think this has already been discussed :) 16:13:42 And nobody agrees 16:14:01 meaning? there is no agreement on either? 16:14:26 I think DBIC should only be used in pm script. For the maintainability, for UT and for reusability 16:14:44 tcohen: in pm script... In pm module 16:14:49 I kinda agree with Joubu.. I feel the need for database lookups in pl scripts highlights a flaw in the .pm 16:14:55 Joubu: I would disagree. I think we should move in the long run to reducing the number of modules and moving logic into DBIC 16:15:17 the logic should be tested :) 16:15:30 agreed, it can still be unit tested 16:15:54 but we currently only demand unit tests on modules.. not scripts.. 16:16:35 the line between what belongs in a module and what belongs in a script becomes rather fuzzy if we allow this? 16:16:38 business logic should be removed from the .pl scripts 16:16:39 that would still apply, the code would only move to Koha/Schema/Result and Koha/Schema/ResultSet 16:16:55 tcohen: agreed, the logic should not be in pl scripts 16:17:18 ok, should we vote? 16:17:40 so assuming we went to allowing dbic in scripts.. would we impose limits upon what it can be used for? 16:17:41 or do we all agree (at least) that no db call should be done on the .pl scripts? (it includes DBIC) 16:17:52 ah, we don't yet agree heh 16:17:54 using DBIC in pl scripts should be equivilent to using pm subs in pl scripts 16:17:59 tcohen: not really fair to vote. :) 16:18:34 khall.. where do you see the line being drawn? 16:18:41 tcohen: I think there is a line to walk here. I think using find and simple searches should be allowable in pl files 16:19:18 otherwise we are just jumping through hoops that don't need to be there 16:19:18 khall: why it's equivalent? If you call create something in the pl script, you want to test it 16:19:18 khall: I think CRUD operations are ok 16:19:18 khall: simple example: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 16:19:19 04Bug 12891: critical, P5 - low, ---, koha-bugs, Signed Off , NewOrder does not return ordernumber 16:19:20 critical bug found yesterday 16:19:37 We have to have an unit test for this regression 16:19:59 tcohen: You might exercise your authority as RM during your term, however, further discussion towards some consensus would be helpful. 16:20:12 thd: :-D 16:20:57 I don't think that is a good and applicable example Joubu 16:21:00 khall: ok last link is not relevant :) 16:21:15 yes, read too fast, sorry 16:21:42 can we discuss this on the list? so we have broader opinions and maybe reach some consensus? 16:21:43 khall: how to you defined "simple" searches? 16:22:14 anything where the search criteria isn't determined at run-time 16:23:18 khall: if you need the same result somewhere else, you will have to c/c your code 16:23:24 anything complicated we can have as a canned method for the resultset 16:23:31 tcohen: ok for a discussion on the list 16:23:49 also for me ok for a discussion on the list 16:24:01 we really aren't taking advantage of the power of dbic at the moment 16:24:18 khall: we will soon :-D 16:24:25 we don't need a sub in a perl module, we can have a method in the ResultSet, which would be unit testable 16:24:44 khall: can you post an email to the list with your POV 16:24:55 module subs should only be needed when evaluation across tables is required 16:24:58 tcohen: sure! 16:25:00 including how to properly test our ResultSet classes? 16:26:21 #action Kyle will start a discussion on the koha-dev list on taking advantage of DBIc in our code base. We will discuss where to use DBIc, and how to properly test our ResultSet classes 16:26:42 and a coding guideline for it ;) 16:26:55 of course :-d 16:27:45 #cochair ashimema 16:28:16 need to run, ashimema will continue to chair 16:28:31 #chair ashimema 16:28:31 Current chairs: ashimema tcohen 16:28:40 ok.. so moving on. 16:28:44 bbl, thanks everyone 16:29:31 next topic? 16:29:31 next topic is a tricky one... 16:29:49 #topic Naming of database columns 16:29:59 sorry, had to catch up in the agenda 16:30:24 khall.. I think this one was one of your suggestions. 16:30:29 It's a request from khall 16:30:35 yep 16:30:48 did you do some wording for a new guidline? 16:31:33 tables should be named as plurals with each word separated by underscores 16:31:42 we should follow standard dbic naming conventions 16:31:49 or, whilst you come up with some wording.. can we agree to column_name as convenstions? 16:31:52 I'll try to locate a document that specifies them, if there is one 16:32:53 #info column_names made up of multiple words should be joined with underscore to maintain dbic standards 16:33:24 I'm happy to go with that.. does everyone agree? 16:33:29 and should be plural 16:33:32 +1 16:33:38 makes sense to go forward being dbic compliant 16:33:43 +1 16:33:48 +1 16:33:53 aslo for me makes sense to go forward being dbic compliant 16:33:55 +1 16:34:02 koha_widgets rather than koha_widget 16:34:03 not sure about the plural form. 16:34:11 But +1 to follow DBIC conventions 16:34:24 plural form is a dbic convention too is it not? 16:34:31 +1 16:34:54 either way.. I think the dbic convenstions are sensible and it would be nice to tie it down to them.. 16:35:04 khall you ok to add a rule to the guidlines? 16:35:31 an url could be useful 16:35:40 yes 16:36:20 I think the rule should just be 'follow dbic conventions' and list the important parts ( underscores, plurality, etc ) 16:37:05 that would include the primary key being 'id' and any foreign keys being the table name, rather than the primary key name 16:37:06 #agreed To add a rule to the coding guidelines that mimicks that of the dbic conventions for column_names pending this evening meeting 16:37:52 #info exact wording of guidline to be decided (after looking up dbic specifics) 16:37:57 we ok to move on? 16:38:59 * ashimema wonders if he's started talking to himself? 16:39:08 yes 16:39:22 #topic Requirements for CLI scripts 16:40:04 I can c/c the note I put on the trello: 16:40:05 First:Are we happy with Joubu's suggestions? 16:40:14 yes please :) 16:40:17 I thought some guidelines existed for Koha scripts, but actually they don't (or I don't find them, I did not search for a lot). 16:40:18 I propose misc/cronjobs/delete_patrons.pl as an example of the best pratices (I don't tell that because I am the author...). 16:40:25 It uses: - Pod::Usage 16:40:25 - GetOpt::Long 16:40:25 - the -c parameter to confirm the changes 16:40:26 - call pod2usage if something wrong with the parameters 16:40:26 - add the POD at the end of the file 16:41:16 I am not certain about forcing -c as the confirmation parameter. 16:41:33 most seems sensible to me (and is how I've been writing recent scripts too). 16:41:38 I also wonder about the -c.. 16:41:45 do 'all' scripts need a confirmation? 16:41:53 I agree in general, but these rules will mean I probably will not continue development of my cli patron importer. 16:42:04 and if they do.. should they all have a 'dry run' mode 16:42:05 ashimema: not all, but gmcharlt_ asked that when he was RM 16:42:23 I can see the advantage of consistency but adopting some script existing in the world may be a problem. 16:42:44 are you doing much on the patron importer khall? 16:43:26 I felt your bringing the liblime patch up to date was more of a stop gap, whilst a proper refactoring of the imports stuff was done.. (i.e splitting out import into a module) 16:43:27 it's good to go. I would like to just have the tools patron importer work from the command line, which is what my first addition of the patch did 16:43:48 I favour requiring a confirmation switch if running the script without parameters otherwise might do something bad or unexpected. 16:43:52 I was told this is frowned upon, so I made it cli only 16:43:59 (it doesn't work with patron attrbiutes btw; ;) ) 16:44:10 but now it has alot of duplicate code 16:44:41 Are there objections to requiring that new cli scripts must have a confirmation parameter? 16:44:56 splitting everything out to a module is the best way to go, I can totally agree. 16:45:29 do we have any scripts that don't alter data? 16:45:44 for me +1 on must have a confirmation parameter 16:45:55 All the scripts which I write merely display usage information if run without parameters. 16:46:09 question: what will the standard behavior for not passing -c be? 16:46:12 What would happen if no -c parameter is passed? 16:46:15 indeed :-) 16:46:18 dry run if possbile? 16:46:24 khall: yes 16:46:31 just a warning if lazy? ; ) 16:46:38 khall: I set the verbose flag when -c is not given 16:46:47 I like even requiring a parameter for test mode. 16:46:48 I would expect the script to show help information if the -c was not passed 16:47:11 also I would expect the script to show help information if the -c was not passed 16:47:19 so we agree to needing some guidlines.. 16:47:26 but can't agree yet on the -c 16:47:33 but surely if you invoke a script you expect it to do something - why else would you invoke it? 16:47:36 If default displays usage information you do not need to read the source code to determine the help parameter. 16:47:42 agreed, we should require -c, display help if no -c, and have -t for dry runs 16:47:47 So I think there should be a tangible benefit in forcing the user to pass -c 16:47:56 like running in dry-run makes sense 16:48:03 But just showing help does not… 16:48:08 If you see what I'm saying? 16:48:23 hmm.. 16:48:37 I'm with atheia... 16:48:39 atheia: I think the tangible benefit is getting the help and not altering the db by accident 16:48:40 atheia: yes, I agree 16:48:43 I object to requiring confirmation parameter to be -c. 16:49:00 thd: why? 16:49:59 OK, so just running this through: 16:50:13 go on 16:50:20 It may be a good default but a strong requirement may complicate adapting and maintaining some existing script from outside Koha to Koha. 16:50:44 If we require -c to do something to the db we're saying it's a fail-safe against accidental use. 16:51:05 thd: are you asking for scripts you are going to submit on bugzilla? 16:51:12 thd: Do you have an example? 16:51:15 So we are targetting this at someone who normally does not use cli commands, and who would simply expect information when running a command, rather than behaviour? 16:51:57 Many scripts in the world use -c for other purposes. FSF recommends -c for displaying copyright information. 16:52:14 thd: So all you object to is the letter choice? 16:52:21 Yes 16:52:34 how about —confirm 16:52:37 I perfectly agree with requiring some confirmation 16:52:38 thd: it's like that for a lot of Koha scripts... 16:52:39 * oleonard doesn't really care about the letter, just the behavior 16:53:04 I see.. 16:53:16 I'm not so hot on the behavior -- it feels distinctly un-unixy. 16:53:22 so we're now agreeing to a --confirm.. 16:53:30 atheia: yes 16:53:31 but not yet to it's action 16:53:37 Joubu: I merely identify a potential problem for bringing some new script into Koha adapted from another community. 16:53:42 i.e if missing.. dry run.. or if missing.. help 16:53:43 I do agree with barton's point 16:54:10 I would expect a dry-run without action. 16:54:26 I'm thinking without confirm it should dry run preferably.. 16:54:33 +1 for dry run 16:54:37 is there any precedent for this behavior with other unix utils? 16:54:38 ... if '--confirm' (or perhaps --commit) were missing. 16:54:43 but I don' think allo of our current scripts do dry runs at all ;) 16:54:46 ashimema: actually if the output is explicit, we don't care... 16:55:14 Does GetOpt::Long prevent a short form from doing something. It had not in my past testing. 16:56:01 I would like the behaviour to be dryrun but I think requiring it for cli scripts would be pretty difficult, just in terms of providing a 'dryrun mode' for existing and even new scripts. 16:56:29 Generally one might require confirmation for dangerous behaviour so there is some precedent in unixy tools. 16:56:30 I favour requiring a parameter even for dry runs. 16:56:37 how about.. if possible to dry run.. then without confirm we get dry run.. if not possible to dry run.. we return help 16:56:44 are we just saying that we can't trust sysadmin's to use Koha's scripts correctly with this idea? 16:56:52 Dry runs of some possible scripts could thrash your system. 16:57:03 But what we're saying here is that scripts are always dangerous, and that we don't trust the user by default. 16:57:09 very true.. hadn't thought of that case thd 16:57:50 i'm sort of edging toward.. no confirm always give help test.. and a dry run requires a -t (but not nessarily a --confirm)? 16:57:54 All of the scripts which I write do nothing but display usage information when invoked without parameters. 16:58:09 I also agree to that thd. 16:58:12 atheia: You can also think of it as making scripts user-friendly, since the user doesn't have to be afraid to try running them 16:58:18 ashimema: dry run should definitely not require confirm. 16:58:25 they should be mutually exclusive 16:58:32 agreed khall 16:58:34 What dry-run would trash a system? that's a crazy dry-run? or am I naive here? 16:58:49 heavy db reading 16:58:58 heavy db reading 16:59:02 jinx 16:59:06 lol 16:59:07 ah interesting :)- 16:59:08 :-) 16:59:11 makes sense. 16:59:29 atheia: I think that was thrash, not trash 16:59:34 khall: What about a script which reads your entire database and manipulates it without writing anything as thrashing dry run behaviour? 16:59:44 so we need to confirm the dry-run? 16:59:47 (;)) 16:59:50 ok.. can i go for an agreed on.. we need guidlines for it.. and we agree on --confirm for all scripts.. and lack therof displays help 17:00:20 fine by me. 17:00:45 also for me 17:00:50 not sure we've reached consensus, but I can accept —confirm and —test with the default being the help 17:00:51 yep 17:00:51 #agreed To add requirement for new CLI scripts to guidlines 17:01:07 I'm with khall. 17:01:21 When I tried to write --something parameters in the past using GetOpt::Long I found that -s would have the same function. 17:01:26 +1 for khall's statement. 17:01:31 —test shouldn't be mandatory, as some scripts can't do dry runs 17:01:40 #info Pod::Usage, GetOpt::Long, pod2usage, POD at end of file and --confirm (where lack of display help test) 17:01:51 thd: it can be done 17:02:22 barton: indeed, subtle difference between thrash and drash :-) 17:02:22 is that info comprehensive enough without blocking too much? 17:02:23 please add examples with the rules when possible to help new developers 17:02:34 +1 khall 17:02:43 anyone facny havig a punt at wording that for the guidlines and adding it? 17:02:48 what about —test ? are we not making a decision on that? 17:02:54 khall: I may have solved it the past but you will show me if I do not see that in my old code ;) 17:02:59 I don't think --test should be mandatory.. 17:03:00 we can just say it's a strong recommendation and best practice 17:03:20 ok by me.. 17:03:27 but.. shall we move onto the next topic ;) 17:03:34 agreed. 17:03:37 agreed. 17:03:46 Recommended with the explanation of please avoid thrashing the user's system by surprise. 17:04:02 #topic Wording of bug 10860 17:04:03 04Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10860 enhancement, P5 - low, ---, jonathan.druart, Needs Signoff , In-House Use 17:04:17 ashimema: could you explain for me please? :) 17:04:24 did anyone come up with any alternatives ti 'In house use' 17:04:39 So.. 17:04:58 how about "on-site only" 17:05:01 The feature is for statistical tracking basically.. 17:05:16 haha.. funnily enough. that's what I ended up suggesting. 17:05:58 I'm still not clear what this feature does. 17:06:26 Why "inhouse use" is for anonymous use only? 17:06:32 We've already go statistical users for tracking when an item has been 'used' withn the library (i.e left out on a desk at the end of the day).. 17:06:51 I'm assuming it gives the ability to track the use of an item that can't be removed from the library 17:06:56 Joubu's feature adds the ability to track specifc uses by patrons for say a monitored material that's not alloud to leave the library.. 17:07:01 +1 for on-site use 17:07:02 that's about ti right, joubu 17:07:03 this connects the use of the item to a patron, correct? 17:07:04 khall: I think the issue I had with long parameters was forcing the same behaviour for shell scripts between bash MSDOS and Perl for parameters. 17:07:44 thd: I could see that happening. However, Koha no longer functions on Windows, so it should be a non-issue. 17:07:47 yeah, from what I understand on-site is better 17:07:51 This is a very common scenario in rare book libraries. 17:07:52 +1 on-site 17:07:52 We've got normal lending (off site), we've got statistical lending (were the librarian performs a check in to signify an anonymous has of I item on site) and finally there monitored reference only use (on site, but not anonymous). 17:08:19 ok thanks everybody :) 17:08:20 I'd vote for "in-house" except we're already using that for statistical purposes. 17:08:28 local use? 17:08:33 that's another way people refer to it 17:08:38 hehe.. jcamins don't stir ! ;) 17:09:01 ashimema: sorry! 17:09:05 my vote goes to 'on-site' 17:09:08 I felt 'local use' wasn't descriptive enough for some reason.. can't rmember why though 17:09:23 you happy with 'on-site' Joubu? 17:09:33 if so.. we'll move on :) 17:09:34 I am happy with what you want :) 17:09:54 I just don't want to do this massive change twice 17:09:58 %s/In-House/On-Site/g 17:10:01 #info Agreed that 'on-site' was a better wording than 'in-house' 17:10:05 :) 17:10:17 khall: yes, more or less :) 17:10:26 next topic 17:10:27 next topic is a tricky one... 17:11:01 #topic Big Stuff we're working on?! 17:11:09 any more for any more? 17:11:38 hea is coming (see hea.koha-community.org) 17:12:01 #info hea.koha-community.org is coming :) 17:12:02 Accounts Rewrite. It's been pretty much bullet proofed. I expect qa issues will involve internationalization 17:12:15 ooh.. that link didn't work for me last night.. 17:12:17 it works today. 17:12:26 (Bug I don't find guinea pigs to test it) 17:12:29 but 17:12:38 neat! 17:12:51 #info account rewrite is getting there.. wohoo 17:12:57 hea is looking nice! 17:13:29 I'm about to add it to our customer repository Joubu.. then i just need to talk customers into turning it on ;) 17:13:37 see bug 11926 17:13:38 04Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11926 new feature, P5 - low, ---, jonathan.druart, ASSIGNED , Render community koha statistic usages 17:13:58 #info hea is bug 11926 17:14:09 you can upload your data (test installation only!, the data will be deleted) 17:14:25 :) 17:14:50 any mroe for any more? 17:14:51 UTF-8 QA ? 17:15:08 ztajoli, i'm still working on it.. 17:15:12 it's a biggen ;) 17:15:51 ashimema: it could be good not to squash the patches. I think we need to keep the history, if something wrong happened 17:16:00 deffo. 17:16:09 shame tcohen has gone.. 17:16:14 * Joubu does not know why he told that 17:16:18 he was working on tests for it was he not? 17:16:29 I don't know, I hope :) 17:17:02 #info bug 11944 is working it's way through QA 17:17:04 04Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11944 major, P5 - low, ---, jonathan.druart, Signed Off , Cleanup Koha UTF-8 17:17:37 ashimema: no new stuff (except vat rewrite:)) from BibLibre planned 17:17:45 this actually moves us on nicely to 17:17:56 #topic Actions from last meeting 17:18:25 #info ashimema added a note to the wiki to encourage use of columns stuff for datatables 17:18:58 #info ashimema has started qa for UTF8 bug.. minimal comments left already 17:19:33 #info Waiting to hear from gmcharlt, tcohen regarding utf8 tests 17:19:49 that's all the actions in the minutes.. 17:19:55 any more for any more? 17:20:40 #topic Next Meeting? 17:21:14 Worth keeping the momentum and having another same time next week.. or should we have a bigger gap.. 17:21:21 next tuesday? (maybe a little bit shorter :)) 17:21:23 hopefully these meets will get shorter soon. 17:21:29 what he said.. 17:21:39 next tuesday is fine with me. 17:21:44 Ok for me 17:21:46 done 17:22:09 #agreed Same time next week.. assuming that's ok with the guys this evening 17:22:12 It would be great to have some discussion on the trello board, before the meeting 17:22:19 #agreed meeting needs to be kept shorter 17:22:24 in order no to debate from the beginning. 17:22:44 yeah.. I agree. we should make more sue of trello and use the meeting to bascially vote and assign tasks. 17:22:51 (trello or alternative) 17:23:18 #info more chat on the trello board before the meeting.. try to limit the meeting to agreements and assignments of work. 17:23:28 Joubu why does the trello board complain about my web browser? 17:23:39 #endmeeting