fix(scan): strip salutations from the owner name and add pytest job (closes #16) #26

Merged
csaeum merged 1 commit from fix/owner-salutation into main 2026-11-19 15:25:51 +00:00
Owner

Summary

  • New strip_salutation() in website_scan.py: removes leading Herr/Herrn/Frau/Dr./Prof./Dipl.-Ing./Mag./Ing. (case-insensitive, whole words only, so "Herrmann" stays). Used by extract_owner_regex and extract_owner_via_ner, so both paths behave the same. A bare salutation yields an empty name.
  • First tests in tests/test_website_scan.py (16 cases, no Frappe, no network). pyproject.toml sets pythonpath and testpaths for pytest.
  • New job tests in .forgejo/workflows/ci.yml (pinned pytest and requests).

Test

  • pytest: 16 passed locally, ruff check and ruff format --check clean.

🤖 Generated with Claude Code

## Summary - New `strip_salutation()` in `website_scan.py`: removes leading Herr/Herrn/Frau/Dr./Prof./Dipl.-Ing./Mag./Ing. (case-insensitive, whole words only, so "Herrmann" stays). Used by `extract_owner_regex` and `extract_owner_via_ner`, so both paths behave the same. A bare salutation yields an empty name. - First tests in `tests/test_website_scan.py` (16 cases, no Frappe, no network). `pyproject.toml` sets `pythonpath` and `testpaths` for pytest. - New job `tests` in `.forgejo/workflows/ci.yml` (pinned pytest and requests). ## Test - `pytest`: 16 passed locally, `ruff check` and `ruff format --check` clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(scan): strip salutations from the owner name and add pytest job (closes #16)
All checks were successful
CI / abhaengigkeiten (pull_request) Successful in 17s
CI / abhaengigkeiten-ner (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 7s
CI / tests (pull_request) Successful in 7s
CI / sicherheit (pull_request) Successful in 40s
CI / lint (push) Successful in 7s
CI / tests (push) Successful in 7s
CI / abhaengigkeiten (push) Successful in 22s
CI / abhaengigkeiten-ner (push) Successful in 25s
CI / sicherheit (push) Successful in 40s
c75d9ab8f3
Leading Herr/Frau/Dr./Prof. are cut from the owner name on both the regex
and the NER path. Adds the first tests (tests/, no Frappe needed) and a
tests job in the Forgejo CI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
csaeum merged commit a188aaaf30 into main 2026-11-19 15:25:51 +00:00
csaeum deleted branch fix/owner-salutation 2026-11-19 15:25:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Frappe-Projekte/LeadScraper-Google!26
No description provided.