Repository navigation
Conversation
Walks the public A-Z Personensuche listing, fetches full contact details per person, and writes the result to a JSON file for later use by MCP tools. Scheduling is left to an external cron/systemd timer (mcp-uos-scrape-people).
Print an updated count after every person's detail fetch within the current letter (e.g. "B: 12/145 people details fetched"), so it's possible to tell how far through a letter the scraper is instead of just a global every-100 counter. Drop that old counter since it's now redundant.
uos_people_search now answers entirely from the JSON file produced by mcp-uos-scrape-people, returning full contact details inline instead of just name/details_url. This removes the need for a live per-person lookup, so uos_person_details is dropped along with the now-unused UOSWebsiteClient.people_search(). The snapshot is loaded once at startup (a missing/unreadable file is a fatal startup error) and can be refreshed without a restart via SIGHUP, which reloads in place and falls back to the last-known-good data on failure.
Importing mcpuos loads the people directory JSON at import time, so pytest collection (and CI) crashed with FileNotFoundError whenever ./data/people.json didn't exist. Point UOS_MCP_PEOPLE_DATA_PATH at a committed fixture in tests/conftest.py before any test module imports the package, and reuse that fixture for the MCP server integration tests instead of generating one in tmp_path. The import-time load also means mcp-uos-scrape-people can't run on a fresh install until a snapshot exists; document a one-line stub workaround in the README.
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.
Walks the public A-Z Personensuche listing, fetches full contact details per person, and writes the result to a JSON file for later use by MCP tools. Scheduling is left to an external cron/systemd timer (mcp-uos-scrape-people).