opensanctions / opensanctions/opensanctions
[us_state_terrorist_orgs] name framework migration
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 810
- Forks
- 187
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 133
Description
us_state_terrorist_orgs splits one name string into name/former-name/alias with regex and a lookup fallback instead of using the name-cleaning framework (h.review_names / h.apply_reviewed_name_string).
Crawler: datasets/us/state_terrorist_orgs/crawler.py
Ad-hoc logic to retire (~25 lines):
NORMAL_CASE_RE—crawler.py:6split_clean_namereturning(name, former, alias)by splitting on parentheses, with lookup fallback —crawler.py:11-35, applied at49-54
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_rulesinus_state_terrorist_orgs.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
Start with zavod/docs/extract/names.md, then inspect datasets/us/state_terrorist_orgs/crawler.py and us_state_terrorist_orgs.yml. Run the crawler to establish its current output, review the existing name-cleaning helpers, and identify any alias markers needing names.schema_rules reject_strings. Done means the accumulated reviews are complete, output remains unchanged, and the custom name-splitting logic is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100