Re: [GNC-dev] Build issues and some free testing
Win! By the way, 90% code coverage seems to be better, if anything, than what industry does. Cheers, Robert. On Wed, Jun 13, 2018 at 2:32 PM, Christopher Lam wrote: > Dear rgmerk > Finally understood the use for combinatorics :) > https://github.com/Gnucash/gnucash/commit/da1d1b9a47939ad08ac645024f448a > 4820103ad8#diff-1625b4f2db9166674389d58f2f585131R497 > SRFI-64 is now firmly established as the testing framework to be used in > Gnucash from now on. > I think transaction.scm and invoice.scm now have about 90% code coverage. > I'll add more as time goes on... > Chris > > On 24 January 2018 at 11:59, John Ralls wrote: > >> Robert, >> >> Cool. If they should wind up writing some nice unit tests for areas where >> our coverage is poor (pretty much everywhere) we’ll happily and gratefully >> take them. >> >> Regards, >> John Ralls >> >> > On Jan 23, 2018, at 4:26 PM, Robert Merkel >> wrote: >> > >> > Thanks all. >> > >> > I realised the VM I was working with was an LTS version, and upgraded >> to the most recent Ubuntu release. Gnucash built without problems in the >> upgraded VM. >> > >> > It seems like the fixes were a good piece of housekeeping anyway. >> > >> > Just to let you know it's looking increasingly likely I'm going to have >> a bunch of students poking and prodding at gnucash some time in April. >> I'll make sure to file bug reports for any real bugs they find. I'll ask >> them to route any questions they have through me, so it shouldn't result in >> masses of mailing list traffic. >> > >> > Regards, >> > >> > Robert. >> > >> > On Wed, 24 Jan 2018 at 11:19 John Ralls > jra...@ceridwen.us>> wrote: >> > >> > >> > > On Jan 22, 2018, at 6:56 PM, Robert Merkel < >> robert.mer...@benambra.org <mailto:robert.mer...@benambra.org>> wrote: >> > > >> > > Hello all. >> > > >> > > If you dig far enough into the mailing list archives or the >> changelogs, you >> > > might find me :) >> > > >> > > I spoke to Christopher Lam recently, who told me about the work he's >> been >> > > doing on the transaction report which I worked on many many years ago. >> > > >> > > These days, my day job is teaching students about software >> engineering and, >> > > this upcoming semester, I'm teaching a unit on testing and quality >> > > assurance. For one of the assignments, we need some software for >> students >> > > to test, and I thought I might get them to test Gnucash. >> > > >> > > So, for the first time for quite a while, I have tried to download and >> > > build gnucash from the git repository using cmake. I've found the >> > > following build issues: >> > > >> > > * The build process requires xsltproc and makeinfo, which are not >> mentioned >> > > in the dependency list and cmake doesn't seem to check for them. >> > > >> > > * The build failed on my Ubuntu machine with the stock version of >> > > libwebkit2-gtk available on that distribution (2.4.11). It appears >> that >> > > Gnucash requires version >> > > 2.6 of this library, as "WebKitNavigationAction" was apparently added >> in >> > > version 2.6. Again, the minimum version isn't listed and cmake >> doesn't >> > > have a check for it. >> > >> > Hi, Robert. >> > >> > Welcome back! Chris mentioned his meeting with you on IRC. >> > >> > Thanks for bringing those to our attention. I've pushed a fix. >> > >> > You will need to install xsltproc. In some distros it's part of the >> libxslt package, which may be why it wasn't mentioned separately in >> README.dependencies. You won't need makeinfo, I've made that optional. It's >> only for an obsolete design information document that is now mostly >> superseded by Doxygen comments. >> > >> > The webkit2gtk-3.0 package provided by Ubuntu 14.04LTS is fine, and >> CMake did correctly detect it and set the compile accordingly--the first >> time through. If you then subsequently ran cmake again it would see that >> WEBKIT_FOUND was true and set up for the preferred webkit2gtk-4.0. I've >> corrected that by having separate WEBKIT2_3_FOUND and WEBKIT2_4_FOUND >> variables. >> > >> > Regards, >> > John Ralls >> > >> > >> >> ___ >> gnucash-devel mailing list >> gnucash-devel@gnucash.org >> https://lists.gnucash.org/mailman/listinfo/gnucash-devel >> > > ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: how exactly to do unit testing in scheme...
Sorry for the tardy response - I went away for the long weekend and was busy yesterday! As Phil says, you can test both leaf functions and controller code with unit tests. With controller code, you may need to write mocks for some or all of the called code. I don't know whether there are prewritten mocking libraries for guile, but given the extreme flexibility of scheme it shouldn't be difficult to write code to replace one function call with another where necessary. As long as xaccTransGetDate and xaccSplitGetParent are adequately tested, there is no particular reason from a testing perspective to throw in an intermediate function. As far as which options to test, if testing all the combinations exhaustively results in too many tests (and it sounds like it does) try pairwise combinatoric testing, which works as follows: Say you've got options {o_1, o_2, o_3, ... o_n}, each of which can take a limited set of values {o_i^1, o_i_2, o_i^k} (for instance, if the option can either be "on" or "off" it has two values). For any pair of options o_x and o_y, for all the possible combinations of option values there should be at least one test that has that combination. To give a very simple case, for three options {a, b, c} each of which can take two values {off, on}, you could have the following tests: Option a b c Test 1 off off off 2 off on off 3 on off on 4 onon off 5 off offon For the pair (a,b) tests 1 through 4 give all the possible combinations, for the pair (a, c) tests {1, 3, 4, 5} give all the possible combinations, and for the pair (b, c) tests {1, 2, 3, 4} give all the possible combinations. 5 is the minimum number of tests that can meet the pairwise combinatoric criterion, as compared to 8 if you tried all the possible combinations. However, it becomes an even bigger win if you're trying lots of options: you only need 9 tests for 8 options with two values, whereas you would need 256 tests to try every possible option combination! To generate optimal pairwise test sets, you can use "jenny" (this is a really useful but unmaintained tool, I really should take over the maintenance): http://burtleburtle.net/bob/math/jenny.html Hope this helps, and feel free to ask more questions. I will try to respond more promptly! On Thu, Jan 25, 2018 at 3:03 AM, Christopher Lamwrote: > Dear Devel > > > > To rgmerk: Welcome back, and it was a nice to meet irl! > > > > While simplifying transaction.scm and thinking of unit testing, I now have > a conundrum worthy of an expert view. > > > > The reports require 2 main functions – the options generator and the > renderer; the options generator generates a options.scm controller object, > and the renderer takes options and outputs html. > > > > I understand unit testing to handle testing of ‘leaf’ functions e.g. > (split->date), rather than the controller code (e.g. renderer takes options > and outputs html) – but to me this is rather silly because split->date only > tests xaccTransGetDate and xaccSplitGetParent, whereas the controller tests > actual functionality. > > > > With regards to unit testing I can see several issues > > > >1. The refactored report has inlined most single-use functions into >lambda expressions – I figured that directly stating (xaccTransGetDate >(xaccSplitGetParent split)) is much more descriptive to a programmer than >to create a testable leaf function (split->date split). I can see the >benefits of both – leave as lambda expressions which will can be >understandable by anyone who is familiar with the API, or break them out >into 100s of single use functions which can be tested, but introduces a >whole layer of cognitive load to anyone hacking code – (what does >split->date actually do? Where is its definition). Also, breaking the >lambda functions into testable functions means the implementation is frozen >and the next hacker will have lesser scope to rework/optimise the report. > > > >1. The refactored report is now flexible enough to accommodate derived >reports with a different multicolumn data function – eg >income-gst-statement.scm has been reworked into a transaction.scm >derivative which passes its own calculated-cells to report on GST sales and >purchases. This is not yet committed. > > > >1. I think the most useful testing approach for a complex >transaction.scm will be to test functions of various combinations of >options values, and test the resulting html for satisfactory output. There >are now dozens of bools and multichoices that can be triggered, each >effecting html in various ways. How best to test? > > > >1. My view would be the unit test would check that: > 1. the TR actually exists > 2. it can display empty-report > 3. it can understand passing of
Re: Build issues and some free testing
Thanks all. I realised the VM I was working with was an LTS version, and upgraded to the most recent Ubuntu release. Gnucash built without problems in the upgraded VM. It seems like the fixes were a good piece of housekeeping anyway. Just to let you know it's looking increasingly likely I'm going to have a bunch of students poking and prodding at gnucash some time in April. I'll make sure to file bug reports for any real bugs they find. I'll ask them to route any questions they have through me, so it shouldn't result in masses of mailing list traffic. Regards, Robert. On Wed, 24 Jan 2018 at 11:19 John Ralls <jra...@ceridwen.us> wrote: > > > > On Jan 22, 2018, at 6:56 PM, Robert Merkel <robert.mer...@benambra.org> > wrote: > > > > Hello all. > > > > If you dig far enough into the mailing list archives or the changelogs, > you > > might find me :) > > > > I spoke to Christopher Lam recently, who told me about the work he's been > > doing on the transaction report which I worked on many many years ago. > > > > These days, my day job is teaching students about software engineering > and, > > this upcoming semester, I'm teaching a unit on testing and quality > > assurance. For one of the assignments, we need some software for > students > > to test, and I thought I might get them to test Gnucash. > > > > So, for the first time for quite a while, I have tried to download and > > build gnucash from the git repository using cmake. I've found the > > following build issues: > > > > * The build process requires xsltproc and makeinfo, which are not > mentioned > > in the dependency list and cmake doesn't seem to check for them. > > > > * The build failed on my Ubuntu machine with the stock version of > > libwebkit2-gtk available on that distribution (2.4.11). It appears that > > Gnucash requires version > > 2.6 of this library, as "WebKitNavigationAction" was apparently added in > > version 2.6. Again, the minimum version isn't listed and cmake doesn't > > have a check for it. > > Hi, Robert. > > Welcome back! Chris mentioned his meeting with you on IRC. > > Thanks for bringing those to our attention. I've pushed a fix. > > You will need to install xsltproc. In some distros it's part of the > libxslt package, which may be why it wasn't mentioned separately in > README.dependencies. You won't need makeinfo, I've made that optional. It's > only for an obsolete design information document that is now mostly > superseded by Doxygen comments. > > The webkit2gtk-3.0 package provided by Ubuntu 14.04LTS is fine, and CMake > did correctly detect it and set the compile accordingly--the first time > through. If you then subsequently ran cmake again it would see that > WEBKIT_FOUND was true and set up for the preferred webkit2gtk-4.0. I've > corrected that by having separate WEBKIT2_3_FOUND and WEBKIT2_4_FOUND > variables. > > Regards, > John Ralls > > > ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Build issues and some free testing
Hello all. If you dig far enough into the mailing list archives or the changelogs, you might find me :) I spoke to Christopher Lam recently, who told me about the work he's been doing on the transaction report which I worked on many many years ago. These days, my day job is teaching students about software engineering and, this upcoming semester, I'm teaching a unit on testing and quality assurance. For one of the assignments, we need some software for students to test, and I thought I might get them to test Gnucash. So, for the first time for quite a while, I have tried to download and build gnucash from the git repository using cmake. I've found the following build issues: * The build process requires xsltproc and makeinfo, which are not mentioned in the dependency list and cmake doesn't seem to check for them. * The build failed on my Ubuntu machine with the stock version of libwebkit2-gtk available on that distribution (2.4.11). It appears that Gnucash requires version 2.6 of this library, as "WebKitNavigationAction" was apparently added in version 2.6. Again, the minimum version isn't listed and cmake doesn't have a check for it. Hope this is useful. Regards, Robert Merkel. PS Specific build error follows below: /home/xubuntu/src/gnucash/gnucash/html/gnc-html-webkit2.c: In function ‘perform_navigation_policy’: /home/xubuntu/src/gnucash/gnucash/html/gnc-html-webkit2.c:604:6: error: unknown type name ‘WebKitNavigationAction’ WebKitNavigationAction *action = ^ /home/xubuntu/src/gnucash/gnucash/html/gnc-html-webkit2.c:605:7: error: implicit declaration of function ‘webkit_navigation_policy_decision_get_navigation_action’ [-Werror=implicit-function-declaration] webkit_navigation_policy_decision_get_navigation_action (decision); ^ /home/xubuntu/src/gnucash/gnucash/html/gnc-html-webkit2.c:605:7: error: initialization makes pointer from integer without a cast [-Werror=int-conversion] /home/xubuntu/src/gnucash/gnucash/html/gnc-html-webkit2.c:606:10: error: implicit declaration of function ‘webkit_navigation_action_get_navigation_type’ [-Werror=implicit-function-declaration] if (webkit_navigation_action_get_navigation_type (action) != ^ /home/xubuntu/src/gnucash/gnucash/html/gnc-html-webkit2.c:612:12: error: implicit declaration of function ‘webkit_navigation_action_get_request’ [-Werror=implicit-function-declaration] req = webkit_navigation_action_get_request (action); ^ /home/xubuntu/src/gnucash/gnucash/html/gnc-html-webkit2.c:612:10: error: assignment makes pointer from integer without a cast [-Werror=int-conversion] req = webkit_navigation_action_get_request (action); ^ cc1: all warnings being treated as errors gnucash/html/CMakeFiles/gncmod-html.dir/build.make:163: recipe for target 'gnucash/html/CMakeFiles/gncmod-html.dir/gnc-html-webkit2.c.o' failed make[2]: *** [gnucash/html/CMakeFiles/gncmod-html.dir/gnc-html-webkit2.c.o] Error 1 CMakeFiles/Makefile2:8610: recipe for target 'gnucash/html/CMakeFiles/gncmod-html.dir/all' failed make[1]: *** [gnucash/html/CMakeFiles/gncmod-html.dir/all] Error 2 Makefile:160: recipe for target 'all' faile ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: Licensing requirements [SEC=UNCLASSIFIED]
You are perfectly free to download and use Gnucash for any purpose, including commercial purposes, at no charge, forever. If you are a programmer (or want to hire one) to *modify* gnucash and distribute the modified version outside your organization, then you need to read the licence. But as far as installation and use goes, there are no restrictions whatsoever. On Thu, Apr 2, 2009 at 5:28 PM, Johnson Matthew matthew.john...@infrastructure.gov.au wrote: Hi, I'm not sure if I'm emailing the write address but I'd like to ask a question about licensing. I am currently the treasurer for a social club of a government department in Australia. The social club is a non-profit organisation. We raise money for social events for the department, and for charities. I asked my IT department if I could install Gnucash on my computer at work to help with the managing of accounts for this social club and they declined, as they were worried that we would require a corporate license which may be expensive. I would just like to confirm with you if I do need any licence in my situation. I would be happy to make a small donation, but our social club does not deal with a lot of money. If you could please advise me of any licensing requirements I would be most grateful. Sincerely, Matthew Johnson ph. 02 6274 7621 fax 02 6274 6749 Disclaimer This message has been issued by the Department of Infrastructure, Transport, Regional Development and Local Government. The information transmitted is for the use of the intended recipient only and may contain confidential and/or legally privileged material. Any review, re-transmission, disclosure, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited and may result in severe penalties. If you have received this e-mail in error, please notify the Department on (02) 6274-7111 and delete all copies of this transmission together with any attachments. ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: Printing reports
Dear Graham, I'm not actively involved, but so the people that are can help you, more information will be required to fix your problem: * the exact versions of GnuCash you have tried. * the operating system you are using. * whether printing is working for other applications. * what the exact error message is (if you can, copy and paste it into your email). Without that information, it will be impossible to assist you. Regards, Robert Merkel On Sat, Jan 3, 2009 at 12:20 PM, Gordon Morrow gmorr...@cogeco.ca wrote: Hi I have been using your program for just over a year now and really like it. Recently I tried to print a report for the year of 08 (Income Statement). I get a fatal error report and then the program must shut down. I have downloaded the latest version and still a problem. What is wrong? How do I remedy this problem? Thanks for your help. Gordon Morrow gmorr...@cogeco.ca ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: install etc
Dear Carol, most Linux distributions come with GnuCash, which you can install with the click of a button,. For instance, follow the instructions on the page below for installing software (including GnuCash) on Ubuntu: https://help.ubuntu.com/8.10/add-applications/C/index.html Regards, Robert Merkel. On Tue, Nov 18, 2008 at 5:34 AM, Carol Brown [EMAIL PROTECTED] wrote: Hi there, I am starting a small business and have done some research and most agree that GnuCash is the best accounting program for Linux. But I am dismayed to see that I have to download /source code/, which to me means /compile/ and /build/. Arghhh. I don't do compile and build. I am starting a business and just want to install and use my accounting software. As you can imagine, I have a bazillion other things to do. Also, I have been searching on your site and I can't find any install info in the documentation.The trickiest part and there's no info easily available. Many useful Linux programs are like this I have noticed over the years. Not all of us are Linux jocks, nor do we want to be. This is what keeps pushing me to just get Windows for my business so I can run Quickbooks. I wish you could make it easier. Regards, Carol Brown ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [EMAIL PROTECTED]: Some problems on gnucash.org]
On Thu, Aug 10, 2006 at 09:52:59AM -0700, Derek Neighbors wrote: I could be totally full of crap, but have been around a while. I can add some history (from my perception)... Hopefully Linas will correct me where I am wrong. On Aug 10, 2006, at 9:10 AM, Chris Shoemaker wrote: On Thu, Aug 10, 2006 at 01:07:14AM -0700, Thomas Bushnell BSG wrote: Christian Stimming [EMAIL PROTECTED] writes: Maybe you were just joking around, (I do see a smiley), but if you're seriously asserting that GnuCash was ever released under the auspices of the GNU Project[1], which appears to be definitive of GNU packages, then I would expect GnuCash's documentation to have declared itself to be GNU software. I've been unable to find any evidence that this was ever true. Do you have any? If not, I believe you are mistaken. At the time that GNUCash appeared to be friendly with the GNU Project there wasn't much documentation about GNUCash in general. I don't think it or propagating relationships in what existed was a primary focus. In a nutshell, just because documentation doesn't state anything doesn't prove a ton (in either direction). I admit that the FSF has apparently declared GnuCash to be a GNU package for at least some time. [2] But, the FSF's own definition of a GNU package seems to require that the software authors declare their software to be so. I have no explanation for this inconsistency. RMS' email to this list was asking this project to FIX this problem. I admit that it seems a bit delayed. For the record some time ago GNOME put Open Source on their home page and it caused quite a problem (as obviously they were at the time one of the most prolific GNU projects). As for RMS's implication that the GNU Project wrote GnuCash [3], GnuCash's authors are quite well noted in GnuCash's source and AUTHORS file. I don't know of the official membership of the GNU Project - perhaps it's a circular definition, but of those contributors, you, Thomas, are the only one I know of that's apparently associated with the GNU Project. I think only the developers can say. Here is where I think some of the roots (or my understanding of them) are confused. It is my understanding that Linas took an X-accountant program which was no longer maintained and gutted it to not be dependent on Motif. My interactions with Linas certainly made me believe he was very connected to the Free Software Foundation AND the GNU Project because I was introduced to him via RMS as needing to collaborate for the betterment of the GNU Project. It is also my understanding that the GNU Project very much helped Linux Global Partners put money behind the company Linas ran (GNUMatic) which employed many of the people in the AUTHORS file. During my interaction with GNUMatic it was very much communicated that GNUCash was part of the GNU Project. Once GNUMatic shut its doors most of those developers stepped away (including Linas) and Derek Atkins took primary leadership of the project. Since that happened there seems to no longer be any connection to the GNU Project. I'm just trying to objectively examine the few things that would suggest ambiguity on the subject. On the whole, I'm inclined to trust the more numerous and less ambiguous data that clearly indicate the GnuCash has never been a GNU package, e.g. a public statement by a core GnuCash developer in 2001, While GnuCash is licenced under GPL software, we are not technically a GNU project. [4] I don't think a comment in a Slashdot posting is hard evidence. Note that Robert Merkel, if memory serves correct, was an employee at GNUMatic. Many of the GNUMatic employees started Linux Developers Group (LDG) after GNUMatic closed. There was a vested interest to try to muddy copyright waters of code for LDG's gain. Note: I am not saying that to be negative or indicate any sort of wrong doing. Not even saying the source is wrong. Just saying that the source loses credibility because of potential conflict of interest. The FSF asks projects to ASSIGN copyright, but doesn't MANDATE it (or at least they used to not do so). I think well run projects do, both for legal issues and issues like this. All that aside, I don't really have a strong opinion either way, if other devs wanted to make GnuCash a GNU package. They would have to announce it, though. As far as I can tell, they don't really care much. However, it's strange that RMS claims that GnuCash is a GNU package, and definitely impolite to imply that GnuCash was written by the GNU Project. [3] I definitely agree here. I think the current developers (those putting in their time) need to assess whether they want to be a part of the GNU Project. If so, they should do the things that are expected of GNU projects. If not, they should let RMS
Re: [EMAIL PROTECTED]: Some problems on gnucash.org]
-- Speaking for myself only, it was my understanding that neither Gnumatic nor LDG assigned copyright of the code written by myself or anyone else in Gnucash to the FSF. I *did* write a manpage for Guile for which, IIRC, copyright *was* assigned to the FSF, but never for any GnuCash work. OK, Linas has directly contradicted me. Take his word for it, not mine. -- --- Robert Merkel [EMAIL PROTECTED] http://benambra.org Libertarianism has also been defined with some plausibility as the form taken by liberalism as common sense asymptotically approaches zero. --Richard Carnes --- ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: g-wrap 1.9.5 and G2 branch
On Sun, Apr 24, 2005 at 10:00:28AM +0100, Neil Williams wrote: On Sunday 24 April 2005 6:37 am, Robert Merkel wrote: Hi guys, Is G2 CVS supposed to compile with g-wrap 1.9.5? ? 1.9.5 ? The latest available in Debian unstable is: ii libgwrapguile11.3.4-12 /usr/bin/g-wrap-config Are we talking about the same package? autoconf seems to be checking for g-wrap-config, which doesn't seem to be part of the new version unless I'm missing something. What I've got as 1.9.5 is libgwrap-runtime0 - that is 1.9.5-2. The dev version of that package is not what you need for g-wrap-config - you need the Guile version. OK, I installed those packages, and autoconf seems to be happy now. I'm still not quite clear on how g-wrap has changed since I used it last, but I'm sure I'll figure it out... -- --- Robert Merkel [EMAIL PROTECTED] http://benambra.org Our enemies are innovative and resourceful, and so are we, Bush said. They never stop thinking about new ways to harm our country and our people, and neither do we. --AP wire, 6/8/2004 --- ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
g-wrap 1.9.5 and G2 branch
Hi guys, Is G2 CVS supposed to compile with g-wrap 1.9.5? autoconf seems to be checking for g-wrap-config, which doesn't seem to be part of the new version unless I'm missing something. TIA for any assistance. -- --- Robert Merkel [EMAIL PROTECTED] http://benambra.org Great spirits have always encountered violent opposition from mediocre minds. -- Albert Einstein They laughed at Einstein. They laughed at the Wright Brothers. But they also laughed at Bozo the Clown. -- Carl Sagan --- ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel