Skip to content

feat: Add Charity Commission API scraper and unit tests#71

Merged
lauxenz merged 4 commits into
devfrom
67-add-register-of-charities-api
Jul 10, 2026
Merged

feat: Add Charity Commission API scraper and unit tests#71
lauxenz merged 4 commits into
devfrom
67-add-register-of-charities-api

Conversation

@lauxenz

@lauxenz lauxenz commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new scraper module for the Charity Commission for England and Wales “Register of Charities” API, including a small client wrapper, a higher-level scrape() orchestrator, and corresponding unit tests, plus an example raw output JSON.

Changes:

  • Introduce CharityCommissionAPI with retry/backoff, API key handling, and endpoint helpers for common charity detail endpoints.
  • Add unit tests covering happy-path responses, 404 handling, and end-to-end scrape() behavior with mocks.
  • Add a checked-in sample register_of_charities_results.json output file under src/data/raw.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/scrapers/register_of_charities.py New Charity Commission API client + scraping orchestration + CLI entrypoint.
src/tests/test_register_of_charities.py Unit tests for the new scraper/client behaviors using mocked HTTP calls.
src/data/raw/register_of_charities_results.json Example raw output produced by the new scraper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/scrapers/register_of_charities.py Outdated
Comment thread src/scrapers/register_of_charities.py Outdated
Comment thread src/tests/test_register_of_charities.py
lauxenz and others added 3 commits July 10, 2026 19:45
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lauxenz lauxenz merged commit 50d8bd3 into dev Jul 10, 2026
1 check failed
@lauxenz lauxenz deleted the 67-add-register-of-charities-api branch July 11, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants