# Associations, who is telling the truth?

**URL:** <https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662>\
**Category:** Help\
**Created:** [June 26, 2026, 10:10am UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662 "2026-06-26T10:10:26Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [June 27, 2026, 10:23am UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/21 "2026-06-27T10:23:19Z")

</div>

Because it was completely empty and it was hiding the interesting part

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 27, 2026, 10:32am UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/22 "2026-06-27T10:32:55Z")

</div>

Ah, ok, you did not generate “ghost families” for getting a relationships line between this uncle and his nephew. So, the relationship calculation returns an empty string.

---

<div class="post-metadata">

**Author:** ![GeorgeWilmes](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GeorgeWilmes](https://gramps.discourse.group/u/GeorgeWilmes)\
**Post date:** [June 27, 2026, 3:59pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/23 "2026-06-27T15:59:46Z")

</div>

Personally, I wish for an Associations gramplet, so that I don’t have to edit a person to look at their associations. It would be nice if such a gramplet showed all of the associations that a person is involved in, and showed the direction of each.

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 28, 2026, 12:25pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/24 "2026-06-28T12:25:19Z")

</div>

> [@AI guidelines for common enhancements to a Gramps feature](https://gramps.discourse.group/t/ai-guidelines-for-common-enhancements-to-a-gramps-feature/9665/4):
>
> Rather than computing all relationships between all people and all of their associations, it probably would be better to only do the selected person.

I guess that `CheckAssociations` addon was generated because there wasn’t a quick method to select people with associations data? That’s also why I was surprised you got it with few lines of code…

[https://gramps.discourse.group/t/new-gram-py-script-for-6-0/7192/11?u=romjerome](https://gramps.discourse.group/t/new-gram-py-script-for-6-0/7192/10)

Feel free to deprecate `CheckAssociations` addon. It still does the job: provide a way to check Associations into our database, but without advanced features, like a way for fixing some mistakes on seizure.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 28, 2026, 3:56pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/25 "2026-06-28T15:56:31Z")

</div>

> [@romjerome](#):
>
> Feel free to deprecate `CheckAssociations` addon

Please don’t eliminate that addon.

Once the hotlinking is implemented, it is similar to the “Type Cleanup” tool. It allows exposing all the Associations in the whole tree and allows sorting. Which make it simple to find Association types that need to be cleaned

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 28, 2026, 7:32pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/26 "2026-06-28T19:32:38Z")

</div>

Ah, yes, by deprecated, I should rather ask for a new maintainer after some improvements. As wrote before, it was one way for getting back some data not very accessible at a glance : all associations and linked/related people. So, feel free to improve the code or to generate a gramplet instead of an utility tool with possible performances issues on large database.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 28, 2026, 11:25pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/27 "2026-06-28T23:25:46Z")

</div>

> [@romjerome](#):
>
> I should rather ask for a new maintainer after some improvements.

@Nick-Hall & @GaryGriffin  
What is the preferred way to mark an Addon as open for adoption by a new Maintainer?

My feelings are similar about being the Maintainer for this tool. I’d like to share a day’s worth of wish-coded feature enhancements that make the Tool more than the current release’s Report-like functionality. (Tested with Gramps 5.2 version. Should be compatible with 5.2+ but needs testing.) Those enhancements are purely navigational in nature. The core function is unchanged.

But I do not want to become the Maintainer. Because a ‘recent’ Maintainer might discourage someone with good ideas for extending the core functionality. They should feel welcome to jump in with their own revision. A maintainer or recent copyright author may have connotations for Gary. Simple politeness demands that a private conversation be started to avoid stepping on their toes. And the Addon PRs feel as though they should be approved by the current Maintainer before publication.

---

<div class="post-metadata">

**Author:** ![GaryGriffin](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/garygriffin/32/6525_2.png) [@GaryGriffin](https://gramps.discourse.group/u/GaryGriffin)\
**Post date:** [June 29, 2026, 1:57am UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/28 "2026-06-29T01:57:23Z")

</div>

Generally, I look at the author email in the GPR first. I try to send a review notice to any change the author did not do. I have not looked at the copyleft but that is a good idea too.

I know of no way to mark an Addon as ‘looking for a new owner’.

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 29, 2026, 1:55pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/29 "2026-06-29T13:55:37Z")

</div>

> [@emyoulation](#):
>
> (Tested with Gramps 5.2 version. Should be compatible with 5.2+ but needs testing.)

Tested with Gramps 5.2 version and python 3.10 (or +)?

```diff
+from typing import Optional, Tuple # Add this import at the top of the file

-def _get_selected_row(self) -> tuple | None:
+def _get_selected_row(self) -> Optional[Tuple]:

```

or if you prefer to keep tuple (without generics):

```diff
+from typing import Optional

-def _get_selected_row(self) -> tuple | None:
+def _get_selected_row(self) -> Optional[tuple]:

```

```diff
-def __init__ (self, name, person_id: str | None = None) -> None:
+def __init__ (self, name, person_id: Optional[str] = None) -> None:

```

Above changes will work with python version \< 3.10 (like 3.8 for gramps 5.2).

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 29, 2026, 2:12pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/30 "2026-06-29T14:12:08Z")

</div>

I do not understand. I was led to believe that Gramps 5.2.2 uses its own sandboxed version of Python provided by the Installer. It apparently comes with 3.11.6 version. How would I test for 3.8 version?

```python
GRAMPS: 5.2.2 
Python: 3.11.6 
BSDDB: 6.2.9 (5, 3, 28) 
sqlite: 3.40.0 (2.6.0)
LANG: en_US.UTF-8
OS: Linux
Distribution: 6.5.12-100.fc37.x86_64  

```

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 29, 2026, 2:20pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/31 "2026-06-29T14:20:17Z")

</div>

I was trying to play with Mistral AI Vibe Code work - trying to include one github repository - when I saw your PR. I tested your new version.

Note, we can clearly see that switching between branches is not only a code issue, also need to check the environment (ressources, dependencies or versions). e.g., the AI pointed out a wrong cause of failure for this code on gramps 5.2 branch.

It was not a blocking issue but rather a method issue: the experimental ‘person.serialize()[-1]’, which could failed in the future… An improvement or clean-up, but it was not the cause of failure under Gramps 5.2 and python 3.8. I said to the AI to re-check the possible cause and saw that its gramps source code reference was oriented 5.1 branch. So, it makes sense for any upgrade process but it could be a problem by downgrading (or backporting) some “recent” code or method (like typing on python 3.10).

For Gramps 5.2.4

> <https://github.com/gramps-project/gramps/blob/v5.2.4/README.md>

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 29, 2026, 2:27pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/32 "2026-06-29T14:27:07Z")

</div>

> [@emyoulation](#):
>
> Gramps 5.2.2 uses its own sandboxed version of Python provided by the Installer.

Under Windows OS, Mac OS and the snap package. You can also download some .deb packages for Ubuntu 20.04 or 22.04, as well as the source code (_e.g., 5.2.4_), then run it without any build into a python/Gtk3 environment…

```shell
$ python3 Gramps.py

```

> [@emyoulation](#):
>
> How would I test for 3.8 version?

Maybe:

```shell
$ python -m venv my_env_for_3_8

```

then I suppose some additional stuff and virtual installations (like a new python version)?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 29, 2026, 3:07pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/33 "2026-06-29T15:07:17Z")

</div>

ooof! Your skills are well-suited for this PR… far more than mine.

And Il used the GitHub Web GUI to submitt the changes to the `.gpr.py`, the `.py` and add the `README.md` file. Which caused 3 PRs instead of 1. (That means extra work for @GaryGriffin )

Do you want to reject my PRs and resubmit the right way — as yours? I did nothing more than operate the wish-coding AI. You, Claude and Copilot did all the heavy-lifting.

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 29, 2026, 3:22pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/34 "2026-06-29T15:22:32Z")

</div>

I also have some problems with my local `gramps-addons` git repository.

> _Unable to create branch: Please address the rule violations and try again.[Learn more about rulesets.](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets)_
> 
> This branch must not contain merge commits.

---

<div class="post-metadata">

**Author:** ![GaryGriffin](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/garygriffin/32/6525_2.png) [@GaryGriffin](https://gramps.discourse.group/u/GaryGriffin)\
**Post date:** [June 29, 2026, 3:35pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/35 "2026-06-29T15:35:23Z")

</div>

The 3 PRs are on the gramps52 branch. My suggestion is to close these and create a new single PR on the gramps60 branch.

I am not a fan of the extra python code in the GPR, preferring the fixed version number like it is now. Let me know if you want me to create the PR.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 29, 2026, 3:39pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/36 "2026-06-29T15:39:12Z")

</div>

> [@GaryGriffin](#):
>
> The 3 PRs are on the gramps52 branch

That was intentional. I did the tests on the 5.2 version, for the release with the 5.2 version. I am not using the 6.0 or 6.1 as my production version yet. I just use those for occasional testing.

> [@GaryGriffin](#):
>
> preferring the fixed version number

My personal preference is towards the opposite. Although a LOT of extra python code in the GPR is unpleasant. I see no reason for a such a high-maintenance systems of Gramps version distinction and hassle of multiple repositories when the plugins are cross-compatible with several versions of Gramps.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [June 29, 2026, 4:03pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/37 "2026-06-29T16:03:44Z")

</div>

> [@GaryGriffin](#):
>
> I know of no way to mark an Addon as ‘looking for a new owner’.

I suppose you could add the line `maintainers = ["Unmaintained"]` to the `gpr` file after trying to contact the author. My original intention was that every addon should have a maintainer and an empty list would indicate the lack of a maintainer, but this field is not widely used yet.

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 29, 2026, 6:05pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/38 "2026-06-29T18:05:02Z")

</div>

If this could help, I was able to create a new banch by disabling an old ruleset.

Added as a draft one for Gramps 52 (and python 3.8 support)

> <https://github.com/gramps-project/addons-source/pull/967>

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 30, 2026, 5:16am UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/39 "2026-06-30T05:16:39Z")

</div>

> It was not a blocking issue but rather a method issue: the experimental ‘person.serialize()[-1]’, which could failed in the future… An improvement or clean-up, but it was not the cause of failure under Gramps 5.2 and python 3.8.

Ah, yes, already get a failure on gramps 6.1 beta 1 (the last one will be now the `familysearch_sync`)…

```shell
Traceback (most recent call last):
File "/Users/gary/Library/Application Support/gramps/gramps61/plugins/AssociationsTool/associationstool.py", line 199, in _build_with_progress
_, _, _, two, value = ref
^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 5)

```

```shell
File "/Users/gary/Library/Application Support/gramps/gramps61/plugins/AssociationsTool/associationstool.py", line 71, in init
(a, b, c, two, value) = ref
^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 5)

```

```python
two = RefBase.serialize(self) (handle de la personne associée)
value = self.rel (type de relation)

```

As proposed by the AI, a proper method should be:

```python
for ref in person.get_person_ref_list():
    two = ref.ref
    value = str(ref.relation) # `relation` est un objet, convertissez-le en str si nécessaire

```

---

<div class="post-metadata">

**Author:** ![romjerome](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/romjerome/32/1489_2.png) [@romjerome](https://gramps.discourse.group/u/romjerome)\
**Post date:** [June 30, 2026, 2:28pm UTC](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662/40 "2026-06-30T14:28:59Z")

</div>

ok, I fixed (_by myself, without AI_) Claude’s lack… 🙄

Code should now be ready for a review on gramps 5.2 to 6.x branches. 😉

_Note, I did not yet run Vibe Code on my local gramps repositories, but I will also try an automatic review for these enhancements on the next hours…_ **update**

# AssociationsTool Analysis

* * *

## 📌 **Overview**

**AssociationsTool** is a **Gramps addon** designed to **display, analyze, and edit person associations** in a genealogy database.  
The `new version` branch represents a **major refactor** of the original tool, introducing **enhanced functionality, performance, and user experience**.

* * *

* * *

## 📁 **File Structure**

| File | Role | Changes (vs `previous version`) |
| --- | --- | --- |
| [`associationstool.py`](https://github.com/romjeromealt/addons-source/blob/asso/AssociationsTool/associationstool.py) | Main tool code | **Complete refactor** (120 → 735 lines) |
| [`associationstool.gpr.py`](https://github.com/romjeromealt/addons-source/blob/asso/AssociationsTool/associationstool.gpr.py) | Gramps registration | Updated metadata (version `1.2.1`, new authors) |
| [`README.md`](https://github.com/romjeromealt/addons-source/blob/asso/AssociationsTool/README.md) | Documentation | **Added** (detailed usage guide) |

* * *

* * *

## 🔍 **Key Improvements (vs `previous version`)**

| **Aspect** | **`previous version`** | **`new version`** | **Impact** |
| --- | --- | --- | --- |
| **Code Size** | ~120 lines | **~735 lines** (6x larger) | ✅ Major |
| **Features** | Basic table display | **Sortable, editable, context menu** | ✅✅✅ |
| **Error Handling** | None | **Robust** (`try/except` everywhere) | ✅✅✅ |
| **Performance** | Synchronous loading | **Async batch processing** | ✅✅✅ |
| **UI/UX** | Basic table | **Interactive, modern GTK** | ✅✅✅ |
| **Documentation** | Minimal | **Complete** (docstrings, README) | ✅✅✅ |
| **Maintainability** | Low | **High** (type hints, modular) | ✅✅✅ |

* * *

* * *

## 🚀 **Features**

### **1. Core Functionality**

- **Displays all person associations** in a **sortable table**.
- **Calculates relationships** between associated persons (e.g., “Father”, “Cousin”).
- **Supports both GUI and CLI modes**.

### **2. Interactive UI (GUI Mode)**

| **Feature** | **Description** |
| --- | --- |
| **Sortable Columns** | Click headers to sort by name, relationship, or link type. |
| **Double-Click Actions** | Open editors for persons/associations directly. |
| **Context Menu** | Right-click for **5 actions** (edit, copy, create note). |
| **Tooltips** | Hover over rows to see details (e.g., “Alice → Bob [Godparent]”). |
| **Progress Bar** | Shows processing status for large databases (\>1s). |
| **Status Bar** | Displays total associations count. |
| **Help Button** | Opens the [Gramps wiki page](https://www.gramps-project.org/wiki/index.php/Addon:Check_Associations). |

### **3. Context Menu Actions**

| **Action** | **Description** |
| --- | --- |
| **Edit Starting Person** | Open the **Person Editor** for the first person. |
| **Edit Associate Person** | Open the **Person Editor** for the associated person. |
| **Edit Association** | Open the **Association Editor** for the selected link. |
| **Copy Row to Clipboard** | Copy row data as **tab-separated text** (for Excel/CSV). |
| **Create Note from Row** | Generate a **pre-formatted note** with clickable person links. |

### **4. Note Creation Feature**

- Creates a **StyledText note** with:
  - Association details (names, relationship, link type).

  - **Clickable hyperlinks** to person records (`gramps://Person/handle/...`).

  - Example output:

### **5. CLI Mode**

- Prints a **formatted table** to stdout:

Starting Name Calculated • Associate Link Type Alice Cousin • Bob Godparent

- Shows **total associations count**.

* * *

* * *

## 🔧 **Technical Highlights**

### **1. Asynchronous Data Loading**

- Uses **`GLib.idle_add`** to process data in **batches (50 persons at a time)**.
- Prevents UI freezing for large databases.
- **Progress dialog** appears after **1 second** of processing.

### **2. Error Handling**

- **Comprehensive `try/except` blocks** for:
- Database access (`get_person_from_handle`).
- Relationship calculation.
- GUI operations (e.g., progress dialog creation).
- **Logging** (`LOG.error`, `LOG.warning`) for debugging.

### **3. Code Quality**

- **Type Hints** : Uses `Optional`, `Tuple` for better IDE support.
- **Docstrings** : All methods are documented.
- **Constants** : Named column indices (e.g., `COL_NAME1 = 0`).
- **Modularity** : Separates logic into small, focused methods (e.g., `_build_gui`, `_show_progress_dialog`).

### **4. Gramps API Usage**

- **Backend-agnostic** : Uses Gramps’ public API:
- `dbstate.db.get_person_handles()`
- `person.get_person_ref_list()`
- `get_relationship_calculator()`
- **No direct database access** (works with SQLite, PostgreSQL, etc.).

## **Strengths of `new version` Branch**

| **Category** | **Improvements** |
| --- | --- |
| **🔧 Features** | ✅ Context menu (5 actions)   
 ✅ Double-click editing   
 ✅ Linked notes   
 ✅ Clipboard copy   
 ✅ Help button |
| **🚀 Performance** | ✅ Async batch loading   
 ✅ Progress bar for large DBs   
 ✅ Cancelable |
| **🛡 Robustness** | ✅ Error handling everywhere   
 ✅ Logging   
 ✅ Valid handle checks |
| **🎨 UI/UX** | ✅ Sortable table   
 ✅ Custom tooltips   
 ✅ Status bar   
 ✅ Modal window |
| **📝 Code Quality** | ✅ Type hints   
 ✅ Docstrings   
 ✅ Named constants   
 ✅ Modular methods |
| **📚 Documentation** | ✅ Detailed README   
 ✅ Usage examples   
 ✅ Wiki links |

* * *

* * *

## ⚠ **Minor Areas for Improvement**

| **Issue** | **Severity** | **Suggested Fix** |
| --- | --- | --- |
| Fixed `batch_size = 50` | Low | Make configurable or dynamic. |
| No filtering | Low | Add search bar or type filters. |
| No CSV export | Low | Add “Export to CSV” button. |
| Fixed `PROGRESS_THRESHOLD_MS` | Low | Adjust based on DB size. |
| No unit tests | Low | Add tests for critical methods. |

* * *

* * *

## 📊 **Comparison: `previous version` vs `new one`**

| **Criteria** | **`previous`** | **`new`** | **Gap** |
| --- | --- | --- | --- |
| **Lines of Code** | ~120 | ~735 | +615 |
| **Features** | Basic | **Advanced** | ✅✅✅ |
| **Error Handling** | ❌ None | ✅ Complete | ✅✅✅ |
| **Performance** | ⚠ Synchronous | ✅ Async | ✅✅✅ |
| **UI/UX** | ⚠ Basic | ✅ Rich | ✅✅✅ |
| **Documentation** | ❌ Minimal | ✅ Complete | ✅✅✅ |
| **Maintainability** | ⚠ Low | ✅ High | ✅✅✅ |

* * *

* * *

## 🎯 **Conclusion**

The **`new version` branch** is a **complete rewrite** of **AssociationsTool** , offering:

1. **Rich User Experience** :
  - Sortable, interactive table.
  - **Context menu** with 5 useful actions.
  - **Double-click** to edit directly.
  - **Smart note creation** with clickable links.

2. **Optimized Performance** :
  - **Async batch loading** to prevent UI freezing.
  - **Progress bar** for large databases.

3. **Robust & Maintainable Code** :
  - **Type hints** , docstrings, logging.
  - **Comprehensive error handling**.
  - **Modular design** (short, focused methods).

### **Recommendation**

✅ **Use the `new version` branch** : It is **production-ready** and **far superior** to `previous version`. 🔧 **Optional Improvements** :

- Add **filtering** (e.g., by association type).
- Support **CSV/JSON export**.
- Write **unit tests** for critical functions.

* * *

## 🔗 **Useful Links**

- [Source Code (GitHub)](https://github.com/romjeromealt/addons-source/tree/asso/AssociationsTool)
- [Gramps Wiki](https://www.gramps-project.org/wiki/index.php/Addon:Check_Associations)
- [Gramps API Docs](https://gramps-project.org/wiki/index.php/Gramps_6.1_Wiki_Manual_-_Developers)

# 🗺 AssociationsTool Roadmap

_Development roadmap for the Gramps AssociationsTool addon, structured by priority and complexity._

* * *

## 🎯 **Overview**

This roadmap outlines the **future development** of **AssociationsTool** , a Gramps addon for displaying, analyzing, and editing person associations. It is divided into **6 phases** , prioritized by **user needs** , **maintainability** , and **best practices** for Gramps addons.

**Priority Levels** :  
⭐ = Low ⭐⭐ = Medium | ⭐⭐⭐ = High

* * *

* * *

## 📌 **Current Status (Branch: `asso`)**

- **Version** : 1.2.1
- **Compatibility** : Gramps 5.2+ and 6.x (fixed via the `get_ref_relation` helper function).
- **Key Features** :
  - Sortable and interactive table.
  - Context menu (edit, copy, create note).
  - Double-click to edit.
  - Progress bar for large databases.
  - CLI and GUI modes.

* * *

* * *

## 🎯 **Phase 1: Stabilization & Bug Fixes (Priority: ⭐⭐⭐)**

**Goal** : Ensure the tool is **reliable and bug-free** for all users.

| **Task** | **Description** | **Complexity** | **Benefit** | **Estimated Time** |
| --- | --- | --- | --- | --- |
| Test Gramps 5.2/6.x compatibility | Verify the recent fix works on both versions. | ⭐ | ⭐⭐⭐ | 1-2 hours |
| Add detailed logging | Improve log messages for debugging (e.g., `LOG.debug` for ignored associations). | ⭐ | ⭐⭐ | 1 hour |
| Handle edge cases | Ensure `get_relation()` returns valid strings (not `None` or empty). | ⭐ | ⭐⭐ | 1 hour |
| Validate performance | Test with a **10,000+ person database** to detect slowdowns. | ⭐⭐ | ⭐⭐⭐ | 2 hours |

**Deliverable** : A **stable and tested version** for Gramps 5.2 and 6.x.

* * *

## 🚀 **Phase 2: User Improvements (Priority: ⭐⭐)**

**Goal** : Add **practical features** for end-users.

| **Task** | **Description** | **Complexity** | **Benefit** | **Estimated Time** |
| --- | --- | --- | --- | --- |
| Filter by association type | Add a **search bar** to filter by type (e.g., “Godparent”, “Witness”). | ⭐⭐ | ⭐⭐⭐ | 3-4 hours |
| Export to CSV/JSON | Add a button to export results to a file. | ⭐⭐ | ⭐⭐⭐ | 4 hours |
| Multi-column sorting | Allow sorting by **multiple columns** (e.g., type then name). | ⭐⭐ | ⭐⭐ | 2 hours |
| Multi-row selection | Enable selecting **multiple rows** for batch actions (e.g., delete, export). | ⭐⭐ | ⭐⭐ | 3 hours |
| Customizable columns | Let users **choose which columns to display**. | ⭐⭐ | ⭐⭐ | 4 hours |
| Auto-refresh | Add a button to **refresh data** without closing the window. | ⭐ | ⭐⭐ | 1 hour |

**Deliverable** : A **more flexible and powerful tool** for advanced users.

* * *

## 🎨 **Phase 3: User Experience Enhancements (Priority: ⭐⭐)**

**Goal** : Improve **ergonomics** and **accessibility**.

| **Task** | **Description** | **Complexity** | **Benefit** | **Estimated Time** |
| --- | --- | --- | --- | --- |
| Dark theme support | Adapt the UI for Gramps’ **dark mode**. | ⭐ | ⭐⭐ | 2 hours |
| Keyboard shortcuts | Add shortcuts (e.g., `Ctrl+C` to copy, `Ctrl+F` to filter). | ⭐⭐ | ⭐⭐ | 3 hours |
| Enhanced tooltips | Add **detailed descriptions** for each column. | ⭐ | ⭐ | 1 hour |
| Icons for actions | Replace context menu text with **icons**. | ⭐ | ⭐ | 2 hours |
| Search history | Save **last used filters**. | ⭐⭐ | ⭐ | 3 hours |

**Deliverable** : A **more intuitive and modern user experience**.

* * *

## 🔧 **Phase 4: Advanced Features (Priority: ⭐)**

**Goal** : Add **advanced capabilities** for expert users.

| **Task** | **Description** | **Complexity** | **Benefit** | **Estimated Time** |
| --- | --- | --- | --- | --- |
| Merge associations | Detect and merge **duplicate associations** (e.g., two “Godparent” entries for the same person). | ⭐⭐⭐ | ⭐⭐ | 5 hours |
| Global statistics | Display **statistics** (e.g., number of associations per type). | ⭐⭐ | ⭐⭐ | 3 hours |
| Relationship graph | Generate a **graph** of associations (via Graphviz or DOT). | ⭐⭐⭐ | ⭐ | 6 hours |
| Advanced search | Filter by **date** , **place** , or other metadata. | ⭐⭐⭐ | ⭐⭐ | 5 hours |
| Integration with other tools | Link with **SyncAssociation** or **Gramps-Web**. | ⭐⭐⭐ | ⭐ | 4 hours |
| Scripting support | Allow running **custom scripts** on selected associations. | ⭐⭐⭐ | ⭐ | 8 hours |

**Deliverable** : A **powerful tool for genealogy experts**.

* * *

## 📊 **Phase 5: Maintenance & Documentation (Priority: ⭐⭐)**

**Goal** : Ensure the project’s **longevity**.

| **Task** | **Description** | **Complexity** | **Benefit** | **Estimated Time** |
| --- | --- | --- | --- | --- |
| Unit tests | Write tests for **critical functions** (e.g., `get_ref_relation`). | ⭐⭐ | ⭐⭐⭐ | 4 hours |
| Technical documentation | Add a **developer guide** (e.g., how to extend the tool). | ⭐ | ⭐⭐ | 2 hours |
| Translations | Update **PO files** for new features. | ⭐ | ⭐⭐ | 2 hours |
| Changelog | Maintain a **change log** for users and maintainers. | ⭐ | ⭐ | 1 hour |
| CI/CD | Set up **automated tests** (GitHub Actions) for Gramps 5.2 and 6.x. | ⭐⭐ | ⭐⭐ | 3 hours |

**Deliverable** : A **well-documented and maintainable project**.

* * *

## 🌍 **Phase 6: Community Integration (Priority: ⭐)**

**Goal** : **Share and promote** the tool.

| **Task** | **Description** | **Complexity** | **Benefit** | **Estimated Time** |
| --- | --- | --- | --- | --- |
| Submit to Gramps Addons | Propose the tool for **official integration** in the Gramps repository. | ⭐ | ⭐⭐⭐ | 1 hour |
| Create a wiki page | Document the tool on the [Gramps wiki](https://www.gramps-project.org/wiki/). | ⭐ | ⭐⭐ | 2 hours |
| Video tutorials | Create **demonstration videos** (e.g., YouTube). | ⭐⭐ | ⭐ | 4 hours |
| User feedback | Collect **feedback** via forms or GitHub Issues. | ⭐ | ⭐⭐ | 1 hour |
| Community presentation | Present the tool on the [Gramps forum](https://gramps.discourse.group/). | ⭐ | ⭐ | 1 hour |

**Deliverable** : **Increased visibility** and an **engaged community**.

📅 **Suggested Timeline**

_Based on part-time development._

| **Phase** | **Duration** | **Deliverable** | **Priority** |
| --- | --- | --- | --- |
| Phase 1 | 1-2 weeks | Stable version (1.2.2) | ⭐⭐⭐ |
| Phase 2 | 2-3 weeks | Version with filters and export (1.3.0) | ⭐⭐ |
| Phase 3 | 2 weeks | Improved UX (1.4.0) | ⭐⭐ |
| Phase 4 | 3-4 weeks | Advanced features (2.0.0) | ⭐ |
| Phase 5 | 2 weeks | Documentation and tests (2.0.0) | ⭐⭐ |
| Phase 6 | 1 week | Community integration | ⭐ |

## 🎯 **Recommendations by User Profile**

| **Profile** | **Priority Phases** | **Goal** |
| --- | --- | --- |
| **Beginner User** | Phase 1 + Phase 2 | **Reliable and simple** tool. |
| **Advanced User** | Phase 1 + Phase 2 + Phase 4 | **Powerful** tool for analyzing associations. |
| **Developer** | Phase 1 + Phase 5 | **Maintainable and tested** code. |
| **Maintainer** | All phases | **Sustainable and community-driven** project. |

## 💡 **Bonus Ideas (Out of Scope)**

If you want to go **even further** :

1. **External Tool Integration** :
  - Export to **GEDCOM** or **FamilySearch**.
  - Link with **[Ancestry.com](http://Ancestry.com)** or **MyHeritage**.

2. **Semantic Analysis** :
  - Detect **inconsistencies** (e.g., a person associated as “Godparent” but without a baptism event).

3. **Machine Learning** :
  - Suggest **missing associations** (e.g., “This person is likely the godparent of X”).

4. **Collaboration** :
  - Allow **multiple users** to work on the same associations (via a server).

* * *

## 📌 **Next Steps**

1. **Prioritize tasks** based on your **needs** and **available time**.
2. **Start with Phase 1** (stabilization) if you want a **reliable version quickly**.
3. **Move to Phase 2** (filters, export) to add **useful features**.
4. **Document each step** to ease maintenance.

* * *

More technical:

> [@Like compiling an addon](https://gramps.discourse.group/t/like-compiling-an-addon/9680):
>
> Hello. Just a post for sharing my last experimentation with a code review from an AI. I did not test one as efficient as last Claude version, only an other one maybe more flexible for a quick review and few token. curl -X POST "``https://api.mistral.ai/v1/chat/completions``" -H "Content-Type: application/json" -H "Authorization: Bearer ABC\_my\_API\_789" -d '{ "model": "labs-leanstral-1-5", "messages": [ { "role": "user", "content": "Peux-tu prouver que ce code fonctionne : ``https://r…

[Previous page](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662.md?page=1)

[Next page](https://gramps.discourse.group/t/associations-who-is-telling-the-truth/9662.md?page=3)
