• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hhursev / recipe-scraper / 5700005664
95%
master: 52%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 29 Jul 2023 10:49AM UTC
Jobs 1
Files 257
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5700005664

push

github

web-flow
Ingredient groups (#781)

* Initial work to return grouped ingredients from a recipe.

Add ingredient_groups function to AbstractScraper. By default, this returns a list containing a single IngredientGroup object, with purpose set to None and ingredients set to self.ingredients(). This function can be overridden in site specific classes derived from AbstractScraper to return the ingredient grouped according to the recipe.

Add _grouping_utils.py which contains some helper functions for grouping ingredients. This is where the IngredientGroup dataclass is defined. This also includes a helper function that will group the ingredients for a recipe if the CSS selectors for the group heading and group elements are provided.

* Update NIHHealthyEating scraper to use definition of IngredientGroup from _grouping_utils.py.
Update PickUpLimes scraper to use group_ingredients helper function to return grouped ingredients.

* Update PickUpLimes test to test ingredient groups.
Update test_utils to fix test now there is a new class function.

* Correctly serialise IngredientGroup dataclass into a dict when classing the .to_json() method on a scraper object.

* Modify bbcgoodfood, budgetbytes and rainbowplantlife scrapers to support reutrning grouped ingredients.
Update existing tests and add new tests to cover recipes with and without grouped ingredients.

* Add tests for _grouping_utils helper functions.

* Add ingredient_groups() function to list in README

* Add type hint to ingredient_group function of AbstractScraper

* Replace test recipe for PickUpLimes scraper.
The previous test recipe was missing ingredients from the ld+json which was making the new .ingredient_groups() inconsistent with .ingredients()

* Add test_consistent_ingredient_lists test to ScraperTest base class. This test checks that the ingredients in the list of grouped ingredients are the same as the ingredients returned from .ingredients(). This test is inherited by a... (continued)

1494 of 1621 branches covered (92.17%)

53 of 53 new or added lines in 7 files covered. (100.0%)

6866 of 7109 relevant lines covered (96.58%)

0.97 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5700005664.1 29 Jul 2023 10:49AM UTC 0
96.58
Source Files on build 5700005664
Detailed source file information is not available for this build.
  • Back to Repo
  • ef5c2cb9 on github
  • Prev Build on main (#5662075086)
  • Next Build on main (#5702570632)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc