Repository navigation
feat(scraper): add YAML-driven RWEB best practices analysis - #160
Merged
Merged
Conversation
Introduce a best_practices brick that evaluates a first set of RWEB rules alongside EcoIndex metrics, without changing the existing analysis contract. Co-authored-by: Cursor <cursoragent@cursor.com>
Polylith check requires projects that ship EcoindexScraper to also declare the new best_practices dependency brick. Co-authored-by: Cursor <cursoragent@cursor.com>
Path bootstrap must run before importing EcoindexScraper so local polylith bricks win over site-packages. Co-authored-by: Cursor <cursoragent@cursor.com>
Branch coverage •
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Summary
best_practicesbrick with a YAML-configured rule engine and checker registry (no JS port from GreenIT-Analysis)EcoindexScraperviabest_practices=True|Path, exposingget_best_practices()after scrape0047,0082,0042,0031) with official titles, descriptions, tiers, URLs, and fail thresholds, plus GreenIT-style warn levelsTest plan
PYTHONPATH=components:bases .venv/bin/pytest test/components/ecoindex/best_practices/ -quv run camoufox fetch(if needed)uv run development/best_practices_scraper.pyand check EcoIndex + RWEB rule statusesEcoindexScraper(url=...).get_page_analysis()still works withbest_practicesdisabled (default)Made with Cursor