Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: addons-ci
channels:
- conda-forge
dependencies:
- python=3.12
- pygobject
- gtk3
- pip
- pip:
- "gramps>=6.0,<6.1"
- orjson
- pytest
- dbf
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- uses: actions/checkout@v4

- name: Compile all Python files (excluding .gpr.py)
shell: bash
run: |
failed=0
while IFS= read -r f; do
Expand Down Expand Up @@ -126,12 +127,15 @@ jobs:
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
python-version: "3.12"
activate-environment: addons-ci
channels: conda-forge
environment-file: .github/environment.yml
use-mamba: true

- name: Install Gramps + test deps
run: mamba install -y "gramps>=6.0,<6.1" pygobject gtk3 orjson pytest dbf
- name: Verify environment
run: |
mamba info
mamba list | head -30
python -c "import pytest, gramps, gi; print('deps OK')"

- name: Run per-addon unit tests
env:
Expand Down
1 change: 1 addition & 0 deletions AnniversariesGramplet/AnniversariesGramplet.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from gramps.gen.utils.db import get_participant_from_event
from gramps.gen.datehandler import get_date
from gramps.gen.config import config
from gramps.gen.errors import WindowActiveError
from gramps.gui.editors import EditEvent

from gramps.gen.const import GRAMPS_LOCALE as glocale
Expand Down
18 changes: 18 additions & 0 deletions AnniversariesGramplet/po/template.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-17 00:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
18 changes: 18 additions & 0 deletions ArchiveAssist/po/template.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-17 00:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
3 changes: 0 additions & 3 deletions AttachSourceTool/AttachSourceTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,3 @@ def create_source(self, source_text):
self.db.add_source(source, self.trans)
return source

self.db.add_event(event, self.trans)
return event

4 changes: 3 additions & 1 deletion CombinedView/combinedview.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
from personpage import PersonPage
from eventpage import EventPage
from gramps.gen.config import config
from gramps.gen.lib import Family, ChildRef, Person
from gramps.gen.lib import Family, ChildRef, Person, EventType
from gramps.gen.utils.db import get_birth_or_fallback, get_death_or_fallback
from gramps.gen.datehandler import get_date
from gramps.gui.uimanager import ActionGroup
from gramps.gui.selectors import SelectorFactory
from gramps.gen.errors import WindowActiveError
Expand Down
1 change: 1 addition & 0 deletions DenominoViso/DenominoViso.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
from urllib.request import pathname2url
from xml.sax.saxutils import escape, quoteattr
from math import sin,cos,exp,sqrt,e,pi
from functools import reduce
import codecs

#-------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions DescendantBooks/RunReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from gramps.gen.plug.report import CATEGORY_TEXT
from gramps.gui.utils import open_file_with_default_application
from gramps.gui.user import User
from gramps.gui.dialog import ErrorDialog
from gramps.gui.plug.report._textreportdialog import TextReportDialog


Expand Down
1 change: 1 addition & 0 deletions DescendantsLines/ft.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import xml.dom.minidom
import getopt
import sys
from functools import reduce
#-------------------------------------------------------------------------
#
# variables
Expand Down
9 changes: 2 additions & 7 deletions DynamicWeb/dynamicweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,9 @@
import tarfile
import tempfile

if sys.version_info[0] < 3:
from cStringIO import StringIO

string_types = basestring
else:
from io import StringIO
from io import StringIO

string_types = str
string_types = str
from unicodedata import normalize
from collections import defaultdict, OrderedDict
from xml.sax.saxutils import escape
Expand Down
3 changes: 0 additions & 3 deletions DynamicWeb/run_dynamicweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
if (not os.path.exists(gramps_path)): raise Exception("Gramps path GRAMPS_RESOURCES not found")
sys.path.insert(1, gramps_path)

if sys.version_info[0] < 3:
reload(sys)
sys.setdefaultencoding('utf8')
from dynamicweb import *
from dynamicweb import _
from report_sets import *
Expand Down
2 changes: 1 addition & 1 deletion EditExifMetadata/editexifmetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def __create_button(self, text, callback=[], sensitive=False):
"""
button = Gtk.Button(label=_(text))

if callback is not []:
if callback != []:
for call_ in callback:
button.connect("clicked", call_)

Expand Down
1 change: 1 addition & 0 deletions Form/selectform.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#
# ------------------------------------------------------------------------
from gramps.gen.const import GRAMPS_LOCALE as glocale
from gramps.gui.display import display_help

try:
_trans = glocale.get_addon_translator(__file__)
Expand Down
18 changes: 18 additions & 0 deletions GrampsChat/po/template.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-17 00:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
1 change: 1 addition & 0 deletions GrampsWebSync/diffhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from datetime import datetime

from gramps.gen.db.base import DbReadBase
from gramps.gen.db import DbTxn
from gramps.gen.merge.diff import diff_dbs
from gramps.gen.user import User

Expand Down
1 change: 1 addition & 0 deletions GrampsWebSync/grampswebsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import threading
from collections.abc import Callable
from datetime import datetime
from typing import Any
from urllib.error import HTTPError, URLError
from urllib.parse import urlparse

Expand Down
18 changes: 18 additions & 0 deletions GrampyScript/po/template.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-17 00:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
2 changes: 1 addition & 1 deletion JSON/JSONImport.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def importData(db, filename, user):
elif isinstance(obj, Place):
db.add_place(obj, trans)
else:
LOG.warn("ignored: " + data)
LOG.warn("ignored: " + line)
line = fp.readline()
except EnvironmentError as err:
user.notify_error(_("%s could not be opened\n") % filename, str(err))
Expand Down
4 changes: 2 additions & 2 deletions LifeLineChartView/lifelinechart.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,8 @@ def on_mouse_move(self, widget, event):
self.mouse_x, self.mouse_y = event.x, event.y
tooltip = ""
if gr_individual:
if (self._tooltip_individual_cache is None or \
self._tooltip_individual_cache != gr_individual, gr_family):
if (self._tooltip_individual_cache is None or
self._tooltip_individual_cache != (gr_individual, gr_family)):
if self._tooltip_individual_cache != (gr_individual, gr_family):
self._tooltip_individual_cache = gr_individual, gr_family
self.queue_draw_wrapper()
Expand Down
1 change: 1 addition & 0 deletions LinesOfDescendency/lines-of-descendency.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from gramps.gen.plug.report import Report
from gramps.gen.plug.report import CATEGORY_TEXT
from gramps.gen.plug.report import MenuReportOptions
from gramps.gen.errors import ReportError
import gramps.gen.plug.report.utils as ReportUtils


Expand Down
1 change: 1 addition & 0 deletions MongoDB/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from gramps.gen.utils.configmanager import ConfigManager
from gramps.gen.config import config
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext

LOG = logging.getLogger(".mongodb")
_LOG = logging.getLogger(DBLOGNAME)
Expand Down
1 change: 1 addition & 0 deletions PersonEverything/PersonEverything.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
from gramps.gen.display.name import displayer as global_name_display
from gramps.gen.display.place import displayer as place_displayer
from gramps.gen.sort import Sort
from gramps.gen.errors import ReportError
from gramps.gen.utils.db import (get_birth_or_fallback, get_death_or_fallback)
from gramps.gen.utils.lds import TEMPLES
from gramps.gen.utils.place import conv_lat_lon
Expand Down
1 change: 1 addition & 0 deletions PlaceUpdate/PlaceUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

from gramps.gui.selectors import SelectorFactory
from gramps.gui.widgets import MonitoredDate, ValidatableMaskedEntry
from gramps.gui.editors import EditDate

from gramps.gen.const import GRAMPS_LOCALE as glocale
try:
Expand Down
1 change: 1 addition & 0 deletions PostgreSQLEnhanced/postgresqlenhanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import re
import pickle
import sys
import time
from urllib.parse import urlparse, parse_qs

# -------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions Query/QueryGramplet.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

from gramps.gen.plug import Gramplet
import gramps.gen
import sys

#------------------------------------------------------------------------
#
Expand Down
2 changes: 1 addition & 1 deletion Query/QueryQuickview.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def get_rows(self):
table = Table()
self.sdb = SimpleAccess(self.database)
self.process_table(table) # a class that has .row(1, 2, 3, ...)
print(_("{rows:d} rows processed in {secs} seconds.\n").format(rows=self.select, secs=time.time() - start_time)
print(_("{rows:d} rows processed in {secs} seconds.\n").format(rows=self.select, secs=time.time() - start_time))
return table

def eval(self):
Expand Down
6 changes: 3 additions & 3 deletions QuiltView/QuiltView.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# Gramps Modules
#
#-------------------------------------------------------------------------
from gramps.gen.lib import Person, Family, ChildRef, Name
from gramps.gen.lib import Person, Family, ChildRef, Name, Surname
from gramps.gui.views.navigationview import NavigationView
from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.errors import WindowActiveError
Expand Down Expand Up @@ -1236,9 +1236,9 @@ def add_children_submenu(self, menu, person, family=None):

if find_children(self.dbstate.db, child):
label = Gtk.Label(label='<b><i>%s</i></b>'
% escape(displayer.display(child)))
% escape(name_displayer.display(child)))
else:
label = Gtk.Label(label=escape(displayer.display(child)))
label = Gtk.Label(label=escape(name_displayer.display(child)))

child_item = Gtk.MenuItem()
label.set_use_markup(True)
Expand Down
2 changes: 1 addition & 1 deletion RelID/relation_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from gramps.gui.plug import tool
from gramps.gen.plug.menu import StringOption, FilterOption, PersonOption, EnumeratedListOption
import gramps.gen.plug.report.utils as ReportUtils
from gramps.gui.dialog import WarningDialog, OkDialog
from gramps.gui.dialog import WarningDialog, OkDialog, ErrorDialog
from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.relationship import get_relationship_calculator
from gramps.gen.filters import GenericFilterFactory, rules
Expand Down
4 changes: 2 additions & 2 deletions SourceIndex/birth.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def on_ok_clicked(widget, data=None):
print('save')
Gtk.main_save()

def on_witness_clicked( widget, data=None):
print(event)
def on_witness_clicked(widget, data=None):
print('witness')
#from witness import Witness
#Witness.window.show()

Expand Down
1 change: 0 additions & 1 deletion SourceIndex/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ def indexes(self):
'Load indexes' means to load ordered tables, search environment
"""

files = f.endswith('.xml')
parent_path = os.path.join(USER_PLUGINS, 'SourceIndex')


Expand Down
1 change: 1 addition & 0 deletions SourceReferences/SourceReferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from Utils import navigation_label
from gen.plug import Gramplet
import gtk
import gramps.gen.errors as Errors

from gramps.gen.const import GRAMPS_LOCALE as glocale
try:
Expand Down
10 changes: 5 additions & 5 deletions SurnameMappingGramplet/SurnameMappingGramplet.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ def add_mapping_clicked(self, event):
response = self.show_dialog(_("Create Mapping"), None, None)
if response:
(surname, group) = response
self.dbstate.db.set_name_group_mapping(unicode(surname), unicode(group))
self.dbstate.db.set_name_group_mapping(str(surname), str(group))
self.main()

def remove_mapping_clicked(self, event):
(model, pathlist) = self.treeview.get_selection().get_selected_rows()
for path in pathlist:
tree_iter = model.get_iter(path)
value = model.get_value(tree_iter, 0)
self.dbstate.db.set_name_group_mapping(unicode(value), None)
self.dbstate.db.set_name_group_mapping(str(value), None)
self.main()

def edit_row(self, model, path):
Expand All @@ -159,10 +159,10 @@ def edit_row(self, model, path):
if response:
(new_surname, new_group) = response
if new_surname == surname:
self.dbstate.db.set_name_group_mapping(unicode(surname), unicode(new_group))
self.dbstate.db.set_name_group_mapping(str(surname), str(new_group))
else:
self.dbstate.db.set_name_group_mapping(unicode(surname), None)
self.dbstate.db.set_name_group_mapping(unicode(new_surname), unicode(new_group))
self.dbstate.db.set_name_group_mapping(str(surname), None)
self.dbstate.db.set_name_group_mapping(str(new_surname), str(new_group))

def edit_mapping_clicked(self, event):
(model, pathlist) = self.treeview.get_selection().get_selected_rows()
Expand Down
Loading
Loading