diff --git a/materials/make_pizzas_ruff_demo.py b/materials/make_pizzas_ruff_demo.py index dd21416..240bb68 100644 --- a/materials/make_pizzas_ruff_demo.py +++ b/materials/make_pizzas_ruff_demo.py @@ -1,18 +1,15 @@ -import numpy as np from italianfood.dough import PizzaDough from italianfood.ovens import bake_pizza - -pizzaName = "Hello pizza" - - +import numpy as np +import time +pizzaName='Hello pizza' class Pizza: dough: PizzaDough num_pizzas: int = 1 is_ready: bool = False some_array: np.ndarray | None = None - def __init__(self, dough, num_pizza_balls): if num_pizza_balls < 1: raise ValueError("Number of pizza balls must be at least 1.") @@ -27,40 +24,35 @@ class Pizza: ) print("Now imagine expert pizza tossing skills!\n...") - return self + + + + + return self def add_toppings(self, toppings): self.toppings = toppings print(f"Adding {self.toppings} to pizza(s).\n...") return self + + def make_margherita_pizza(num_pizzas: int = 1): - total_flour_weight = 180 * num_pizzas - total_water_weight = 126 * num_pizzas - total_salt_weight = 2 * num_pizzas - total_yeast_weight = 1 * num_pizzas - - dough = PizzaDough( - flour_weight=total_flour_weight, - water_weight=total_water_weight, - salt_weight=total_salt_weight, - yeast_weight=total_yeast_weight, - ) - + total_flour_weight=180* num_pizzas + total_water_weight= 126 *num_pizzas + total_salt_weight = 2*num_pizzas + total_yeast_weight =1 *num_pizzas + dough = PizzaDough(flour_weight=total_flour_weight,water_weight=total_water_weight,salt_weight=total_salt_weight,yeast_weight=total_yeast_weight) toppings = ["tomato sauce", "mozzarella cheese", "fresh basil"] - pizza = Pizza(dough=dough, num_pizza_balls=num_pizzas) - pizza.add_toppings(toppings) + pizza = Pizza(dough=dough, + num_pizza_balls=num_pizzas) + pizza.add_toppings(toppings) baked_pizza = bake_pizza(pizza) + + + return baked_pizza - - -import pandas - -df = pandas.DataFrame( - {"col_a": [i for i in range(20)], "col_b": [j for j in range(20, 40)]} -) -df.drop(columns="col_b", inplace=True)