Deep Connections gramplet enhancement

@dsblank just released a v1.0.47 update, for Gramps 6.0 only (on 6 Aug 2025) to improve Deep Connections performance. Have you re-evaluated it?

Hi Brian

My base is still 5.2.4 however I have a working version of 6.0.4 with which I am relatively happy but still playing so will try out Deep Connections on that.

Will let you know how I get on
phil

Hi Brian

First thoughts

1.0.47 (Gramps 6.0.4) appears to be quicker (still slower than without, but usable without causing major irritation) than 1.0.42 (Gramps 5.2.4) both on same Raspberry Pi5 8gb, Bookworm and same database different Schema’s obviously.

For my test I have a DNA match whom I have never managed to establish the paper trail link too.

So in both versions Utilities/Relationship Calculator no connection is found.

However Deep Connections in both versions finds a link most of whom are are not labelled (1st cousin, 2nd cousin etc).

Will try to recreate an image but too many living people shown on my live database.
I really need to think what is happening here in the real world.

Interesting point here is the match is one of the ones with DNA Association for Segment Map.

Finally this is going up from the home person to the 5th great grandparent before starting down

phil

@dsblank

Could you do another minor enhancement to the Deep Connections Gramplet.

A message is appended as the Gramplet pauses between relationships sentinel = _( "\nPaused.\nPress Continue to search for additional relations.\n

But Repeated text block ends up obscuring the delineation between found relations. And if you were to copy’p’paste the output into an eMail to a fellow researcher, it has to be manually edited out. Could you tweak the gramplet to flush the Paused message when the Continue button is clicked? And to include a line break before each result?

Anthropic Claude recommends replacing

with :

    def resume_search(self, widget: object) -> None:
        """Resume the search after being paused."""
        if self.search_active:
            self.update_status(_("Resuming search..."))
            self.continue_button.set_sensitive(False)
            self.pause_button.set_sensitive(True)
            self._remove_pause_message()
            self.resume()

    def _remove_pause_message(self) -> None:
        """
        Remove the pause-prompt text from the output buffer.

        Searches the buffer for the sentinel string appended when the
        search pauses, deletes it, and leaves exactly one newline in
        its place so the next "Found relation #" starts on a clean line.
        """
        sentinel = _(
            "\nPaused.\nPress Continue to search for additional relations.\n"
        )
        buf = self.gui.buffer
        start_iter = buf.get_start_iter()
        found = start_iter.forward_search(
            sentinel, 0, buf.get_end_iter()
        )
        if found:
            match_start, match_end = found
            # Replace the sentinel with a single newline to preserve spacing.
            buf.delete(match_start, match_end)
            buf.insert(match_start, "\n")

And add a \n at the beginning of the string in:

This changes the readout to be more readable:

Note:

The screenshot was from the successful test (of the Claude Anthropic suggested changes) running Gramps 5.2 but based on Deep Connections 1.0.50, manually copied from the 6.1 Addons-source repo. (The repo for Gramps 5.2 was still at 1.0.42)

Could you do updates to the 6.1, 6.0 and 5.2 repos?

Thanks, I’ll take a look.

Do you just want to make a PR?

I’d rather not. I find the addon-source repositories to be a misery. With over 145 addon folder and active branches for master plus maintenance branches for 5.2, 6.0, 6.1, and (arguably) 4.2, it seems like keeping a clone repo sync’d so you can submit a PR is a full-time job.

I just tried submitting a PR (for the v5.2 Check Association data utility tool) yesterday via the webinterface. But doing a web edit to the .gpr.py, the .py, and adding a README.md created 3 PRs with no apparent way to squash them into a single PR. So that isn’t the answer either.

You are definitely doing it wrong then. This is what I’ll do:

  1. change to gramps/addons-source in the console
  2. git checkout maintenance/grampsXX
  3. Copy code changes to the right place; test it
  4. Make a PR from current changes
  5. Repeat 2 - 4 for all branches

Ah… I have never used Git from the console. That’s a whole new can of worms. (And I am absolutely flummoxed by the ‘setting up of a Gramps development environment’ in the Getting started with Gramps Development wiki page.)