Skip to content

Sync addons-source@maintenance/gramps60 with upstream (2026-06-30)#58

Open
eduralph wants to merge 29 commits into
maintenance/gramps60from
sync/upstream-maintenance-gramps60-auto
Open

Sync addons-source@maintenance/gramps60 with upstream (2026-06-30)#58
eduralph wants to merge 29 commits into
maintenance/gramps60from
sync/upstream-maintenance-gramps60-auto

Conversation

@eduralph

Copy link
Copy Markdown
Owner

Automated nightly sync from gramps-project/addons-source@maintenance/gramps60. Generated by .github/workflows/upstream-sync.yml on the testbed.

eduralph and others added 3 commits June 29, 2026 10:18
In both make.py and setup.py, the function extracting addon translation
languages contained dead code: a fixed-width slice assignment that
immediately gets overwritten. The `locale = po[length-11:length-9]`
statement (make.py:165, setup.py:787) extracts only 2 characters, which
would mangle locales like `pt_BR` or `zh_CN`. However, the very next
line (make.py:166, setup.py:788) overwrites `locale` using `po.rsplit()`,
and the derived locale (make.py:167, setup.py:789) strips only the suffix
`-local.po`, yielding the full code for any length. The slice never
reaches any output; removing it clarifies the code path without changing
behavior, confirmed by end-to-end testing with multi-char locales.

Fixes #7344

Signed-off-by: Eduard Ralph <eduard@ralphovi.net>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ac51fa96e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

r'(?P<nad>SE/\w+/\d+/[^,]+)\s*'
r'\((?P<years>\d{4}(?:-\d{4})?)\),\s*'
r'bildid[^_]*_(?P<bildid>\d+)'
r'(?P<nad>[^\(]+)*'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require a NAD before accepting Riksarkivet input

With the new * quantifier, a Riksarkivet-like string that omits the NAD, such as Foo, Bar, (1833-1840), now matches this regex with nad set to None; the following match.group("nad").strip() then raises before the click handler's transaction try block, so the gramplet crashes instead of reporting “Could not parse the reference string.” Keep this group mandatory or explicitly reject a missing NAD before stripping it.

Useful? React with 👍 / 👎.

@eduralph eduralph force-pushed the sync/upstream-maintenance-gramps60-auto branch from 5ac51fa to edc470e Compare July 1, 2026 08:01
eduralph and others added 5 commits July 1, 2026 09:21
When the Deep Connections path search finds the active/target person,
it reports the connection path and pauses for user interaction. On
resume ("Continue"), the search was falling through and expanding the
target itself as a regular node, queuing the target's own relatives;
those relatives then re-reach the target, causing the search to
re-emit the same connection (now with the target re-entered as an
interior step). This repeat happens with every "Continue" press while
undiscovered distinct paths remain.

The fix skips the target expansion by adding a `continue` statement
after the pause/yield in the found-target branch, advancing directly
to the next queued candidate. Genuinely distinct connections already
queued before the target was first found remain reachable, preserving
all independent paths the user should see.

Verified by regression test driving the production path-search
generator on a fixture with two node-disjoint Home→target connections
plus a target child that triggered the bounce-back repeat; the test
asserts no path re-enters the target, both independent paths remain
reachable, and consecutive paths never repeat.

Fixes #10628

Signed-off-by: Eduard Ralph <eduard@ralphovi.net>
The DescendantsLines report derives the graphic's output filename
solely from its persisted "Destination" option, which retains the
previous session's value across Gramps sessions. The graphic lands on
that stale name rather than the filename chosen for the current run in
the standard report dialog's "Document Options", ignoring the user's
current selection entirely.

Extract the filename derivation into a pure helper module
(descendantslines_output.py, free of gi imports so it can be tested
headlessly) and route production through derive_output_filename, which
sources the current run's destination instead. Fall back to the
persisted option only when no current destination is given (e.g. CLI
without -O). When the derived name would equal the document's own
output path, add a -chart suffix to avoid clobbering by the
document's close().

Fixes #5965

Signed-off-by: Eduard Ralph <eduard@ralphovi.net>
@eduralph eduralph force-pushed the sync/upstream-maintenance-gramps60-auto branch 2 times, most recently from 8407e69 to f88690b Compare July 3, 2026 06:52
bryndin and others added 13 commits July 3, 2026 07:32
The Dynamic Web Report (DWR) tree SVG view rewrites hyphens inside names
to spaces — "Jan-Åke" renders as "Jan Åke" in the tree only, while every
other DWR surface (indexes, tabs, mouse-over) shows the hyphen faithfully.

The rewrite lives in dwr_svg.js:2939, where the tree-node name is split for
line-wrapping using the regex /[ \-]+/g, which treats hyphens exactly like
spaces. The fragments are then rejoined with a space (dwr_svg.js:2862),
silently converting the hyphen to a space. The Python name export path
(dynamicweb.py:1052–1055, 923–924) is faithful and is not the cause — only
the tree passes the name through this splitter.

Fix: split on spaces only (/ +/g), so hyphens become ordinary characters
inside words and render intact. A hyphenated name is no longer a multi-word
token and cannot wrap at its hyphen, but that layout nicety is explicitly
out of scope, and preserving the name character outranks an internal wrap
opportunity.

Includes a regression test (DynamicWeb/tests/test_dwr_tree_names.py) that
reads the production splitter regex live from dwr_svg.js and reproduces the
tree's same-line join logic, asserting the hyphen survives for hyphenated
names. The test fails red with the buggy regex and passes green with the fix.

Fixes #11437

Signed-off-by: Eduard Ralph <eduard@ralphovi.net>
@eduralph eduralph force-pushed the sync/upstream-maintenance-gramps60-auto branch from f88690b to 4847331 Compare July 4, 2026 06:38
@eduralph eduralph force-pushed the sync/upstream-maintenance-gramps60-auto branch from 4847331 to 73bfa58 Compare July 5, 2026 06:58
azrdev and others added 2 commits July 5, 2026 15:46
* first working version of excludesubtree person filter

* Add boolean option to include the matched persons themselves

* fix d63958f exception upon filter building

>  File "/usr/lib/python3/dist-packages/gramps/gui/editors/filtereditor.py", line 594, in init
> t = v1
> TypeError: init() missing 2 required positional arguments: 'uistate' and 'track'

* fix #1  proper implementation of boolean filter parameter

* add debug logging, slightly optimize runtime

* gramps 6.0 compat: rename function apply -> apply_to_one

* chore: rename filter result to self.selected_handles as requested in PR

* fix issues noted by review in PR gramps-project#933

2. Missing type imports
3. Mutable class-level attribute
4. reset() never tears down the sub-filter
5. Potential AttributeError when Gramps ID is not found
6. Progress counter can exceed its declared total
7. Name/description mismatch between gpr.py and the class
8. Both .py files are missing the required GPL-2.0-or-later license header block.
9. Import sections need the standard comment headers
10. Each class needs a navigation header comment:
11. The ExcludeSubtree class has no docstring.
12. set([]) → set().

(14) get_relatives yields None handles (missing father/mother); filtering inside the generator rather than at the call site would be cleaner.

* feat: pass "include matched" param as enum to avoid GUI imports

Instead of adding a checkbox-widget for the boolean parameter, avoid
GUI code in this non-GUI addon by receiving a generic string and using
empty/false as "include" and any other content (e.g. "exclude") as true

* chore: run `black` formatter

* fix: copy gettext(translation) boilerplate from howto; bump plugin version

* fix type annotations & possible AttributeError on None

* fix: add `from __future__ import annotations` for backward compatibility

* fix: guard log.debug statements to only evaluate when logging enabled

* feat: remove "include_stopfilter_matches:bool", default to "exclude"

stringly-typed enums / magic values are bad UX. Include can simply be
realized by adding the MatchesFilter to the containing Filter, too

* remove initialization of class variable selected_handles

"confusing" according to review.

I still think initializing the empty set is correct: should
`apply_to_one` ever be called before `prepare` this will raise an
AttributeError.
@eduralph eduralph force-pushed the sync/upstream-maintenance-gramps60-auto branch from 73bfa58 to 7bb7ae8 Compare July 6, 2026 08:08
@eduralph eduralph force-pushed the sync/upstream-maintenance-gramps60-auto branch from 7bb7ae8 to 7cd2e99 Compare July 7, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants