Repository navigation
ci: send the commit message and a data summary to wikitermbase - #59
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 likevalidate_db.py): compares two versions ofarabterm.dband 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 andnbr_entriesare ignored. A term moved to another dictionary counts as removed from the first and added to the second.notify-wikitermbase.yml: unpacksarabterm.db.gzas it was before the push and as it is now, runs the script, and addsmessage(the head commit message) andsummaryto therepository_dispatchpayload next toarabterm_sha. The summary is also written to the job summary.CLAUDE.mdandREADME.mddescribe 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:
and for #56 it names the dictionary and shows the term:
arabic: تسمم ةكحو لي → تسمم كحولي.Notes
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 withghstubbed, to check the payload. The workflow itself has not run on GitHub Actions: it only fires on a push tomainthat changes the MariaDB dump, so the first real run is the next data merge.