How to debug? (doc is outdated)

Hi!

I’m trying to put my hands at plug-in development but I’m stuck right at the beginning… and the wiki page about debugging is outdated since there’s no Gramps.py anymore that you could just start with python.

But let’s be very concrete. I’d like to play a bit with graphical trees so I started with copying gramps/plugins/drawreport/ to my local plugins directory and started playing with fanchart.py.
First problem I’d like to solve is I’m missing the overhang option in the plugin settings. It might be a language problem (my system is in French, so is Gramps) but I couldn’t figure out how to change Gramps language. I also thought I could check what’s in the “circle” option list when firing up the window but no idea how to do this… With my basic scripting skills I’d just do a print but obviously that doesn’t work here :wink:

So if you could direct me into these basics I’d be very grateful!

(I’m on Ubuntu 22.04)

I believe the page is not outdated as Gramps.py does exist, the only issue is the page is targeted at developers who are using a development environment with Gramps, not an installed version of Gramps which I guess you are using? If so see the developers portal about setting up a Gramps development environment.

Thanks a lot!

This indeed helped :slight_smile:

Still no way to change the language but in the development version I could just delete the build/mo directory to go back to english.

And the missing ‘overhang’ was just missing from 5.1 while I have copied it from 5.2 so now I have to figure out where to separate “my” plugin from the original one…

There was a Fan Chart patch in the 5.2 report master for overhangs. I’ll try to locate it in the morning when I’m not trying to fall back asleep.

The overhangs don’t play nice with the chart label. (It overlaps.) So it still needs some tweaking.

And there have previously been recommendations to set up batch files to override the language. (I’m on Windoze so I can just use the GrampsPortable fork. It is a little easier to swap language in that variant.)

Indeed. And I wonder what’s the point of the “Orientation of radial texts” option… Who would like text to be written upside down on half of the chart?
The French translation for it is misleading as it translates “upright” with “straight” and “roundabout” with “curved”… which would make much more sense but isn’t the actual functionality…

1 Like

You might want to take a look at what @cdhorn is doing with the Configuration Templates for his experimental CardView view modes too.

I’m sure that you are aware that there are a variety of Fan Charts in Gramps. Each has separate settings. If one adopted the CardView’s ability to save and load a Configuration Template of settings, each of the others could be adapted to read the same template. So the Color Settings that you experiment with using the interactive Charts category Fan Chart view mode might be applied to the Fan Chart Graphical Report or the Fan Chart Gramplet . Although each might have a different take on using the Configurations. (Like the Graphical Report might have 3 levels of Color use: B&W, full color, and 2 ink-saving.)

A few Fan Chart options from Family Search:

Graphical Reports options:

Chart View configuration options:
image

1 Like

Changing the language is simple. Just add a LANG=en_US.UTF-8 command before the command that starts Gramps.

Have you considered using Visual Studio Code for debugging?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.