opensanctions / opensanctions/opensanctions
[in_mha_banned] name framework migration
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 810
- Forks
- 187
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 133
Description
in_mha_banned extracts aliases and acronyms from combined name strings with hand-rolled regex and keyword sets instead of the name-cleaning framework (h.review_names / h.apply_reviewed_name_string).
Crawler: datasets/in/mha_banned/crawler.py
Ad-hoc logic to retire (~45 lines):
REGEX_ACRONYM_PARENSpulling acronym-in-parens intoalias—crawler.py:15COMPLEX_TERMSkeyword set gating a lookup —crawler.py:18-30- splitting
names_stringon;@for aliases +parse_names—crawler.py:45-58,178-184
Migration (sanctions crawler — 3 steps):
- Mirror the existing cleaned names into a
suggestedh.Names()and callh.review_names(..., default_accepted=True). Output unchanged while reviews accumulate; deploy step 3 ASAP afterwards. - Complete the accumulated name reviews for this dataset.
- Replace the custom logic with
h.apply_reviewed_names/h.apply_reviewed_name_stringand delete it. Add any custom alias-marker phrases not covered byrigour.names.name_split_phrases_list()asreject_stringsundernames.schema_rulesinin_mha_banned.yml.
Migration guide: zavod/docs/extract/names.md (section "Migrating to the name cleaning helpers").
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read zavod/docs/extract/names.md, especially the migration section, then inspect datasets/in/mha_banned/crawler.py and datasets/in/mha_banned/in_mha_banned.yml. Trace the existing name handling and review workflow before migrating the dataset and completing its accumulated reviews. Done means the custom extraction logic is removed, schema reject strings cover any missing phrases, and output remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100