diff --git a/src/recipe_graph/scrape.py b/src/recipe_graph/scrape.py index 9effc40..0f55473 100644 --- a/src/recipe_graph/scrape.py +++ b/src/recipe_graph/scrape.py @@ -64,7 +64,9 @@ def parse_ingredient( return [text.strip() if text else None for text in m.groups()] -def get_missing_ingredients(session): +# this code is unused +# TODO: add tests when this is used +def missing_ingredients_query(session): cte = ( except_(select(db.RecipeIngredient.id), select(db.RecipeIngredientParts.id)) ).alias("missing") @@ -73,8 +75,10 @@ def get_missing_ingredients(session): ) return missing -def reparse_ingredients(session): - missing = get_missing_ingredients(session) +# this code is unused +# TODO: add tests when this is used +def parse_missing_ingredients(session): + missing = missing_ingredients_query(session) for ingredient in missing: parts = ingredient_to_parts(ingredient) session.add(parts)