Re: [GNC-dev] Wiki FAQ Page

2018-09-04 Thread David T. via gnucash-devel
Frank,

I will begin with noting that I think that it was not entirely clear in my post 
that I was presenting only the top-level headings for the FAQ in this email; I 
was not prepared to re-align every level in the FAQ at this point. 

> On Sep 4, 2018, at 4:02 PM, Frank H. Ellenberger 
>  wrote:
> 
> Hi David,
> 
> at first thanks for starting with this task.
> 
> Am 04.09.2018 um 16:43 schrieb David T. via gnucash-devel:
>> Now, on a meta-level, I think the primary headings here might be better 
>> arranged as follows:
>> 
>> 1. General Questions
> Perhaps the title should be more specific. Abstract

The existing entry is "General Frequently Asked Questions (FAQ) about GnuCash". 
I was merely cleaning up the heading to make it more reasonable. I have no 
problems with a “General Questions” section. Perhaps others have suggestions 
here.

> About the project, how {this page is organized [missing]}, howw to get
> help (and provide required information, and give something back (from
> feedback to patches).

About the project belongs on the website or on the main page, not as an FAQ 
entry. 

How this page is organized *should* be clear from the main headings, which is 
what I am working on rationalizing. 

I duplicated the first FAQ entry "How to Get Help" at the very top of the FAQ, 
to bring greater prominence to this issue. I additionally left this as the 
first entry in the FAQ. Further, there is an entry on the topic on the main 
wiki page. Fourth, there is a “Getting Help" link on the main web page, which 
links to a separate "Getting Help” page on the wiki 
(https://wiki.gnucash.org/wiki/Getting_Help 
). Honestly, how many more pointers 
to the help do we need?

Noting my comment above about only presenting at the top level in this first 
pass, I note that there are currently 4 second level sections in “General 
Questions,” (“General”, Contributing, Troubleshooting and Improvements, and 
Mailing List Questions) and that one or more of these sections might remain 
going forward. I will note that many of these issues are already incorporated 
into other pages on the wiki—or should be, IMHO—and that as I work through the 
sections, I am predisposed to relying on those pages, rather than a monolithic 
and overly-dense FAQ page to keep track of it all.

For example, the fourth top level section on the Main page of the wiki is 
entirely dedicated to giving back to the project. It would be my preference to 
see the pages and references on the main page serve as the primary source of 
information on these topics, and a single brief entry on the FAQ that points 
the questoner to those pages.

> 
>>  [move “Accounting Questions” to this section]
> Please do not, I see “Accounting Questions” more or less as "Off topic"
> there are spcefic websites which can answer such questions according the
> local law.

…except that a) general accounting questions are exceedingly common on the 
mailing lists, and b) these questions are already on the wiki. In the past, you 
have strongly advocated for including information on the wiki based on these 
two criteria; why change that now?

> 
> For me there is a logical sequence: Install, configure/customize, use.
>> 2. Installation
>> 3. Using GnuCash [moved ahead of cunfiguring]
> No, before you should configure/customize your installation.

This could go either way—but allow me to share my reasoning behind this 
arrangement. For *most* users, the first hurdle they will encounter after 
installation will NOT be configuring and customizing their brand new accounting 
software package; it’s going to be to run the program and try to figure out how 
to do basic things with said program. Questions about how to reconfigure 
GnuCash (which is what most of the entries under Configuring currently are) 
come *after* a user has been using the program for a while. Indeed, some users 
NEVER attempt to load a different font for their GnuCash.

That being said, there are a large number of these questions that by rights 
should be eliminated as duplicates of information in more official 
documentation locations. The entries for Filenames and Backups are prime 
examples. I don’t believe I would simply remove these questions from the FAQ, 
since they are so perennially-asked. However, I *am* again predisposed to 
streamlining these questions and moving the pertinent information to a separate 
page in the wiki.

> 
>> 4. Configuring and Managing
>>  [Move “Customizing" questions from current section 8 to this section]
> yes
> 
>> 5. Troubleshooting
> Please insert no separate Troubleshooting. It would lead to duplicate
> sections.

Currently, the heading is “Installation Troubleshooting” and contains 
installation questions and a whole lot of other crap that doesn’t belong under 
Installation. *That* is an excellent recipe for duplication of information, as 
evidenced by the current state of information on the wiki, IMHO. Having a 
separate 

Re: [GNC-dev] Problems with python 3 and the gnucash python bindings.

2018-09-04 Thread c . holtermann

Am 2018-07-10 20:58, schrieb David Osguthorpe:

Hi All,


In upgrading to gnucash 3.2 from 2.6.18 and updating my python scripts 
I

have found an issue with the gnucash bindings and python 3.


I saw this with query runs that failed to produce any results when they
should have, and used to under 2.6.18.


So far it appears the issue is with the wrapping of the
qof_query_search_for call.

By inspection of the generated c code it appears by default swig wraps
python 3 unicode strings by converting to a new python 3 byte string 
object
(SWIG_AsCharPtrAndSize) and passes its char buffer pointer as the char 
*

pointer to the wrapped function call.

This object and pointer is freed at the end of the wrapper function.

Unfortunately it seems qof_query_search_for just stores the char * 
pointer

for the query which means by the time the query is run the pointer is
invalid (and indeed junk was printed using gnucash debug logging as the
Query Object Type: which is what lead me to this problem).


This is going to be a general problem for any gnucash function that 
simply

stores a char * pointer rather than copying the string.


According to the Python 3 documentation the PyUnicode_AsUTF8 function
creates a char * buffer which is cached in the unicode object so exists 
for

the lifetime of the unicode object.

I dont understand why this isnt the default SWIG wrapping for char 
pointers

but it does seem to solve the problem here.

(I havent been able to find any real discussion of this via Google. The
only hint Ive seen is that its a memory issue as PyUnicode_AsUTF8 needs 
to

store 2 versions of the string.)


This requires setting up swig typemaps.

So far I have used a very specific typemap for QofIdType and 
QofIdTypeConst

which solves the problem and python query runs produce results (and my
scripts work as under 2.6.18).



David,

Would you be so kind to provide your typemap ?

regards,

Christoph



The question is where and how to implement this.

Currently Ive put the typemaps in gnucash_core.i - but they probably
should be in base-typemaps.i.

Then the question is how general to make this - it could be a typemap 
for

all char * pointers otherwise each explicit character type (eg gchar *)
would need its own typemap.

I think its clear that any const char * should map to PyUnicode_AsUTF8.


Also note that the GSList typemap in base-typemaps.i needs to be 
updated to

use unicode strings for python 3 - otherwise it requires python 3 byte
strings.


David


PS. Another solution would be to force byte string only arguments for
python 3 using a SWIG define SWIG_PYTHON_STRICT_BYTE_CHAR.

This would require a major re-write of the gnucash_core.py to perform 
the

unicode<->byte transformations.
___
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: [GNC-dev] Wiki FAQ Page

2018-09-04 Thread Frank H. Ellenberger
Hi David,

at first thanks for starting with this task.

Am 04.09.2018 um 16:43 schrieb David T. via gnucash-devel:
> Now, on a meta-level, I think the primary headings here might be better 
> arranged as follows:
> 
> 1. General Questions
Perhaps the title should be more specific. Abstract
About the project, how {this page is organized [missing]}, howw to get
help (and provide required information, and give something back (from
feedback to patches).

>   [move “Accounting Questions” to this section]
Please do not, I see “Accounting Questions” more or less as "Off topic"
there are spcefic websites which can answer such questions according the
local law.

For me there is a logical sequence: Install, configure/customize, use.
> 2. Installation
> 3. Using GnuCash [moved ahead of cunfiguring]
No, before you should configure/customize your installation.

> 4. Configuring and Managing
>   [Move “Customizing" questions from current section 8 to this section]
yes

> 5. Troubleshooting
Please insert no separate Troubleshooting. It would lead to duplicate
sections.

> 6. Exporting and Importing Data
> 7. Business Features
In theory 6 & 7 are subsections of 3

>   [Move entire Developing GnuCash section of questions to the pages 
> established for Developers]
No, there should be only one FAQ. Because it might not interest most
users , it is at the bottom.
I am pretty sure, if we would break the FAQ in parts we would end with a
bunch of duplicated sections.

> I welcome input and feedback.

As you have already started, I would prefer - like for patches - smaller
changesets (move section x into...). Diff is not very smart and it is
now almost impossible to see what really changed.

Why did you remove the table to the official docs? Many questions are
already answered there.

> David

Frank

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Problems with python 3 and the gnucash python bindings.

2018-09-04 Thread c . holtermann

Hello all,

I just realized (because John showed me) that this bug report: 
https://bugs.gnucash.org/show_bug.cgi?id=796137

and this mail thread are related.

regards,

Christoph

Am 2018-07-19 15:42, schrieb Derek Atkins:

John Ralls  writes:

Funny...  15+ years ago it WAS an Enum, but changed to a string 
because

we wanted to enable searching on plug-in modules.


OK, and enums are immune to run-time changes implied by a plugin
module, but there are better ways than strings to tag types. Glib
provides Gquarks for just this purpose and even provides a function to
get one on a GObject's type name:
g_type_qname(G_OBJECT_TYPE()).


These APIs did not exist in 2002 when this code was written.


C++ obviously has a different type model and we'll need to
rework/replace QofID, QofContainer, and QofQuery to match it so
changing them now to use quarks instead of strings would be wasted
effort.


*nods*


Regards,
John Ralls


-derek

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Bugzilla Structure

2018-09-04 Thread Derek Atkins
"Frank H. Ellenberger"  writes:

> At least at bugzilla.gnome.org you got update notifications for bugs in
> the blocks list if the status changed. I would assume it is the default
> behaviour.

It should be the case.

> Regard
> Frank

-derek
-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   warl...@mit.eduPGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] CSV Transactions exporter issues and a question

2018-09-04 Thread John Ralls


> On Sep 4, 2018, at 8:23 AM, David T. via gnucash-devel 
>  wrote:
> 
> Hello,
> 
> I was just fiddling around with the CSV exporter (trying to clarify something 
> for the FAQ) on GC3.1.1 under Mac OS 10.13.6.
> 
> A couple of issues:
> 1) When I got to the screen to select the output filename, there was a file 
> picker section, below which is an OK button, and the assistant navigator 
> buttons Cancel/Back/Next. For me, the “Next” button never activates, even 
> though I enter a valid filename and select a valid folder (see screenshot). 
> It turns out that this user must click OK to move forward. This is confusing.
> 2) In my first fumbling attempt to run through the process, I went back to 
> this screen and tried to enter a new file name and GC crashed out. I was not 
> able to reproduce the crash subsequently.
> 3) I attempted to tell the exporter to user Tabs as the delimiter, as I 
> expected any of the other options (comma, colon or semi-colon) to appear in 
> my output data. Entering “\t” in the Other field, however, did not result in 
> a tab-delimited file, but rather a “\t” delimited file. It would be nice 
> either to have the tab included as an option, or the “other” option to 
> process escaped characters like “\t”
> 
> And, now the question (an easy one!): for what version was the Export 
> Transactions to CSV option added?

David,

Can you check the crash report to see where and why it crashed?

CSV export was first released in GnuCash 2.6.0.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[GNC-dev] CSV Transactions exporter issues and a question

2018-09-04 Thread David T. via gnucash-devel
Hello,

I was just fiddling around with the CSV exporter (trying to clarify something 
for the FAQ) on GC3.1.1 under Mac OS 10.13.6.

A couple of issues:
1) When I got to the screen to select the output filename, there was a file 
picker section, below which is an OK button, and the assistant navigator 
buttons Cancel/Back/Next. For me, the “Next” button never activates, even 
though I enter a valid filename and select a valid folder (see screenshot). It 
turns out that this user must click OK to move forward. This is confusing.
2) In my first fumbling attempt to run through the process, I went back to this 
screen and tried to enter a new file name and GC crashed out. I was not able to 
reproduce the crash subsequently.
3) I attempted to tell the exporter to user Tabs as the delimiter, as I 
expected any of the other options (comma, colon or semi-colon) to appear in my 
output data. Entering “\t” in the Other field, however, did not result in a 
tab-delimited file, but rather a “\t” delimited file. It would be nice either 
to have the tab included as an option, or the “other” option to process escaped 
characters like “\t”

And, now the question (an easy one!): for what version was the Export 
Transactions to CSV option added?

TIA,
David

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Wiki FAQ Page

2018-09-04 Thread John Ralls


> On Sep 4, 2018, at 7:43 AM, David T. via gnucash-devel 
>  wrote:
> 
> Hello,
> 
> I am digging in to the FAQ page with an eye to rationalizing the accumulated 
> mess. My hope is to make it easier for uers to find answers to their 
> questions. 
> 
> Currently, the structure of the page does not accurately reflect the content 
> of the questions. For example, the section “Installation Troubleshooting” 
> covers two broad and disparate question areas. 
> 
> In addition, numerous questions have been placed haphazardly in sections to 
> which they do not belong. For example, questions about theming do not belong 
> under Installation (for Mac or Windows), but IMHO under “GnuCash Files and 
> managing a GnuCash installation”, which itself would be better named 
> “Configuring and Managing”
> 
> On a practical level, as I rearrange the FAQ on some pretty substantial 
> levels, questions and headings on the page will be changed. 
> 
> First issue: I do not see a way to see whether the wiki has any instances of 
> links to a specific question. Clicking “What links here” only shows links to 
> the overall FAQ page.
> 
> Second issue: many links from the mailing lists will no longer work, which 
> may cause problems for users searching the ML archives and retrieving the 
> stale links. How should this be handled?
> 
> Now, on a meta-level, I think the primary headings here might be better 
> arranged as follows:
> 
> 1. General Questions
>  [move “Accounting Questions” to this section]
> 2. Installation
> 3. Using GnuCash [moved ahead of cunfiguring]
> 4. Configuring and Managing
>  [Move “Customizing" questions from current section 8 to this section]
> 5. Troubleshooting
> 6. Exporting and Importing Data
> 7. Business Features
>  [Move entire Developing GnuCash section of questions to the pages 
> established for Developers]
> 
> I welcome input and feedback.

David,

It’s painful, but I think the only way to find links to specific anchors is to 
copy the (old) question and paste it into the search field. You should get a 
context menu, the last line of which is “contains xxx”. Click that.

Fortunately if you just move questions without rephrasing them it won’t affect 
the anchors at all.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[GNC-dev] Wiki FAQ Page

2018-09-04 Thread David T. via gnucash-devel
Hello,

I am digging in to the FAQ page with an eye to rationalizing the accumulated 
mess. My hope is to make it easier for uers to find answers to their questions. 

Currently, the structure of the page does not accurately reflect the content of 
the questions. For example, the section “Installation Troubleshooting” covers 
two broad and disparate question areas. 

In addition, numerous questions have been placed haphazardly in sections to 
which they do not belong. For example, questions about theming do not belong 
under Installation (for Mac or Windows), but IMHO under “GnuCash Files and 
managing a GnuCash installation”, which itself would be better named 
“Configuring and Managing”

On a practical level, as I rearrange the FAQ on some pretty substantial levels, 
questions and headings on the page will be changed. 

First issue: I do not see a way to see whether the wiki has any instances of 
links to a specific question. Clicking “What links here” only shows links to 
the overall FAQ page.

Second issue: many links from the mailing lists will no longer work, which may 
cause problems for users searching the ML archives and retrieving the stale 
links. How should this be handled?

Now, on a meta-level, I think the primary headings here might be better 
arranged as follows:

1. General Questions
  [move “Accounting Questions” to this section]
2. Installation
3. Using GnuCash [moved ahead of cunfiguring]
4. Configuring and Managing
  [Move “Customizing" questions from current section 8 to this section]
5. Troubleshooting
6. Exporting and Importing Data
7. Business Features
  [Move entire Developing GnuCash section of questions to the pages established 
for Developers]

I welcome input and feedback.

David


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Logging Information in the Wiki

2018-09-04 Thread Geert Janssens
Op dinsdag 4 september 2018 14:24:06 CEST schreef David Cousens:
> John Geert,
> 
> I was going for the breakouts to make more detail about  the log-levels and
> log-domains available while not making the current page  too large or not
> easily readable. I have added breakout pages from links from log-domain and
> log-level where they are first mentioned in the text on the logging page. if
> you have time you might check that i haven't blundered too badly in my
> understanding of the logging implementation.

Thanks for working on detailing all this.

The log domains listed in GnuCash Log Domains is incomplete. There are several 
additional log domains defined in the CMakeFiles and then passed as extra 
parameter to specific target builds. You can search the CMakeLists.txt files 
recursively for G_LOG_DOMAIN to find them.

Also the explanation of the three forms is lacking a proper guideline on when 
to use which form. It's not that form one and two can be used interchangeably 
for example. Unfortunately it's an area of gnucash I never bothered to study 
in detail, so I can't give you a definitive guide either right now.

I know the first form is used to configure the log-domain for our own logging 
code (named QofLog). This code builds on top of glib2's log library. And to 
tell glib2's log library the log-domain to use, you normally set G_LOG_DOMAIN. 
I assume (though haven't verified) that setting log_module for QofLog will do 
what is necessary to configure the underlying glib2's log library. However I'm 
not sure that only setting G_LOG_DOMAIN will also properly configure our own 
QofLog code.

So it may well be possible the second and third forms should not appear at 
all, but are the result of misunderstanding or laziness.

> Thanks for fixing the API
> link. My bad on the /.gnucash - I did realize it was a hidden directory,
> just stuffed it up while editing it. I'll work around the updated locations
> and put a link to the Configuration locations page itself from the logging
> page.
Unless I misunderstand you, I think I did this for you already.

> The Logging API page covers a fair bit of what I had in the
>  log level breakout more completely so I will remove it. The breakout for
> the log-domains I produced does have some  infomation not in the Logging API
> page which might be useful to incorporate.
> 
Ok.

> I can add a section to the wiki logging page on using the command line to
> configure debugging. I found that more useful than modifying
> ~/.gnucash/log.conf as modifying log.conf affected  a production version of
> Gnuccash I use for accounting as well as a development build I was debugging

Sure do.

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Logging Information in the Wiki

2018-09-04 Thread David Cousens
John Geert,

I was going for the breakouts to make more detail about  the log-levels and
log-domains available while not making the current page  too large or not
easily readable. I have added breakout pages from links from log-domain and
log-level where they are first mentioned in the text on the logging page. if
you have time you might check that i haven't blundered too badly in my
understanding of the logging implementation. Thanks for fixing the API link.
My bad on the /.gnucash - I did realize it was a hidden directory, just
stuffed it up while editing it. I'll work around the updated locations and
put a link to the Configuration locations page itself from the logging page.
The Logging API page covers a fair bit of what I had in the 
 log level breakout more completely so I will remove it. The breakout for
the log-domains I produced does have some  infomation not in the Logging API
page which might be useful to incorporate. 

I can add a section to the wiki logging page on using the command line to
configure debugging. I found that more useful than modifying
~/.gnucash/log.conf as modifying log.conf affected  a production version of
Gnuccash I use for accounting as well as a development build I was debugging

David



-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Logging Information in the Wiki

2018-09-04 Thread Geert Janssens
Op dinsdag 4 september 2018 05:23:17 CEST schreef David Cousens:
> I had to trawl through the code in qoflog.cpp to make sense of how the
> logging works. I now feel I have  a basic grasp of how to control that. I
> did not find modifying ./gnucash/log.conf had much effect primarily because
> I didn't really have a grip on how logging woked when i tried using it and I
> found it much easier to use the command line options to do what I wanted
> which was to enable logging specifically at debug level for the gnc,import
> module (and not anything else) and redirect the output from the
> /tmp/gnucash.trace file to a logfile in my home directory which I could read
> without root privileges. I also don't want to modify ./gnucash/log.conf for
> development versionsas that affects my GnuCash production version logging
> as well as the development whereas with the command line options changes
> are limited to the built development version.

It's not ./gnucash/log.conf, but ~/.gnucash/log.conf. So a hidden directory in 
you home dir.

And in addition that information is also only valid for gnucash 2.6.x and 
older. The file has been moved to a new location for 3.x. I have updated the 
wiki page to show this.

> 
> Does anyone have any problem with me creating a breakout page from the above
> page for developers which describes the logging setup information that a
> new developer needs to know both to control debugging code and incorporate
> logging information in code they write while it is still fresh in my mind?
> (At my age this might not be very long.)
> 
> I am thinking along the lines fo describing the log domain setup and the log
> levels as they pertain to Gnucash  and the macros that relate to them that
> can be used to generate debug information as well as the command line
> switches and how they interact with the system.

Like John I don't see much reason to make it separate pages. What you describe 
can be separate sections on one page as well. But I don't have a strong 
opinion or preference here.

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel