Skip to content

Add Syndicat Emeraude (France-95) source#6775

Open
NightFlowed wants to merge 2 commits into
mampfes:masterfrom
NightFlowed:adding_syndicat_emeraude_fr
Open

Add Syndicat Emeraude (France-95) source#6775
NightFlowed wants to merge 2 commits into
mampfes:masterfrom
NightFlowed:adding_syndicat_emeraude_fr

Conversation

@NightFlowed

Copy link
Copy Markdown

Summary

Add Syndicat Emeraude (French) source

  • Add rule-based source for Syndicat Emeraude (Val-d'Oise)
  • Support all 17 communes and their available sectors
  • Add automatic test cases for every commune/sector combination
  • Include source owner

Type of change

  • New source
  • Bug fix / source fix
  • Documentation update
  • Other

Checklist

  • python -m pytest tests/test_source_components.py -q passes
  • ruff check --fix and ruff format run on changed source files
  • No generated files in diff (README.md, info.md, sources.json, translations/*.json — CI regenerates these post-merge)
  • doc/source/syndicat_emeraude_fr.md created for new sources
  • TEST_CASES use real, publicly accessible addresses (not my own)

@bbr111 bbr111 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the detailed work here — the rule engine and per-commune tables are clearly a lot of effort, and the doc + full TEST_CASES coverage are appreciated.

Unfortunately I can't merge this in its current form. The source doesn't fetch any live data: fetch() generates all dates from the hardcoded RULES tables, and DATA_URL is never actually requested. The project doesn't accept hardcoded schedules (see the "What NOT to do" section of CONTRIBUTING) — sources must pull from a live API, ICS feed, or webpage. The concern is real-world drift: as soon as the syndicate shifts a round for a holiday or changes the seasonal green-waste window, a static table is silently wrong with no way to self-correct.

Could you look at whether https://www.syndicat-emeraude.fr/collecte exposes the schedule data dynamically (an API/JSON/ICS endpoint, or HTML that can be parsed per commune/sector)? A quick check shows the page returns 403 to a plain request, so you'll likely need curl_cffi with impersonate="chrome" (see east_renfrewshire_gov_uk.py / south_ayrshire_gov_uk.py for the Cloudflare pattern). If the underlying data endpoint can be found and consumed at fetch time, I'd be happy to re-review.

Everything else — structure, COUNTRY, icons enum, translations, doc file, lint — looks good, so once the data is fetched live this should be close.

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