Skip to content

ci: send the commit message and a data summary to wikitermbase - #59

Merged
forzagreen merged 1 commit into
mainfrom
ci/informative-wikitermbase-pr
Oct 6, 2026
Merged

forzagreen merged 1 commit into
mainfrom
ci/informative-wikitermbase-pr

Conversation

@forzagreen

Copy link
Copy Markdown
Owner

The pull request that wikitermbase opens after a dump change (e.g. forzagreen/wikitermbase#110) only carries the arabterm commit SHA, so it does not say what it is for. This sends it what it needs; forzagreen/wikitermbase#111 is the receiving side.

What changes

  • arabterm/scripts/summarize_changes.py (new, stdlib-only like validate_db.py): compares two versions of arabterm.db and writes a Markdown summary — dictionaries added / removed / changed, terms added / removed / modified per dictionary, the columns that were modified, and the first 20 terms of each kind. Timestamps and nbr_entries are ignored. A term moved to another dictionary counts as removed from the first and added to the second.
  • notify-wikitermbase.yml: unpacks arabterm.db.gz as it was before the push and as it is now, runs the script, and adds message (the head commit message) and summary to the repository_dispatch payload next to arabterm_sha. The summary is also written to the job summary.
  • CLAUDE.md and README.md describe it.

The summary step is continue-on-error: if it fails, the dispatch is still sent, without a summary.

Example

For #58 the summary is:

Data changes

  • Dictionaries: 85 → 86 (+1)
  • Terms: 509871 → 509973 (+102)

Dictionaries added (1)

  • aala_interdisciplinary_linguistics · Dictionary of Interdisciplinary Terms: Linguistics (AALA, 2026) · معجم المصطلحات البينية: مجال اللسانيات (المجمع الجزائري، 2026) · Q141645945 · 102 terms

and for #56 it names the dictionary and shows the term: arabic: تسمم ةكحو لي → تسمم كحولي.

Notes

  • The squash-merge message of a data PR becomes the title and description of the wikitermbase PR.
  • The summary describes this repository's push. If an earlier refresh PR is still open in wikitermbase, the diff of the new one also contains that earlier change.
  • Either side can be merged first: the current wikitermbase workflow ignores the extra payload fields.

Testing

The script was run on four past changes: #58 (new dictionary), #56 (one term fixed), #51 (page numbers of energy_terms) and #50 (the linguistics split). The dispatch step was run locally with gh stubbed, to check the payload. The workflow itself has not run on GitHub Actions: it only fires on a push to main that changes the MariaDB dump, so the first real run is the next data merge.

The pull request that wikitermbase opens after a dump change only carried
the arabterm commit SHA, so it did not say what it was for.

The dispatch now also carries the message of the head commit and a Markdown
summary of the data changes, produced by the new
arabterm/scripts/summarize_changes.py: it compares arabterm.db.gz before and
after the push and reports the dictionaries added, removed or changed, and the
terms added, removed or modified per dictionary.

The summary step is best effort: the dispatch is sent even if it fails.
@forzagreen
forzagreen merged commit 7cf7d76 into main Oct 6, 2026
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.

1 participant