Newbie questions about publishing new gramplet

Okay, so I’ve written a new gramplet, and I’m working through the instructions on Addons development - Gramps.

First, I’d like some confirmation to know if what I’ve done so far is okay. I’ve managed to upload my new Cosanguinuity gramplet to GitHub - gramps-project/addons-source at gramps51. So far so good?

Second, I think I might be missing something in the section “List your addon in the Gramps Plugin Manager”. Do I need to do a “git push”? What do I need to do to move forward?

I am an experienced programmer, but have zero experience with Git, and I’m still a newbie on the Gramps development process.

Cheers! Hane

To list your addon in the Plugin Manager you have to update the listings and the files in gramps/addons. See steps about usage in the README file of gramps/addons-source.

For addon development a pull request to addon-source is usually all you have to do, since the other steps are also maintained by experienced developers like @prculley.

1 Like

I should have replied sooner. I see you got addon-source rights from Nick. And so you have uploaded your code there. I would have said that the more normal approach to doing a new addon was to do a PR from your own Github account to the addon-source. We (developers) can then test your addon or change, provide comments against the PR, and accept when it seems ready. Part of the accept process would be for one of us to use the build scripts to create the listings and release gzip files. And then we would push the resulting items to the addons repo.
Normally most new contributors don’t get rights to the addons repo.
When I get a chance I will try to see if your work looks ok and build/release for you. It would be best if in the future if you use the PR process.

If you want some of our more advanced users to test your addon, you might advertise it here on Discourse, along with where to download the files. Several of our users have learned how to manually install addons this way and are likely to make comments.

Thanks for your advice, Paul!

First, to be clear, what do you mean my a “PR”? ("I’m a total newbie regarding git.) If I understand correctly, you’re suggesting I first push to my own GitHub account and point potential reviewers to that first, then push to the addon-source repo, right?

Second, a few people have tried out my gramplet, and provided useful suggestions. I even have someone lined up to do the French translation. I just figured it was time to push through the process documented at Addons development - Gramps. However, from that page, it seems like the process after the section “List your addon in the Gramps Plugin Manager” was not at all clear.

Anyways, as my understanding of the process improves, I now see why I don’t have rights to the addons repo.

I would certainly appreciate more eyes looking at my code, as well as advice on next steps. This is my first gramplet, and I don’t want it to be my last. I’m already planning out my next gramplet.

Cheers! Hans

I understand your frustration on our process. Many of the instruction wiki pages were written more as a reminder to developers or contributors in the past before the PR process was our preferred way of doing things. And we don’t always have the incentive to update the wiki pages well enough.

Look at Brief introduction to Git - Gramps

The specific subsection describes making a PR (Pull Request). The wiki page as a whole can be useful in helping to understand git etc. But it was written primarily for people making submissions to Gramps core code. So you have to make a few modifications to the commands for addons. Instead of targeting the in the stage where you get and clone the repo, you would use

And later on where it talks about ‘master’ branch you should use ‘maintenance/gramps51’ as that is the current branch for active addons.

If you need more help, continue to post here. And if you figure it out but think the instructions need more work (they probably do) then take a few notes along the way. With this help, perhaps we can improve (or give you rights to do so yourself) the wiki.

Okay, I think I’m starting to get it.

So far, I’ve added Cosanguinuity to the gramps51 branch. So moving forward, it looks like I need to do the following:

First, I’ll add the code to my own hgboldt repository, and put out one more call for reviewers. (I think I’m satisfied with the code, at least for now. But I want to make sure I get this process right.)

Then, once everything is good, I’ll add Cosanguinuity to the maintenance/gramps51 branch, and then call on you to create the listings and gz file.

Does that sound like a plan?

Cheers! Hans

I copied the files and added the app to my addons.

I am not sure of my need to use the app but I will tell you that I have a large and interconnected family. Your app sorted out the relations between my maternal grandmother and maternal grandfather’s trees very fast and created the displays equally as fast.

:+1: :smile: :+1: :smile::+1: :smile::+1:


So I looked at and downloaded your code for a quick test. I note that you uploaded to the addon-source repo at the ‘gramps51’ branch. This is different than the ‘maintenance/gramps51’ branch which is what gets released to users. Which allows us to continue making a PR using that branch if you prefer rather than uploading to your own Github account and creating the PR.

I suggest that you go to Github, addons-source repo web page.
Select the ‘gramps51’ branch in the branch selection box near the top on the left.
Select the ‘Contribute’ button on the next bar down and open a Pull Request.
On the PR page, change the ‘base’ to ‘maintanence/gramps51’.
The red "Cannot automatically merge’ should change to ‘Able to merge’ and the sections below should show your code commits and files.
If you are satisfied with what you see, hit the green ‘Create Pull Request’ button.

At that point developers like me can review your PR and make comments against it which will appear in your email; assuming you have given Github your correct email address. And new commits pushed to the branch will automatically appear on the PR page for further review.

That said, I got a few warnings when I tried out your code:

C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\ PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See:
  copy_button = Gtk.Button(MSG_COPY_TO_CLIPBOARD)
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\ PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See:
  pedigree_button = Gtk.Button(MSG_SHOW_PEDIGREES)
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\ PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See:
  copy_button = Gtk.Button(MSG_COPY_TO_CLIPBOARD)
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\ PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See:
  copy_button = Gtk.Button(MSG_COPY_TO_CLIPBOARD)
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\ PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See:
  close_button = Gtk.Button(MSG_CLOSE)

I also got an error when I tried to click on a highlighted person. In example.gramps tree, I0044 person active, single pane mode, I clicked on Martell, Luella…

(python3.exe:11308): Gtk-WARNING **: Unable to show 'P FOUJQC7PMC15VC4P0I': Error when getting information for file �C:\Users\prc\workspace\GrampsM\main\P FOUJQC7PMC15VC4P0I�: No such file or directory

I did not try to debug this.

Do you know if there is a place in the example.gramps tree that can showcase your Gramplet? My own tree doesn’t have any obvious situations to examine.

That said, I did not spot any obvious other quick error situations; so good work!

In my IDE (Eclipse/Pydev) there is an automatic PEP8/Pylint function when you look at the code. Your code has a large number of whitespace errors and some line length errors. It would be a good idea if at some point you would clean these up. We try to maintain a Pylint score of 90% or better for new code submissions to Gramps core, and while addons are not so restrictive, it is good to try for that score there as well.

Enough for now…

I have not found a good demonstration of multiple pedigree collapse in the example.gramps file.

However, the Royal92.ged (a PAF2.2 generated GEDCOM published in 1992 by Denis Robert Reid {1937-1998} documenting a European Royal family) is a classic example. I will continue to look around for a well vetted archive that would link nicely in the documentation. But here is a copy available through GitHub:


Thanks for the comments, Paul!

  1. I followed your instructions for git. So far so good.

  2. The deprecation warnings for Gtk.Button is a simple change to the code.

  3. Regarding “Gtk-WARNING **: Unable to show ‘P FOUJQC7PMC15VC4P0I’:”, I think I know what I did wrong. For some reason, though, I’m not seeing that warning on my computer.

    Are you getting the expected action when clicking on the link? That is, when you click on a name, is that person becoming the active person? And when you click on a relationship, are you opening up a new window?

  4. Regarding pylint, I’m currently seeing scores of 9.71 and 9.77 on my code. I’m not seeing any whitespace warnings. What’s the gramps coding standard for line length?

Anyways, there was another issue on my todo list, so it may take a few days before I upload my next revision.

Cheers! Hans

I’m starting to get the hang of git, and I’ve now created a couple of repositories on my own github account, including my cosanguinuity gramplet at GitHub - hgboldt/cosanguinuity: Gramplet to show pedigree collapse and spousal cosanguinuity for active person.. (The last version control system I used was subversion, and I never really properly understood it.)

Going forward, I’d like to understand the process of moving my code from my github account to the addons-source. I’m reading through Brief introduction to Git - Gramps, but I still find that document confusing.

Cheers! Hans

This Gramplet has been idling in the bullpen for quite a few months.

Paul, does it still give you the same errors?

I was definitely jumping the gun when I posted that code, getting too eager with going through the documented development process. I haven’t checked if the code is still there, but I will not object if someone deletes it. It probably doesn’t belong in the base code anyways. You can always get it from my GitHub account.

Regarding the warnings, I think I’ve fixed them. I believe they were mainly deprecated code warnings. For some reason, I wasn’t seeing them on my computer.

On no! It shouldn’t be deleted. It is too useful to not get out into general use.

[Although the filenames and links in this thread all point to the deprecated folder and Gramplet name with the "missing n" typo. It should be Consanguinity rather than ‘cosanguinity’. And the wiki page: Addon:Consanguinity Gramplet has the user docs.]

Most of the time, I create temporary false marriages so that your Gramplet will show the complex relationships between distant cousins with pedigree collapse. That is just too much work with any of the other tools but nearly instantaneous with yours.

I still sprain my tongue trying to say the name … but it is a good tool.

Brian: My point is, how should the Consanguinity gramplet be distributed? As part of the base Gramps distribution? Or as a 3rd party add-on? I’m thinking the latter would be more appropriate. As I said, you can always get the gramplet from my GitHub account, GitHub - hgboldt/consanguinity: Gramplet to show pedigree collapse and spousal consanguinity for active person.

There is some overlap of code between my gramplet and the base Gramps code, and if the gramplet were part of the base, that overlap should be investigated, and functionality merged. I’m not sure if I want to do that work.

Regarding how you use the gramplet, I am thinking of ways to extend my code to make that kind of thing easier since I also use some of that code in my Tangled Wed tool. Let me cogitate on that for a while.

Cheers! Hans


There are certain functions that should be included within the base code. My way of thinking about it is… What functionality would a new user expect to find when they first install Gramps?

And then there are enhancements which I see your Consanguinity tool. As such it should be added to the 3rd Party addon system making it available to all users (when ready). As an addon, it can be updated with bug fixes and enhancements that cannot be made to the base code between version releases.


Definitely distribute it as a 3rd party add-on. That is regardless of whether there is base code overlap.

(Although if you see core that could be more efficient, the sooner those are pursued, the better. Those changes tend to have a long lead time.)

The evolution of built-in plugins is stunted. That is simply because the release cycles are so periodic. And while bug fixes can be in upgrade releases or maintenance releases, enhancements are not allowed in the infrequent periodic maintenance releases, are only allowed for the rare upgrade releases. So enhancements are stifled more than fixes.

But with 3rd party add-ons, enhancements & fixes can be be released… whenever it feels right.

Unless something changes radically in the management of built-in plug-ins, add-ons should be the preferred target. It is even arguable that most of the built-ins should be shifted to be under the AddOn management, allowing some of those stunted plugins to realize more of their potential. (Plus, it would simplify the wiki, slim down the core and flatten the learning curve.)

1 Like

Hi Hans,

Can you tell us a little more about that overlap? I started a conversation in another thread about performance issues, especially in the relationship calculator, and the Deep Connections Gramplet, and in that thread Brian already mentioned your Consanguinity Gramplet, which happens to work quite fast, and and gives interesting results in my own family tree.

Merging your relationship calculations with the main code would be a nice thing to experiment with.

groeten uit Driebergen,


1 Like

Publishing the Consanguinuity Gramplet seems to have stalled somewhere.

Perhaps we could pick up documenting the publishing process with another Gramplet that has been stalled for more than a decade?

In 2009, Doug Blank shared a Gramps blog posting about his Wordle Gramplet.

That Gramplet has never made it from GitHub to the Plug-in Manager distribution system. So most Gramps users remain blissfully ignorant of its existence.

Yet it create a much prettier output than the Surname cloud Gramplet.

Perhaps a Developer could write up a 2 pronged process of publishing a Gramplet?

One prong would be the preferred method: self-published via the GitHub process.

The other might through submitting it as an attachment in a MantisBT Feature Request… where it is vetted by an experienced moderator. The moderator could clean up the proposed add-on’s registration and ensure the add-on is ready for translation. (Hopefully, each correction prompting expansions to the Developer documentation.) Then the Moderator properly submits it in the GitHub queue.

Hi Enno! Sorry for the delay in replying, I meant to respond earlier.

The overlap is in code dealing with relationships and pedigree. I wanted code that specifically dealt with issues of pedigree collapse in a reasonably efficient manner. I’m not sure how deeply I looked into the existing code, but I suspect it would have been awkward dealing with it to get the specific results I wanted.

I do suspect that my module may have usefulness beyond my consanguinity gramplet, and might be a good candidate for inclusion in the base. I already use it as well in ny TangledWeb plugin.

Cheers! Hans

1 Like