diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba4202c..d153ffb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,7 @@ repos: rev: 5.12.0 hooks: - id: isort + args: ["--profile", "black"] exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*|.rst|.md|cm/__init__.py|sunpy/extern|docs/conf.py)$" - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/README.rst b/README.rst index e90fe8f..7cfbf49 100644 --- a/README.rst +++ b/README.rst @@ -20,6 +20,7 @@ To get started, run the following (for a full breakdown, see `/docker/README.rst curl -X 'GET' 'http://localhost:8000/order' -H 'accept: application/json' {"orders":[]} # empty because the DB is empty +The SQlite DB can be found at `/data/orders.db`, and can easily viewed through a GUI, e.g. https://sqlitebrowser.org/dl/ Developing ========== diff --git a/data/ingredients.csv b/data/ingredients.csv new file mode 100644 index 0000000..b9b94dc --- /dev/null +++ b/data/ingredients.csv @@ -0,0 +1,481 @@ +ingredient_id,name,unit,cost +1,Yoghurt,deciliter,3.03 +2,Arugula,deciliter,3.77 +3,Gula Melaka,deciliter,0.53 +4,Mahlab,centiliter,2.99 +5,Parmesan Cheese,milliliter,2.25 +6,Barberry,centiliter,2.35 +7,Juniper Berries,centiliter,3.6 +8,Lettuce,liter,2.96 +9,Fingerlime,centiliter,3.51 +10,Watermelon,liter,0.84 +11,Dashi,centiliter,0.72 +12,Rockmelon,centiliter,0.89 +13,Green Tea Noodles,centiliter,4 +14,Nashi Pear,liter,2.87 +15,Eggs,deciliter,1.95 +16,Corn Oil,milliliter,0.63 +17,Cranberry,milliliter,1.71 +18,Farmed Prawns,deciliter,3.52 +19,Apple Juice Concentrate,liter,2.93 +20,Pine Nut,liter,3.09 +21,Chia Seeds,deciliter,3.7 +22,Kiwi Fruit,liter,0.8 +23,Turkey,liter,0.05 +24,Chickpea,deciliter,3.02 +25,Sesame Seeds,deciliter,0.57 +26,Cannellini Beans,deciliter,1.94 +27,Kumera,centiliter,3.79 +28,Dried Chinese Broccoli,milliliter,0.98 +29,Tinned,centiliter,3.26 +30,Kidneys,liter,2.37 +31,Broccoli,liter,2.11 +32,Mackerel,liter,0.95 +33,Borlotti Beans,deciliter,2.32 +34,Rhubarb,deciliter,0.29 +35,Spelt,deciliter,3.07 +36,Sunflower Seeds,deciliter,1.25 +37,Papaya,milliliter,3.7 +38,Cocoa Powder,deciliter,2.75 +39,Haloumi,deciliter,2.65 +40,Blueberries,centiliter,2.51 +41,Clams,deciliter,2.06 +42,Wholegrain Bread,milliliter,1.62 +43,Arrowroot,deciliter,4 +44,Tea Oil,deciliter,1.56 +45,Polenta,centiliter,0.11 +46,Blackberries,milliliter,3.81 +47,Kidney Beans,milliliter,3.24 +48,Cherries,liter,3.25 +49,Canola Oil,liter,3.63 +50,Pumpkin Seed,liter,2.51 +51,Kudzu,milliliter,2.74 +52,Peaches,deciliter,2.19 +53,Pork,liter,0.03 +54,Tomatoes,milliliter,2.79 +55,Hijiki,milliliter,3.63 +56,Ham,milliliter,0.17 +57,Lime Leaves,deciliter,2.91 +58,Brown Rice,milliliter,1.2 +59,Rice Paper,centiliter,0.65 +60,Plums,deciliter,2.9 +61,Salmon,centiliter,2.55 +62,Fruit,deciliter,0.62 +63,Scallops,centiliter,2 +64,Goat Cheese,liter,1.33 +65,Berries,deciliter,2.07 +66,Apples,centiliter,1.06 +67,Shiitake Mushrooms,deciliter,0.16 +68,Vanilla Beans,centiliter,3.62 +69,Safflower Oil,liter,0.34 +70,Buckwheat Noodles,centiliter,3.99 +71,Apple Juice,milliliter,0.68 +72,Honey,milliliter,2.07 +73,Olive Oil,centiliter,0.93 +74,Paprik,centiliter,2.87 +75,Wakame,deciliter,2.07 +76,Peppermint,milliliter,2.46 +77,Trout,milliliter,0.36 +78,Annatto Seed,centiliter,2.8 +79,Rye,liter,1.28 +80,Cavalo,liter,0.58 +81,Besan,milliliter,0.93 +82,Pears,milliliter,2.17 +83,Squash,centiliter,3.4 +84,Star Anise,milliliter,3.46 +85,Butternut Lettuce,milliliter,3.04 +86,Fennel Seeds,milliliter,3.23 +87,Malt Vinegar,liter,0.05 +88,Brazil Nut,centiliter,3.49 +89,Soy Beans,centiliter,1.2 +90,Rye Bread,milliliter,0.04 +91,Ricotta,deciliter,3.2 +92,Cassia bark,centiliter,2.61 +93,Galangal,milliliter,0.17 +94,Loquats,centiliter,2.8 +95,Hokkien Noodles,centiliter,1.12 +96,Brie,deciliter,3 +97,Cos Lettuce,milliliter,3.84 +98,Corella Pear,milliliter,2.58 +99,Pepitas,deciliter,1.93 +100,Apple Cider Vinegar,centiliter,2.82 +101,Tom Yum,milliliter,1.25 +102,Arborio Rice,milliliter,0.67 +103,Hazelnut,liter,2.71 +104,Raspberry,centiliter,2.19 +105,Eggplant,centiliter,1.01 +106,Onion,milliliter,3.03 +107,Pinto Beans,deciliter,3.79 +108,Mastic,centiliter,3.74 +109,Nutritional Yeast,milliliter,3.33 +110,Tapioca,milliliter,1.35 +111,English Spinach,centiliter,3.19 +112,Pear Juice,milliliter,2.88 +113,Oranges,deciliter,3.83 +114,Watercress,liter,1.74 +115,Mint,liter,3.32 +116,Kenchur,centiliter,1 +117,Yogurt,liter,2.03 +118,Red Wine,milliliter,2.44 +119,Molasses,liter,2.12 +120,Omega Spread,milliliter,2.53 +121,Alfalfa,liter,3.94 +122,Dark Chocolate,liter,2.6 +123,Gruyere,deciliter,3.6 +124,Soy Milk,milliliter,1.24 +125,Red Cabbage,milliliter,1.72 +126,Oyster Sauce,liter,2.57 +127,Bulghur,deciliter,0.33 +128,Cardamom,deciliter,3.25 +129,Mullet,centiliter,1.29 +130,Star Fruit,centiliter,0.78 +131,Mussels,milliliter,1.62 +132,Milk Chocolate,liter,0.15 +133,Squid,liter,2.19 +134,Cucumber,centiliter,0.11 +135,Rice Noodles,liter,0.15 +136,Blue Swimmer Crab,milliliter,2.32 +137,Pasta,centiliter,1.38 +138,Currants,milliliter,1.53 +139,Balsamic Vinegar,milliliter,2.76 +140,Bamboo Shoots,centiliter,0.66 +141,Common Cultivated Mushrooms,deciliter,2.51 +142,Oyster Mushrooms,deciliter,3.63 +143,Flaxseed Oil,centiliter,0.91 +144,Taleggio Cheese,deciliter,2.73 +145,Garlic,liter,0.85 +146,Cashews,centiliter,3.85 +147,Shark,liter,2.54 +148,Red Wine Vinegar,deciliter,2.63 +149,Fish Stock,deciliter,1.44 +150,Soy,liter,1.37 +151,Yellowtail Kingfish,centiliter,2.58 +152,Cous Cous,milliliter,2.49 +153,Blue Eye Trevalla,centiliter,1.77 +154,Camomile,milliliter,3.5 +155,Vegetable Spaghetti,deciliter,0.86 +156,Sweet Potato,deciliter,0.26 +157,Peppers,milliliter,3.84 +158,Licorice,milliliter,2.33 +159,Blue Cheese,milliliter,1.26 +160,Snapper,milliliter,0.85 +161,Persimmon,deciliter,2.72 +162,Flour,milliliter,1.59 +163,Black Eyed Beans,liter,0.15 +164,Quinoa,milliliter,0.06 +165,Sprouts,deciliter,3.63 +166,Guava,centiliter,3.68 +167,Brown Flour,milliliter,3.4 +168,Basil Basmati Rice,liter,1.84 +169,Buckwheat,centiliter,3.04 +170,Lentils,centiliter,2.39 +171,Turnips,milliliter,2.24 +172,Dried Apricots,centiliter,2.18 +173,Cottage Cheese,deciliter,0.68 +174,Parsley,centiliter,3.1 +175,Smoked Trout,milliliter,1.05 +176,Provolone,deciliter,3.97 +177,Lychees,liter,3 +178,Allspice,milliliter,1.17 +179,Wasabi,centiliter,1.25 +180,Jicama,liter,3.01 +181,Brussels Sprouts,centiliter,0.34 +182,Mung Beans,liter,0.39 +183,Barley,centiliter,3.25 +184,Tangelo,centiliter,1.19 +185,Fromage Blanc,deciliter,2.36 +186,Mountain Bread,deciliter,3.89 +187,Thyme,centiliter,3.85 +188,Wholewheat Flour,deciliter,0.8 +189,Capers,liter,2.2 +190,Longan,deciliter,1.82 +191,Purple Rice,liter,1.22 +192,Whiting Wild Rice,milliliter,1.36 +193,Kale,milliliter,3.66 +194,Sardines,deciliter,2.23 +195,Feijoa,centiliter,3.67 +196,Tahini,centiliter,1.12 +197,Mango,centiliter,1 +198,Tamari,milliliter,2.66 +199,Amaranth,milliliter,1.9 +200,Goat Milk,liter,1.01 +201,Macadamia Nut,deciliter,3.95 +202,Slivered Almonds,deciliter,3.43 +203,Red Pepper,milliliter,1.18 +204,Oats,milliliter,2.76 +205,Cloves,liter,1.05 +206,Coconut Water,milliliter,3.23 +207,Bran,liter,3.1 +208,Cayenne,milliliter,0.19 +209,Almond Oil,liter,0.43 +210,Okra,liter,2.02 +211,Oregano,deciliter,3.11 +212,Maple Syrup,liter,0.84 +213,Bonito Flakes,milliliter,2.59 +214,Vegetable Oil,deciliter,0.93 +215,White Bread,milliliter,0.93 +216,Aubergine,deciliter,1.44 +217,Albacore Tuna,liter,0.57 +218,Chilli Pepper,milliliter,3.58 +219,Cornmeal,centiliter,0.45 +220,Soy Flour,liter,0.43 +221,Carrot,centiliter,2.28 +222,Cacao,deciliter,0.94 +223,Amchur,liter,3.02 +224,Marigold,centiliter,0.7 +225,Tea,deciliter,0.68 +226,Cake,deciliter,3.02 +227,Coffee,liter,1.72 +228,Rosemary,milliliter,2.12 +229,Radicchio,liter,0.79 +230,Kohlrabi,centiliter,0.82 +231,Melon,liter,1.15 +232,Mace,centiliter,0.31 +233,Rice Syrup,deciliter,2.57 +234,Mahi Mahi,milliliter,0.08 +235,Chestnut,centiliter,3.49 +236,Flounder,milliliter,0.26 +237,Cheddar,milliliter,3.62 +238,Baking Soda,deciliter,0.77 +239,Bok Choy,liter,0.02 +240,Tarragon,milliliter,1.11 +241,Asian Greens,centiliter,1.87 +242,Choy Sum,deciliter,3.33 +243,Limes,liter,2.81 +244,Tempeh,liter,1.59 +245,Chickory,deciliter,1.73 +246,Walnut,liter,1.42 +247,Purple Carrot,centiliter,2.79 +248,Parrotfish,centiliter,2.33 +249,Dates,deciliter,2.37 +250,Potato Flour,milliliter,1.1 +251,Elderberry,liter,1.61 +252,Hummus,liter,3.64 +253,Kecap Manis,centiliter,1.23 +254,Dill,deciliter,1.42 +255,Marjoram,liter,3.42 +256,Radish,deciliter,2.24 +257,Pistachio Nut,deciliter,2.93 +258,Hiramasa Kingfish,centiliter,2.11 +259,Vermicelli Noodles,liter,3.77 +260,Saffron,deciliter,2.13 +261,Green Pepper,liter,2.39 +262,Tapioca Flour,milliliter,2.48 +263,Lobster,deciliter,1.45 +264,Sesame Oil,liter,0.91 +265,Asparagus,milliliter,1.73 +266,Vegetable Stock,milliliter,0.8 +267,Coriander Seed,liter,2.15 +268,Jewfish,centiliter,0.92 +269,Fresh Chillies,liter,1.77 +270,Adzuki Beans,centiliter,1.71 +271,Curry Leaves,milliliter,0.09 +272,Bean Shoots,deciliter,3.49 +273,Feta,centiliter,3.17 +274,Cauliflower,liter,0.14 +275,Nectarines,deciliter,3.99 +276,Celery Seed,deciliter,2.84 +277,Soymilk,centiliter,0.47 +278,Bacon,deciliter,0.27 +279,Chicken Stock,centiliter,0.16 +280,Honeydew Melon,deciliter,2.57 +281,Avocado Spread,deciliter,2.89 +282,Camellia Tea Oil,liter,1.45 +283,Lemongrass,deciliter,2.58 +284,Cream Cheese,liter,1.56 +285,File Powder,centiliter,0.1 +286,Red Lentils,deciliter,2.16 +287,Cinnamon,liter,2.54 +288,Fish Sauce,centiliter,2.78 +289,Muesli,centiliter,0.79 +290,Pear,milliliter,1.91 +291,Kokam,liter,2.15 +292,Aniseed,milliliter,2.26 +293,Grape Seed Oil,liter,0.92 +294,Garam Masala,deciliter,3.24 +295,Edam,liter,3.39 +296,Artichoke,centiliter,0.23 +297,Rice Flour,centiliter,2.78 +298,Barramundi,centiliter,2.54 +299,Flat Mushrooms,centiliter,1.95 +300,Mustard,milliliter,2.75 +301,Crabs,liter,2.88 +302,Almonds,liter,1.13 +303,Brown Mushrooms,milliliter,1.63 +304,Cumin,deciliter,0.36 +305,Chives,liter,1.42 +306,Mustard Seed,deciliter,2.77 +307,Oat Flour,deciliter,1.4 +308,Water,milliliter,0.67 +309,Calamari,milliliter,3.15 +310,Endive,liter,1.54 +311,Jarrahdale Pumpkin,milliliter,1.24 +312,Pineapple,centiliter,0.57 +313,Monkfish,milliliter,3.6 +314,Jasmine Rice,deciliter,2.69 +315,Celery,liter,1.22 +316,Horseradish,milliliter,2.86 +317,Leeks,deciliter,1.06 +318,Enoki Mushrooms,milliliter,1.42 +319,Edamame,milliliter,2.11 +320,William Pear,liter,3.91 +321,Porcini Mushrooms,centiliter,0.54 +322,Liver,centiliter,3.34 +323,Dragonfruit,deciliter,2.76 +324,Chicken,liter,2.29 +325,Turmeric,deciliter,0.66 +326,Avocado Oil,centiliter,0.43 +327,Sultanas,centiliter,3.55 +328,Rose Water,milliliter,3.67 +329,Mandarins,liter,1.85 +330,Spelt Bread,milliliter,3.98 +331,Unbleached Flour,liter,1.95 +332,Wheat,deciliter,3.13 +333,Bay Leaves,centiliter,3.64 +334,Sun-Dried Tomatoes,centiliter,2.58 +335,Brown Rice Vinegar,milliliter,1.98 +336,Figs,deciliter,3.12 +337,Ajowan Seed,liter,0.06 +338,Camembert,centiliter,1.91 +339,Yellow Papaw,centiliter,1.12 +340,White rice,centiliter,1.44 +341,Yeast,deciliter,0.5 +342,Flaxseed,milliliter,2.49 +343,Greenwheat Freekeh,centiliter,0.7 +344,Baking Powder,deciliter,1.44 +345,Blood Oranges,milliliter,3.64 +346,Pumpkin,liter,1.77 +347,Passionfruit,milliliter,3.97 +348,Extra Virgin Olive Oil,deciliter,2.18 +349,Banana,liter,1.07 +350,Kombu,liter,0.18 +351,Kiwi Berries,liter,0.86 +352,Cantaloupe,liter,2.44 +353,Butter Beans,liter,1.3 +354,Jelly,liter,1.65 +355,Coconut,liter,1.22 +356,Incaberries,deciliter,0.8 +357,Snowpeas,milliliter,3.79 +358,Buckwheat Flour,centiliter,3.05 +359,Corn Syrup,milliliter,3.75 +360,Tabasco,deciliter,1.19 +361,Swiss Chard,deciliter,3.83 +362,Avocado,milliliter,3.82 +363,Margarine,centiliter,3.7 +364,Asian Noodles,centiliter,1.2 +365,Swordfish,deciliter,0.86 +366,Bocconcini,centiliter,2.12 +367,Beef Stock,milliliter,1.3 +368,Caraway Seed,milliliter,1.68 +369,Semolina,liter,2.34 +370,Curry Powder,deciliter,0.11 +371,Cabbage,deciliter,3.68 +372,Zucchini,deciliter,2.07 +373,Duck,deciliter,0.83 +374,Vinegar,milliliter,3.31 +375,Wattleseed,milliliter,2.04 +376,Macadamia Oil,liter,2.94 +377,Anchovies,centiliter,3.4 +378,Tamarillo,centiliter,0.53 +379,Hot Smoked Salmon,deciliter,1.57 +380,Dandelion,milliliter,3.27 +381,Miso,milliliter,3.44 +382,Jerusalem Artichoke,liter,3.94 +383,Cream,centiliter,0.37 +384,Chinese Five Spice,deciliter,0.74 +385,Octopus,liter,0.03 +386,Agar,deciliter,2.71 +387,White Wine,deciliter,0.9 +388,Nutmeg,deciliter,3.4 +389,Poppy Seed,milliliter,2.64 +390,Apricots,liter,0.52 +391,Fennel,milliliter,3.47 +392,Sage,centiliter,2.72 +393,Peppercorns,deciliter,0.24 +394,Cumquat,milliliter,1.69 +395,Butter,liter,2.82 +396,Spinach,deciliter,2.63 +397,Nasturtium,centiliter,0.13 +398,Oatmeal,centiliter,2.06 +399,Green Beans,deciliter,3.72 +400,Flathead,liter,2.75 +401,Pecan Nut,centiliter,3.78 +402,Papaw,milliliter,0.74 +403,Raisin,liter,0.26 +404,Starfruit,milliliter,0.56 +405,Bush Tomato,milliliter,2.91 +406,Soba,milliliter,3.83 +407,Snowpea sprouts,centiliter,0.62 +408,Koshihikari Rice,centiliter,0.09 +409,Peas,milliliter,1.42 +410,Buttermilk,deciliter,2.36 +411,Lotus Root,milliliter,3.59 +412,Agave Syrup,centiliter,1.32 +413,Harissa,centiliter,1.97 +414,Sweet Chilli Sauce,deciliter,1.62 +415,Asafoetida,deciliter,2.47 +416,Fenugreek,liter,2.43 +417,Broccolini,liter,1.58 +418,Silverbeet,liter,0.72 +419,Iceberg Lettuce,liter,0.68 +420,Pomegranate,centiliter,3.57 +421,Beef,milliliter,3.69 +422,Lavender Flowers,centiliter,3.56 +423,Nuts,milliliter,1.22 +424,Nori,centiliter,0.83 +425,Cornichons,liter,1.27 +426,Olives,centiliter,1.85 +427,Corn Tortilla,deciliter,0.74 +428,Sake,liter,3.54 +429,Spring Onions,deciliter,3.98 +430,Pandanus Leaves,centiliter,3.36 +431,Wholemeal,milliliter,2.33 +432,French Eschallots,centiliter,3.02 +433,Potatoes,centiliter,0.19 +434,White Wine Vinegar,milliliter,2.61 +435,Szechuan Pepperberry,deciliter,1.75 +436,Tuna,liter,2.51 +437,Tofu,centiliter,3.73 +438,Lemon,deciliter,3.88 +439,Custard Apples,centiliter,2.03 +440,Coconut Oil,liter,1.78 +441,Green Tea,milliliter,0.98 +442,Grapefruit,milliliter,3.01 +443,Quark Quinc,deciliter,0.36 +444,Beetroot,deciliter,2.87 +445,Achacha,milliliter,2.28 +446,Sea Salt,liter,2.45 +447,Candle Nut,centiliter,2.63 +448,Stevia,deciliter,2.74 +449,Mozzarella,liter,2.77 +450,Freekeh,liter,0.27 +451,Prunes,liter,0.01 +452,Morwong,deciliter,1 +453,Haricot Beans,centiliter,0.84 +454,Ricemilk,liter,3.18 +455,Redfish,centiliter,2.12 +456,Wheatgrass Juice,liter,0.94 +457,Oysters,deciliter,2.96 +458,Warehou,centiliter,1.5 +459,Sugar,liter,3.31 +460,Peanuts,deciliter,3.26 +461,Beans,milliliter,2.73 +462,Bread,deciliter,1.27 +463,Soy Sauce,deciliter,0.49 +464,Mulberries,deciliter,1.75 +465,Chinese Cabbage,milliliter,0.71 +466,Parsnip,milliliter,0.94 +467,White Flour,milliliter,0.09 +468,Goji Berry,milliliter,0.18 +469,Bonza,milliliter,2.67 +470,Bean Sprouts,milliliter,1.29 +471,Kangaroo,centiliter,0 +472,Capsicum,liter,1.5 +473,Grapes,centiliter,1.29 +474,Sour Dough Bread,deciliter,2 +475,Coriander Leaves,milliliter,0.84 +476,Mangosteens,centiliter,0.53 +477,Butternut Pumpkin,milliliter,0.1 +478,Sausages,milliliter,1.98 +479,Carob Carrot,liter,2.9 +480,Milk,milliliter,3.25 diff --git a/data/locations.csv b/data/locations.csv new file mode 100644 index 0000000..9b4abab --- /dev/null +++ b/data/locations.csv @@ -0,0 +1,26 @@ +location_id,name,address +1,Green House,"76016 Schmidt Extensions, East Verona, DE 24796" +2,Big Pub,"3618 Clotilde Flat, Mariaton, HI 51178-2296" +3,Orange Gastropub,"Apt. 108 9319 Huels Points, East Lashaun, OR 56406" +4,Blue Plate Eatery,"Apt. 605 42768 Cummerata Points, Stevieland, DE 78828" +5,Golden Eats,"Suite 300 33716 Boehm Streets, New Terra, WV 86121" +6,Belly Burger,"Suite 881 8329 Gerhold Overpass, Arlieburgh, NH 65090" +7,Sugar Eats,"Suite 363 5005 Barbera Union, Heathcoteville, MS 01355-4415" +8,Hungry Grill,"58296 Omar Valley, Feilfort, KY 07659-2839" +9,Silver Grill & Tap,"68343 Silvia Bridge, Walkerborough, MS 06277" +10,Spice Curry,"4465 Edmond Tunnel, Myrnafurt, AR 20031-3383" +11,Golden Box,"212 Chadwick Junctions, West Mickey, OH 13767" +12,6963 Pub,"Suite 219 490 Gabriele Spurs, Florettaland, MT 91856" +13,Sweet Cafe,"Apt. 870 51865 Fahey Stream, Port Jessiborough, MA 92063" +14,Thirsty King,"Suite 579 59243 Kozey Shore, North Ruthieside, WI 92223-5630" +15,Sugar Gastropub,"Apt. 192 67071 Watsica Ports, Lake Heribertochester, MT 36439-5551" +16,Green Diner,"Apt. 986 7055 Johnston Unions, Palmerbury, MS 79270" +17,Fat Sushi,"7644 Hane Street, Glenburgh, WA 89140-4587" +18,421 BBQ,"616 Cherie Burgs, Lake Manuel, LA 81182-3222" +19,Silver Cafe,"Suite 401 9564 Robt Plaza, Caspermouth, WI 02747" +20,Green Juice Bar,"9229 Naida Square, Reichelburgh, NH 32282-7160" +21,Thirsty Diner,"95471 Lacresha Rue, South Jerrodside, TN 92154" +22,255 Gastropub,"Apt. 538 490 Madalyn Haven, Beaufort, NJ 37701" +23,Green Shakes,"Apt. 844 434 Gregory Brooks, Lake Neville, NJ 08907-7960" +24,Blue Steakhouse,"Suite 763 949 Isaias Union, Lake Danelle, OR 26274" +25,Belly Curry,"Apt. 942 576 King Brook, Hilllview, AL 12762" diff --git a/data/menus.csv b/data/menus.csv new file mode 100644 index 0000000..6429fcb --- /dev/null +++ b/data/menus.csv @@ -0,0 +1,610 @@ +recipe_id,location_id,price,modifiers +1,13,11.95,1 +1,21,9.09, +1,18,11.36,2 +1,16,5.38, +1,11,9.43, +2,18,11.43, +2,7,11.7,1 +3,11,2.32, +3,4,5.39, +3,23,9.18, +3,13,13.45, +4,15,6.19,2 +4,20,12.42,2 +5,23,13.66, +6,24,4.23,1 +6,25,6.69, +6,19,13.12, +6,13,12.9,1 +7,5,6.71,1 +7,7,10.67,2 +8,2,4.03,2 +8,20,13.42,1 +9,11,9.81,2 +9,5,9.42,1 +9,10,12.05,2 +9,9,11.42,2 +9,23,7.46, +9,20,10.03,1 +10,24,10.07, +10,19,13.95,1 +10,13,12.73,1 +10,11,10.56,1 +11,8,6.44,2 +11,18,11.6, +11,24,10.85,1 +11,14,11.73, +11,20,11.93,2 +12,13,8.58,1 +12,25,5.7, +12,20,12.67, +13,15,8.29, +13,23,4.56, +13,21,10.88,1 +13,18,8.39, +14,15,6.22,1 +14,9,10.63,1 +14,24,8.59, +15,10,11.4, +16,16,11.69,2 +16,10,4.28,2 +16,24,11.86, +16,7,8.85, +17,1,6.15,1 +17,17,9.66, +18,5,6.04, +18,24,11.58, +18,15,11, +18,23,12.05, +18,1,9.42,2 +19,7,11.28, +19,16,4.47, +19,19,8.87,1 +19,20,13.42, +20,23,10.61,2 +20,4,4.09, +20,21,6.08, +20,17,9.01, +21,10,3.07,2 +21,8,12.04, +21,16,2.63,1 +22,15,11.82, +22,18,10.11,2 +22,21,9.38, +23,17,13.2,2 +23,19,10.08, +23,20,5.17, +24,22,8.83, +24,6,9.82,2 +24,19,3.1,1 +25,15,11.34,2 +25,16,6.64, +25,1,13.4,2 +25,7,10.17, +25,13,10.13,2 +26,25,4.6, +26,23,4.08, +26,16,12.71,2 +26,5,4.11,1 +26,18,11.6,2 +27,2,4.85,1 +27,25,5.79,1 +27,4,4.21, +27,21,12.28,1 +27,11,4.33, +28,17,10.11, +28,15,4.42,2 +28,18,2.99, +28,7,11.37,2 +28,21,7.12,1 +29,13,7.32, +29,3,3.87,2 +29,14,11.41,2 +29,19,5.31, +30,15,6.37,1 +30,5,8.34,1 +30,16,12.7,2 +30,22,6.54, +31,10,2.4,2 +31,11,6.74,2 +31,1,7.75,1 +31,22,8.82,2 +32,19,12.71,1 +32,11,4,1 +33,24,10.52, +33,18,5.8,1 +33,10,13.49,1 +33,20,2.1,2 +33,16,9.24,2 +33,7,6.59,2 +34,2,9.77,2 +35,14,3.7,1 +35,7,5.27,2 +35,8,7.6,1 +35,22,11.36, +35,13,10.98, +37,23,5.49, +37,8,13.52,2 +37,12,3.96, +37,20,4.45, +38,5,8.89, +39,17,10.97, +39,13,4.16, +39,22,8.76,2 +39,24,2.27,2 +39,1,13.16,1 +40,20,2.31, +41,24,12.38, +41,3,13.77, +41,15,7.21,2 +41,16,4.19, +42,15,6.29,2 +42,21,7.7, +42,17,12.43, +43,24,5.92,2 +43,11,9.61,2 +44,2,7.16,2 +44,1,2.45,2 +44,7,6.51, +44,3,8.76,1 +44,19,11.75, +45,25,8.52, +46,20,8.26, +46,16,5.05,2 +46,13,3.46, +47,3,5.17, +47,13,11.46,2 +47,20,11.04, +47,16,4.05, +47,15,13.3,1 +47,1,5.36, +48,22,7.81, +48,23,4.46,2 +48,9,11.5,1 +49,12,12.84,1 +49,17,6.48,2 +49,16,5.08,1 +50,8,9, +50,7,5.72,1 +51,20,6.5, +51,13,5.15,1 +52,22,6.18,1 +52,7,11.08,2 +52,12,4.05, +53,17,6.01,1 +53,20,4.66,2 +53,23,4.5, +53,22,11.79,2 +54,14,11.66, +54,16,12.68,2 +55,4,5.46, +55,14,6.01, +55,12,7.71, +56,23,12.55,1 +56,22,4.5,2 +56,14,4.51,2 +57,4,6.93, +57,14,10.86, +57,7,8.84, +57,10,11.18,2 +57,21,13.02,2 +58,3,8.93, +58,2,8.9,2 +58,22,3.52, +58,21,3.04, +60,8,12.39,1 +60,11,11.43, +61,21,13.57, +61,10,3.44,2 +62,17,10.5,1 +62,19,6.63, +62,13,2.29,2 +62,6,4.1,2 +62,23,5.22,2 +62,24,10.32, +63,20,7.37, +63,10,4.03, +63,21,2.74,1 +64,23,4.92, +64,19,11.4, +64,2,5.38,1 +64,1,12.92, +65,23,2.71,1 +65,21,5.92,1 +65,25,11.7,2 +65,17,4.8, +65,12,8.72,1 +66,17,9.21, +67,3,6.71,1 +67,17,7.71,2 +67,4,12.65, +67,19,10.17,1 +67,15,13.39, +68,22,7.68,1 +68,5,7.01, +68,24,3.05, +69,6,9.23, +69,16,12.8, +69,2,6.58, +69,20,8.38, +70,11,11,1 +70,22,9.32,1 +70,10,13.55, +70,24,12.71,1 +71,17,9.78,2 +71,23,4.96,1 +72,20,3.1, +72,24,12.2, +72,22,6.93, +72,1,12.2,1 +72,25,4.79,2 +73,8,9.61,2 +73,13,2.39, +74,16,9.6,2 +74,24,13.75, +74,15,13.15, +74,19,4.6, +75,11,8.13,1 +75,9,8.14,2 +75,19,7.82, +75,5,4.7,1 +76,14,4.24, +77,19,3.8, +77,10,11.48, +77,15,13.8,1 +77,13,5.64,2 +77,2,2.74, +77,23,3.5,2 +78,7,7.67,1 +78,19,4.68, +79,15,6.88, +79,18,4.01, +79,23,5.12,1 +80,20,5.51,1 +80,16,12.92,1 +80,4,4.39,1 +81,22,2.16, +82,1,6.93,2 +82,19,7.97, +82,4,12.5,2 +83,6,5.68, +83,20,9.02,2 +83,15,7.89,2 +84,17,7.49,2 +84,16,6.25, +84,10,3.52,1 +85,18,5.72, +85,16,3.62, +85,23,13.48,1 +85,19,2.82, +85,12,6.12, +86,1,4.03, +86,5,12.66, +86,2,7.9,2 +86,6,3.77,2 +86,4,11.4, +86,16,5.88, +87,12,11.22,2 +87,8,4.17,2 +87,22,2.97, +88,13,11.18,1 +88,5,2.39,1 +88,4,4.89,1 +88,9,5.36,2 +89,8,13.43,2 +89,21,4.31,1 +89,4,11.29,2 +90,20,13.17, +90,11,3.32, +90,25,6.23, +90,17,12.75,2 +90,7,11.31, +91,16,10.83,2 +92,10,13.94, +92,24,2.19,1 +92,9,4.88, +94,18,8.51, +94,5,9.18,1 +94,3,3.37,1 +94,10,5.06, +95,20,2.4,1 +95,10,12.17,1 +95,8,10.81, +96,21,6.23,1 +96,24,2.92, +96,15,11.43, +97,1,3.7, +97,8,6.21,2 +97,16,4.31,1 +97,4,2.54,1 +97,21,13.19, +98,21,7.81, +98,22,9.28,1 +98,24,13.1,1 +98,8,7.93, +99,24,3.44,1 +99,1,11.47,2 +100,11,4.46,1 +100,1,12.28, +100,2,10.55, +100,8,13.92, +101,23,13.69,1 +101,7,9.12, +101,21,10.32, +101,5,3.75,2 +101,22,9.78, +101,19,6.31, +103,17,13.26,1 +103,3,3.44,1 +103,5,12.24,2 +103,16,11.21,2 +103,21,3.26,1 +104,10,13.52, +104,8,11.46,2 +104,21,6.55,2 +104,9,8.68,2 +104,19,10.55, +104,13,9.36, +104,24,3.49,1 +105,23,4.44, +105,22,12.24, +105,16,8.26, +105,24,6.98,2 +105,14,2.31, +105,13,9.23, +106,13,2.47, +106,11,2.75,1 +107,17,6.11, +107,18,9.73, +107,24,5.74, +107,9,11.29,1 +108,21,4.74, +108,1,5.54, +108,13,4.95, +108,16,2.56,2 +108,3,13.32,2 +108,7,10.58,2 +109,20,5.15, +109,24,2.24,2 +109,8,11.75, +109,23,7.85, +109,10,13.36,1 +111,5,2.39,1 +111,13,3.89,1 +111,7,11.05,1 +111,9,12.21,1 +111,15,8.73, +111,8,8.81, +112,23,8.78,2 +112,19,13.8,2 +112,16,9.14, +112,5,8.27,2 +112,20,11.59, +112,22,6.7, +112,9,10, +113,8,7.36,1 +113,16,2.94,2 +113,18,9.38,2 +114,24,12.71,1 +115,19,8.17,2 +115,4,9.14, +115,2,6.79, +115,11,13.66,1 +116,15,10.56,2 +117,10,3.76, +117,17,9.32,2 +117,12,7.23,1 +118,1,7.34,1 +118,11,10.29, +118,3,7.64, +118,13,10.86, +118,22,10.61, +118,9,6.48, +119,17,12.58, +119,4,2.45, +119,9,12.74,1 +119,12,8.16, +119,21,6.08, +120,10,11.22,2 +121,24,2.24, +121,2,11.58,2 +121,1,5.94, +121,9,7.2, +121,10,8.1,2 +122,13,2.31, +122,23,9.78,1 +123,9,5.34,1 +123,19,2.92,1 +123,2,3.96, +123,13,12.37, +123,6,2.58,1 +124,13,12.09,1 +124,5,10.12,2 +124,15,5.84,2 +124,19,4.94,1 +124,11,7.1, +125,9,6.57,1 +125,4,13.76, +125,15,8.81, +125,22,2.2, +126,10,3.56, +127,16,4.47, +127,19,6.07,2 +127,24,7.83, +127,20,2.52,2 +128,22,8.94,2 +128,17,8.33, +128,4,9.47, +129,3,9.99,2 +130,16,5.52, +130,23,3.39,1 +131,13,7.2,1 +131,14,4.21, +131,1,6.7,1 +131,7,3.69,1 +131,3,5.14,1 +131,23,11.91, +132,15,2.91, +132,1,10.04,1 +133,4,7.24, +133,7,4.06,1 +134,16,7.04,1 +134,7,7.42,1 +134,2,2.25, +135,5,3,1 +135,13,7.53, +135,20,5.62,1 +136,11,10.08, +136,17,9.26,1 +136,3,7.45,2 +136,18,2.2,1 +136,15,3.57, +136,23,2.76,2 +137,15,8.6,1 +137,10,2.02, +138,18,7.96, +138,1,13.52,2 +138,10,10.71, +138,24,3.44,2 +138,13,7.1,2 +139,2,10.82,2 +139,21,12.59,1 +139,6,6.77, +139,23,4.37,2 +139,1,6.07,1 +140,15,11.38,1 +140,1,3.53,2 +140,23,9, +141,12,12.34,2 +141,19,8.04,2 +142,7,4.36,1 +142,17,10.94, +142,23,9.4,1 +142,11,5.55,1 +142,16,4.82, +143,7,5.02, +143,16,11.74, +143,12,12.94, +144,10,11.65,1 +144,13,8.98, +145,19,7.18, +145,22,5.55,1 +145,2,7.64,1 +145,6,12.51,2 +147,2,5.71, +147,7,9.28,1 +147,16,3.37,2 +148,13,11.97, +148,21,12.63, +148,7,10.23,1 +149,20,11.34,1 +150,10,10.6,2 +150,19,11.87, +150,23,12.13, +151,15,13.66, +151,24,10.61,2 +151,13,5.1, +151,20,12.94,1 +152,23,5.78, +152,19,3.92,1 +152,13,4.51,1 +152,14,6.7,2 +152,15,11.81,2 +152,25,11.31,1 +153,13,9.75,1 +153,23,3.5, +153,15,9.02,1 +153,2,13.68,1 +153,19,5.75,1 +154,15,5.71,2 +154,19,12.12,1 +154,17,9.83, +154,24,11.62,1 +154,11,2.33, +155,5,2.19, +155,22,9.47,2 +155,13,6.9, +156,4,6.98,1 +156,10,8.46, +156,9,5.87, +156,16,10.69,1 +156,19,14, +156,23,12.6,1 +157,24,2.62,2 +157,22,8.39,1 +158,24,3.41,1 +158,19,6.26,2 +159,6,13.95, +159,23,12.96, +160,14,2.85, +160,7,2.82,2 +160,1,4, +161,13,13.69, +161,25,13.05,1 +161,20,10.4,2 +162,22,13.03, +162,24,8.83,1 +162,11,11.33,1 +163,4,6.17,2 +163,10,11.61, +163,20,12.31, +164,23,6.13,2 +164,15,12.09, +164,6,3.33, +165,5,4.04, +165,14,4.68,1 +165,22,10.75,2 +165,10,9.22,2 +166,18,5.82,1 +166,23,8.07,1 +166,20,2.75,1 +167,19,12.14,2 +167,13,3.65,1 +167,15,5.67, +167,8,2.89,2 +168,21,2.61,1 +168,13,3, +168,1,10.53, +168,17,13.83, +169,2,7.26, +169,20,12.99, +170,12,7.07,1 +170,16,2.71, +170,7,10.68, +170,21,6.93, +171,2,9.82, +171,23,13.93,1 +171,8,11.14,1 +171,13,3.79,2 +171,10,5.37,1 +171,24,3.46,2 +172,24,2.81, +172,15,13.4, +172,10,2.73, +172,2,6.15,2 +173,11,9.66,1 +173,15,3.93,1 +173,24,6.33,1 +173,16,12.15,1 +174,7,9.21,2 +174,15,2.97,2 +175,19,6.09,1 +175,17,6.23,1 +176,8,2.81, +176,1,10.22,2 +176,20,5.27, +176,15,2.07,1 +176,11,7.62,1 +177,22,3.05,1 +178,13,5.44, +178,2,12.57, +178,14,6.07, +178,4,11.28,2 +178,17,9.53,2 +178,1,4.65,2 +178,20,9.98,2 +179,23,3.5, +179,10,12.24,1 +179,14,9.06, +180,25,13.06,1 diff --git a/data/modifiers.csv b/data/modifiers.csv new file mode 100644 index 0000000..9321834 --- /dev/null +++ b/data/modifiers.csv @@ -0,0 +1,30 @@ +modifier_id,name,option,price +1,Add ingredient,Taleggio Cheese,3.73 +1,Add ingredient,Turmeric,1.66 +1,Add ingredient,Vegetable Oil,1.93 +1,Add ingredient,Cornichons,2.27 +1,Add ingredient,Tea Oil,2.56 +1,Add ingredient,French Eschallots,4.02 +1,Add ingredient,Tempeh,2.59 +1,Add ingredient,Dill,2.42 +1,Add ingredient,Fresh Chillies,2.77 +1,Add ingredient,Pepitas,2.93 +1,Add ingredient,Watermelon,1.84 +1,Add ingredient,Sea Salt,3.45 +2,Allergens,Crustaceans,0 +2,Allergens,None,0 +2,Allergens,Sesame,0 +2,Allergens,Peanut,0 +2,Allergens,Halal,0 +2,Allergens,Fish,0 +2,Allergens,Vegan,0 +2,Allergens,Celery,0 +2,Allergens,Mollusc,0 +2,Allergens,Sulphites,0 +2,Allergens,Gluten,0 +2,Allergens,Lupin,0 +2,Allergens,Nut,0 +2,Allergens,Mustard,0 +2,Allergens,Dairy,0 +2,Allergens,Soy,0 +2,Allergens,Egg,0 diff --git a/data/recipes.csv b/data/recipes.csv new file mode 100644 index 0000000..b48a146 --- /dev/null +++ b/data/recipes.csv @@ -0,0 +1,1205 @@ +recipe_id,name,quantity,ingredient_id +1,The Kinks,5.2,403 +1,The Kinks,4.1,409 +1,The Kinks,2.6,92 +1,The Kinks,1.4,440 +1,The Kinks,5.9,19 +1,The Kinks,3.7,205 +2,Blondie,3.5,187 +2,Blondie,8.1,5 +2,Blondie,4.7,294 +2,Blondie,6.2,385 +2,Blondie,4.1,409 +2,Blondie,2.7,63 +2,Blondie,4.2,107 +2,Blondie,5.1,419 +2,Blondie,3.9,135 +3,Thornley,7.4,114 +3,Thornley,4.3,166 +3,Thornley,4.5,87 +3,Thornley,8.1,434 +3,Thornley,0,335 +4,Iggy Pop,7.5,244 +4,Iggy Pop,3.6,269 +4,Iggy Pop,5.3,439 +4,Iggy Pop,8.9,380 +4,Iggy Pop,7.5,85 +4,Iggy Pop,5.4,21 +4,Iggy Pop,6.9,149 +5,Pat Metheny,7.4,64 +5,Pat Metheny,8.3,431 +5,Pat Metheny,4.2,8 +5,Pat Metheny,5.1,466 +5,Pat Metheny,8.1,434 +5,Pat Metheny,7.9,112 +5,Pat Metheny,0.4,4 +5,Pat Metheny,1.5,317 +5,Pat Metheny,2.3,442 +5,Pat Metheny,1.4,395 +5,Pat Metheny,5.1,270 +6,Prince,1.5,317 +6,Prince,6.6,414 +6,Prince,3.7,300 +6,Prince,0.1,478 +6,Prince,0.7,128 +6,Prince,4.2,8 +7,Arctic Monkeys,1.5,461 +7,Arctic Monkeys,5.5,33 +7,Arctic Monkeys,0.3,415 +7,Arctic Monkeys,8.8,443 +7,Arctic Monkeys,8.4,452 +7,Arctic Monkeys,0.2,71 +7,Arctic Monkeys,4.4,23 +7,Arctic Monkeys,7.1,263 +8,Captain Beefheart,7.2,17 +8,Captain Beefheart,1.1,223 +8,Captain Beefheart,3.7,205 +8,Captain Beefheart,5.5,280 +8,Captain Beefheart,4.2,369 +8,Captain Beefheart,2.5,35 +8,Captain Beefheart,0,373 +8,Captain Beefheart,8.8,167 +8,Captain Beefheart,7.8,315 +8,Captain Beefheart,4.1,274 +8,Captain Beefheart,1.7,379 +9,Elvis Presley,8.1,434 +9,Elvis Presley,6.4,108 +9,Elvis Presley,4.5,129 +9,Elvis Presley,5.1,466 +9,Elvis Presley,2.8,202 +9,Elvis Presley,8.3,431 +9,Elvis Presley,6.3,86 +10,Brian Wilson,2.4,444 +10,Brian Wilson,4.1,274 +11,Jeff Beck,3.4,303 +11,Jeff Beck,8.1,109 +11,Jeff Beck,6.6,257 +11,Jeff Beck,4.6,256 +11,Jeff Beck,6.6,123 +11,Jeff Beck,9,75 +11,Jeff Beck,3.7,300 +11,Jeff Beck,6.1,420 +12,AC/DC,1.3,180 +12,AC/DC,7.4,429 +12,AC/DC,3.6,411 +12,AC/DC,2,179 +12,AC/DC,8.2,422 +12,AC/DC,8.1,311 +12,AC/DC,0.3,324 +12,AC/DC,5.4,176 +12,AC/DC,0.5,320 +12,AC/DC,4.1,136 +12,AC/DC,1.7,43 +13,Grace Jones,5.8,73 +13,Grace Jones,2.5,397 +13,Grace Jones,0.2,71 +13,Grace Jones,1.3,388 +13,Grace Jones,0.1,478 +13,Grace Jones,4.6,160 +13,Grace Jones,6.9,477 +14,Chrissie Hynde,5.1,419 +14,Chrissie Hynde,2.2,217 +14,Chrissie Hynde,7.9,364 +15,Johnny Marr,0.4,80 +15,Johnny Marr,7.5,85 +15,Johnny Marr,4,196 +15,Johnny Marr,5,436 +15,Johnny Marr,2.1,12 +15,Johnny Marr,7.4,114 +15,Johnny Marr,2,65 +15,Johnny Marr,0.7,128 +15,Johnny Marr,5.4,158 +16,Red Hot Chili Peppers,3.9,11 +16,Red Hot Chili Peppers,3.9,135 +16,Red Hot Chili Peppers,2.1,12 +16,Red Hot Chili Peppers,1.3,476 +16,Red Hot Chili Peppers,7.8,171 +16,Red Hot Chili Peppers,3.7,205 +16,Red Hot Chili Peppers,1.3,479 +16,Red Hot Chili Peppers,4.8,150 +16,Red Hot Chili Peppers,0.2,382 +16,Red Hot Chili Peppers,2.5,397 +16,Red Hot Chili Peppers,7.1,263 +17,Radiohead,2.7,15 +17,Radiohead,4.4,393 +17,Radiohead,7.4,251 +17,Radiohead,0.6,126 +17,Radiohead,0,119 +17,Radiohead,0,335 +17,Radiohead,5.4,355 +17,Radiohead,5.2,208 +18,Phish,8.1,434 +18,Phish,0.4,6 +18,Phish,3.9,11 +18,Phish,6.4,108 +19,Duke Ellington,6.6,123 +19,Duke Ellington,6.3,86 +19,Duke Ellington,1.3,180 +19,Duke Ellington,3.4,168 +19,Duke Ellington,4,413 +19,Duke Ellington,3.2,337 +19,Duke Ellington,4.3,191 +19,Duke Ellington,3.9,312 +19,Duke Ellington,6.2,138 +20,Siouxsie and The Banshees,1.9,211 +20,Siouxsie and The Banshees,4.8,459 +20,Siouxsie and The Banshees,8.2,327 +20,Siouxsie and The Banshees,6.9,37 +20,Siouxsie and The Banshees,7.2,446 +20,Siouxsie and The Banshees,7.6,125 +21,Muse,8.3,394 +21,Muse,2.8,310 +21,Muse,8.8,238 +21,Muse,4.2,29 +21,Muse,6.4,53 +21,Muse,2.8,326 +21,Muse,1.2,146 +22,Chuck Berry,3.9,312 +22,Chuck Berry,2.6,329 +22,Chuck Berry,8.7,321 +22,Chuck Berry,4.9,293 +22,Chuck Berry,2.3,88 +22,Chuck Berry,1,143 +23,Offspring,5.2,208 +23,Offspring,5.5,231 +23,Offspring,2,172 +23,Offspring,1.3,200 +23,Offspring,5.9,386 +24,Ozzy Osbourne,5,398 +24,Ozzy Osbourne,6.7,361 +24,Ozzy Osbourne,8.4,416 +24,Ozzy Osbourne,5.5,280 +24,Ozzy Osbourne,0,119 +24,Ozzy Osbourne,0.6,331 +24,Ozzy Osbourne,1.4,285 +24,Ozzy Osbourne,8.7,321 +24,Ozzy Osbourne,2.8,326 +24,Ozzy Osbourne,6.3,86 +24,Ozzy Osbourne,6.1,451 +25,The Jam,5.8,122 +25,The Jam,1.2,351 +25,The Jam,2.6,92 +25,The Jam,2.8,310 +26,Ryan Adams,2.3,41 +26,Ryan Adams,2.4,444 +26,Ryan Adams,7.6,242 +26,Ryan Adams,2.5,359 +26,Ryan Adams,2.4,325 +26,Ryan Adams,8.4,452 +26,Ryan Adams,4.2,107 +26,Ryan Adams,3.8,22 +26,Ryan Adams,5.5,99 +27,Max Roach,2.8,432 +27,Max Roach,0.4,253 +27,Max Roach,7.9,24 +27,Max Roach,5.9,183 +27,Max Roach,4.2,107 +27,Max Roach,2.3,88 +27,Max Roach,7.4,429 +28,Sex Pistols,4.2,29 +28,Sex Pistols,1.9,211 +28,Sex Pistols,6.7,91 +28,Sex Pistols,1.3,180 +28,Sex Pistols,7.1,117 +29,The Who,6.6,257 +29,The Who,1.8,230 +29,The Who,6.9,239 +29,The Who,8.7,321 +29,The Who,7.8,374 +29,The Who,4,36 +29,The Who,2.4,325 +29,The Who,0.9,371 +29,The Who,6.7,463 +29,The Who,6.8,228 +30,The Ramones,4.3,212 +30,The Ramones,2.7,405 +30,The Ramones,5.3,437 +30,The Ramones,5.9,19 +30,The Ramones,1.9,248 +30,The Ramones,7.1,263 +30,The Ramones,1,278 +30,The Ramones,0.7,157 +30,The Ramones,4.2,8 +31,David Bowie,3.5,154 +31,David Bowie,2.4,299 +31,David Bowie,4.5,93 +31,David Bowie,4.6,160 +31,David Bowie,7.5,244 +32,Cliff Richard (and the Shadows),6,268 +32,Cliff Richard (and the Shadows),7.4,210 +32,Cliff Richard (and the Shadows),7.4,338 +32,Cliff Richard (and the Shadows),4.9,384 +32,Cliff Richard (and the Shadows),2.5,232 +32,Cliff Richard (and the Shadows),5.4,355 +32,Cliff Richard (and the Shadows),7.7,455 +32,Cliff Richard (and the Shadows),1.7,356 +32,Cliff Richard (and the Shadows),4,16 +33,Ella Fitzgerald,8.5,42 +33,Ella Fitzgerald,0.5,141 +33,Ella Fitzgerald,4.2,29 +34,Jeff Buckley,2.9,178 +34,Jeff Buckley,1,49 +35,White Stripes,6.3,86 +35,White Stripes,0.2,71 +35,White Stripes,8,319 +35,White Stripes,1.7,379 +35,White Stripes,0,119 +35,White Stripes,6.4,53 +35,White Stripes,5.8,81 +35,White Stripes,5.9,470 +35,White Stripes,8,213 +35,White Stripes,2,134 +35,White Stripes,7.5,244 +36,Frightened Rabbit,4.9,145 +36,Frightened Rabbit,8.2,422 +36,Frightened Rabbit,2.7,390 +36,Frightened Rabbit,0.5,141 +36,Frightened Rabbit,7.1,348 +36,Frightened Rabbit,0.6,396 +36,Frightened Rabbit,4.5,341 +36,Frightened Rabbit,8.2,220 +36,Frightened Rabbit,7,214 +37,Carlos Santana,0.1,144 +37,Carlos Santana,2.3,442 +37,Carlos Santana,8.7,186 +37,Carlos Santana,5.8,2 +37,Carlos Santana,5.4,176 +37,Carlos Santana,8.7,153 +37,Carlos Santana,0.1,83 +37,Carlos Santana,3.9,135 +37,Carlos Santana,3.9,165 +37,Carlos Santana,4.8,215 +38,Sinead O'connor,5.8,73 +38,Sinead O'connor,4.1,274 +39,Billy Idol,2.5,232 +39,Billy Idol,4.9,105 +39,Billy Idol,4.9,293 +39,Billy Idol,7,357 +39,Billy Idol,7.4,387 +39,Billy Idol,8.4,452 +39,Billy Idol,7.8,315 +39,Billy Idol,4.1,409 +39,Billy Idol,1,399 +40,Led Zeppelin,8.1,345 +40,Led Zeppelin,3.8,22 +40,Led Zeppelin,8,319 +40,Led Zeppelin,2.4,20 +40,Led Zeppelin,8.9,380 +40,Led Zeppelin,0.4,4 +40,Led Zeppelin,4.3,254 +40,Led Zeppelin,3.6,400 +40,Led Zeppelin,4.5,129 +40,Led Zeppelin,8.8,443 +41,Marilyn Manson,3.6,323 +41,Marilyn Manson,8.3,174 +41,Marilyn Manson,3.6,366 +41,Marilyn Manson,7.8,464 +41,Marilyn Manson,7.9,112 +41,Marilyn Manson,2.7,161 +41,Marilyn Manson,5.3,188 +41,Marilyn Manson,3.9,467 +41,Marilyn Manson,7.9,137 +42,Dizzy Gillespie,1.4,285 +42,Dizzy Gillespie,0.2,381 +43,Thelonius Monk,7.2,360 +43,Thelonius Monk,7.8,407 +43,Thelonius Monk,5.8,2 +43,Thelonius Monk,6.9,477 +44,Guns N' Roses,1.1,223 +44,Guns N' Roses,7.4,113 +44,Guns N' Roses,3.4,175 +45,Chris Isaak,2.2,332 +45,Chris Isaak,1.9,198 +45,Chris Isaak,2.3,203 +45,Chris Isaak,1.3,180 +46,Tom Waits,4.4,222 +46,Tom Waits,6.6,123 +46,Tom Waits,0.2,68 +46,Tom Waits,4.4,352 +46,Tom Waits,1.3,180 +46,Tom Waits,5.2,184 +46,Tom Waits,0.1,144 +46,Tom Waits,6,39 +46,Tom Waits,0.2,382 +46,Tom Waits,2.2,28 +47,Patti Smith,7.1,263 +47,Patti Smith,4.4,352 +47,Patti Smith,0.8,438 +47,Patti Smith,4.8,459 +47,Patti Smith,0.4,4 +47,Patti Smith,2.3,203 +47,Patti Smith,7.5,244 +47,Patti Smith,6.2,385 +48,Nick Cave,2.4,322 +48,Nick Cave,3.5,301 +48,Nick Cave,4.8,150 +48,Nick Cave,6.4,108 +48,Nick Cave,2,219 +48,Nick Cave,3.4,175 +48,Nick Cave,1.3,476 +48,Nick Cave,8.3,394 +48,Nick Cave,1.8,230 +49,Alex Chilton,3.5,18 +49,Alex Chilton,2,115 +49,Alex Chilton,3.9,11 +49,Alex Chilton,3.7,170 +50,Eric Clapton,3.8,90 +50,Eric Clapton,1.6,328 +50,Eric Clapton,2.8,282 +50,Eric Clapton,0.4,4 +50,Eric Clapton,6.4,53 +50,Eric Clapton,1.4,78 +50,Eric Clapton,0.1,83 +50,Eric Clapton,4.8,430 +50,Eric Clapton,2.6,92 +50,Eric Clapton,6.8,228 +50,Eric Clapton,8.3,431 +51,George Michael,2.5,232 +51,George Michael,1.5,461 +51,George Michael,6.4,108 +51,George Michael,4.7,94 +51,George Michael,2.2,332 +51,George Michael,3,334 +51,George Michael,3.9,467 +51,George Michael,8.5,333 +51,George Michael,3.7,247 +51,George Michael,7.4,429 +52,Primal Scream,6.4,383 +52,Primal Scream,6.7,463 +52,Primal Scream,1.9,198 +52,Primal Scream,8,319 +53,Bruce Springsteen,2.9,178 +53,Bruce Springsteen,1.1,223 +53,Bruce Springsteen,8.2,423 +53,Bruce Springsteen,5.4,82 +53,Bruce Springsteen,4.1,409 +53,Bruce Springsteen,7.9,24 +53,Bruce Springsteen,6.7,139 +53,Bruce Springsteen,3.6,59 +53,Bruce Springsteen,0.2,265 +53,Bruce Springsteen,2,115 +54,Pete Townshend,5.6,131 +54,Pete Townshend,0.2,71 +54,Pete Townshend,4.4,460 +54,Pete Townshend,5.9,470 +54,Pete Townshend,3.5,18 +54,Pete Townshend,4.2,369 +55,Status Quo,4.8,389 +55,Status Quo,7.5,244 +55,Status Quo,0.6,396 +55,Status Quo,6.8,98 +55,Status Quo,5.3,283 +55,Status Quo,4.5,341 +55,Status Quo,2.8,133 +55,Status Quo,7.1,117 +55,Status Quo,4.9,297 +56,Roy Hargrove,6.3,95 +56,Roy Hargrove,5,60 +56,Roy Hargrove,1.5,461 +57,Tom Robinson,6.7,463 +57,Tom Robinson,2.3,41 +57,Tom Robinson,6.3,140 +57,Tom Robinson,6.3,218 +57,Tom Robinson,7.2,192 +57,Tom Robinson,0.1,195 +57,Tom Robinson,3.9,101 +57,Tom Robinson,7.2,446 +57,Tom Robinson,2,179 +58,Pearl Jam,1.7,43 +58,Pearl Jam,5.4,110 +58,Pearl Jam,8.7,321 +58,Pearl Jam,0.3,56 +58,Pearl Jam,1,399 +58,Pearl Jam,5.2,208 +59,Blinker The Star,6.7,361 +59,Blinker The Star,5.2,346 +60,Program The Dead,6.9,149 +60,Program The Dead,8.2,370 +60,Program The Dead,7.2,446 +60,Program The Dead,5.9,470 +60,Program The Dead,7,214 +60,Program The Dead,0.4,233 +60,Program The Dead,1.5,461 +60,Program The Dead,8,319 +60,Program The Dead,5,255 +61,Chic,5.5,280 +61,Chic,3.7,247 +62,Beck,2.4,20 +62,Beck,3.8,468 +63,Rod Stewart,8.8,238 +63,Rod Stewart,2.4,444 +63,Rod Stewart,8.3,474 +64,Cortinas,2,221 +64,Cortinas,6.5,77 +64,Cortinas,5,436 +64,Cortinas,7.9,120 +64,Cortinas,2,172 +64,Cortinas,5.3,437 +64,Cortinas,7.7,455 +65,Leonard Cohen,5,60 +65,Leonard Cohen,2.6,48 +65,Leonard Cohen,2.9,206 +65,Leonard Cohen,6.9,239 +66,Adam and the Ants,4.4,222 +66,Adam and the Ants,2.7,472 +66,Adam and the Ants,6.6,414 +66,Adam and the Ants,0.4,6 +66,Adam and the Ants,4.2,369 +66,Adam and the Ants,8.8,167 +66,Adam and the Ants,0.6,331 +66,Adam and the Ants,0.1,83 +66,Adam and the Ants,7.4,429 +67,Buzzcocks,3.6,59 +67,Buzzcocks,1.4,440 +67,Buzzcocks,5.6,426 +67,Buzzcocks,4.3,166 +67,Buzzcocks,6.3,95 +67,Buzzcocks,1.6,116 +67,Buzzcocks,4.6,256 +68,Lenny Kravitz,5.4,158 +68,Lenny Kravitz,6.8,228 +69,The La's,0.5,141 +69,The La's,4,413 +69,The La's,4.9,384 +69,The La's,3.6,59 +69,The La's,4.3,212 +69,The La's,6.7,277 +70,Nirvana,1.9,147 +70,Nirvana,6.9,471 +70,Nirvana,6.9,37 +71,The Smiths,5.2,342 +71,The Smiths,7.6,125 +71,The Smiths,3.4,303 +71,The Smiths,4.5,240 +71,The Smiths,4.1,55 +71,The Smiths,6.8,347 +71,The Smiths,0,335 +71,The Smiths,3.5,18 +71,The Smiths,7.4,114 +72,Jimi Hendrix,6.8,347 +72,Jimi Hendrix,2,115 +72,Jimi Hendrix,8.2,449 +72,Jimi Hendrix,5.8,81 +72,Jimi Hendrix,2.4,322 +72,Jimi Hendrix,4.3,391 +72,Jimi Hendrix,6.7,139 +72,Jimi Hendrix,4.2,50 +72,Jimi Hendrix,2.3,442 +72,Jimi Hendrix,5.9,245 +73,Manic Street Preachers,4.5,129 +73,Manic Street Preachers,5.3,437 +73,Manic Street Preachers,6.1,318 +73,Manic Street Preachers,6.9,367 +73,Manic Street Preachers,0.6,396 +74,Muddy Waters,0.5,320 +74,Muddy Waters,6.3,95 +74,Muddy Waters,1.2,146 +74,Muddy Waters,3.5,72 +74,Muddy Waters,0.9,96 +74,Muddy Waters,8.4,452 +75,U2,0.4,4 +75,U2,2.8,310 +75,U2,1.3,476 +75,U2,4.2,369 +75,U2,4.5,87 +75,U2,4.9,100 +75,U2,3.2,465 +75,U2,1.9,198 +76,Phil Collins,6.7,361 +76,Phil Collins,3.6,182 +76,Phil Collins,1.9,211 +76,Phil Collins,7.4,338 +76,Phil Collins,8.1,109 +76,Phil Collins,7.3,31 +76,Phil Collins,1.3,476 +76,Phil Collins,0,47 +76,Phil Collins,5.8,122 +77,Johnny Borrell,5.5,33 +77,Johnny Borrell,7.4,64 +77,Johnny Borrell,1.7,435 +77,Johnny Borrell,3.9,11 +77,Johnny Borrell,6.9,372 +77,Johnny Borrell,6.8,98 +78,Keith Richards,8.8,443 +78,Keith Richards,1.2,350 +78,Keith Richards,1.4,453 +78,Keith Richards,4,292 +78,Keith Richards,8.1,311 +78,Keith Richards,0.2,377 +78,Keith Richards,3,334 +78,Keith Richards,2.8,133 +78,Keith Richards,8.2,370 +79,John Coltrane,6.1,286 +79,John Coltrane,8.5,349 +79,John Coltrane,0.1,144 +79,John Coltrane,0.1,298 +79,John Coltrane,5.8,9 +80,The Libertines,8.1,434 +80,The Libertines,5.7,261 +80,The Libertines,3,334 +80,The Libertines,6.7,277 +80,The Libertines,0,335 +81,Nigel Kennedy,5.3,276 +81,Nigel Kennedy,2.6,61 +81,Nigel Kennedy,5.1,121 +81,Nigel Kennedy,4,413 +81,Nigel Kennedy,4.8,389 +81,Nigel Kennedy,4,38 +81,Nigel Kennedy,6.7,62 +81,Nigel Kennedy,8.8,209 +81,Nigel Kennedy,7.3,31 +82,Afrika Bambaataa,4.4,393 +82,Afrika Bambaataa,8.8,273 +82,Afrika Bambaataa,4.4,460 +82,Afrika Bambaataa,5,60 +82,Afrika Bambaataa,4.3,166 +82,Afrika Bambaataa,5.1,121 +82,Afrika Bambaataa,5,204 +82,Afrika Bambaataa,0.1,298 +82,Afrika Bambaataa,1,278 +82,Afrika Bambaataa,5.6,131 +82,Afrika Bambaataa,4.1,409 +83,Sonic Youth,5.9,169 +83,Sonic Youth,3,264 +83,Sonic Youth,0.5,259 +83,Sonic Youth,7.1,117 +83,Sonic Youth,7,357 +83,Sonic Youth,5.2,342 +83,Sonic Youth,5.3,437 +83,Sonic Youth,0.3,378 +83,Sonic Youth,5.6,131 +84,Pulp,8.8,185 +84,Pulp,0.4,253 +84,Pulp,3.8,289 +85,Queen,3.2,337 +85,Queen,1.8,51 +85,Queen,6.9,372 +85,Queen,1.7,43 +85,Queen,5.8,9 +85,Queen,4.8,368 +85,Queen,6.1,404 +85,Queen,2.9,178 +85,Queen,0.2,68 +85,Queen,2.1,12 +86,The Undertones,5,436 +86,The Undertones,7.2,192 +86,The Undertones,0.8,159 +86,The Undertones,0.4,233 +86,The Undertones,0.4,336 +86,The Undertones,6.8,228 +86,The Undertones,2.8,432 +86,The Undertones,6.7,463 +86,The Undertones,6.1,318 +87,Miles Davis,8.8,209 +87,Miles Davis,2.8,202 +88,Joy Division,1.3,339 +88,Joy Division,6.4,383 +88,Joy Division,4.1,55 +88,Joy Division,5.3,428 +89,Al Foster,0.7,127 +89,Al Foster,3.4,303 +89,Al Foster,4.5,156 +89,Al Foster,0.4,4 +89,Al Foster,3.1,13 +89,Al Foster,6.7,277 +89,Al Foster,4,306 +89,Al Foster,2.7,32 +89,Al Foster,2,179 +90,Coldplay,5.6,426 +90,Coldplay,5.7,261 +90,Coldplay,1,49 +90,Coldplay,4.8,459 +90,Coldplay,8,319 +90,Coldplay,4.3,212 +90,Coldplay,7,118 +91,The Birthday Party,5.3,30 +91,The Birthday Party,7.2,252 +91,The Birthday Party,4.4,460 +91,The Birthday Party,3.3,40 +92,Paramore,2.7,472 +92,Paramore,4.5,156 +92,Paramore,6.3,140 +92,Paramore,1.2,351 +92,Paramore,2.6,48 +93,Deepest Blue,4.4,460 +93,Deepest Blue,6,462 +93,Deepest Blue,4.9,260 +93,Deepest Blue,4.1,290 +93,Deepest Blue,7.9,24 +93,Deepest Blue,7,118 +93,Deepest Blue,8.2,370 +93,Deepest Blue,5.9,89 +93,Deepest Blue,6.6,123 +94,Foo Fighters,6.5,77 +94,Foo Fighters,0.5,320 +94,Foo Fighters,5.8,73 +94,Foo Fighters,4.3,391 +94,Foo Fighters,2.7,267 +94,Foo Fighters,8.1,345 +94,Foo Fighters,8.3,431 +94,Foo Fighters,7,357 +94,Foo Fighters,5.2,194 +94,Foo Fighters,2.2,332 +94,Foo Fighters,0.1,427 +95,Fats Domino,4.3,191 +95,Fats Domino,5.8,421 +95,Fats Domino,4.5,229 +95,Fats Domino,3.2,458 +95,Fats Domino,0.1,344 +96,K.D Lang,4.2,457 +96,K.D Lang,2.2,332 +96,K.D Lang,6.8,272 +96,K.D Lang,2.5,232 +96,K.D Lang,4.5,129 +96,K.D Lang,5.7,418 +96,K.D Lang,3,130 +97,New Order,8,319 +97,New Order,5.5,33 +97,New Order,0.4,80 +98,Rory Gallagher,5.2,403 +98,Rory Gallagher,4,38 +98,Rory Gallagher,2.3,442 +98,Rory Gallagher,1.3,425 +98,Rory Gallagher,0.5,412 +98,Rory Gallagher,0.3,324 +98,Rory Gallagher,1.9,450 +99,Annie Lennox,7.5,181 +99,Annie Lennox,7.4,114 +99,Annie Lennox,3.9,312 +99,Annie Lennox,6.2,197 +99,Annie Lennox,2.3,308 +99,Annie Lennox,2.9,178 +99,Annie Lennox,6.4,246 +99,Annie Lennox,5.5,447 +100,Blur,1.5,281 +100,Blur,8.9,380 +100,Blur,3.2,465 +100,Blur,6.9,471 +100,Blur,0.4,66 +100,Blur,1.4,395 +100,Blur,5.4,82 +100,Blur,8,266 +100,Blur,4.9,234 +100,Blur,8.1,311 +100,Blur,3.9,11 +101,The Rolling Stones,2.5,359 +101,The Rolling Stones,4.9,384 +101,The Rolling Stones,5.9,183 +101,The Rolling Stones,7.9,137 +102,Green Day,7.8,464 +102,Green Day,8.7,186 +102,Green Day,2.9,178 +102,Green Day,5.3,437 +102,Green Day,0.4,233 +102,Green Day,6,102 +102,Green Day,6.3,86 +102,Green Day,7.5,85 +102,Green Day,1.5,317 +102,Green Day,5.9,169 +102,Green Day,4.8,430 +103,The Yardbirds,2.8,326 +103,The Yardbirds,3.5,72 +103,The Yardbirds,0.5,412 +103,The Yardbirds,1.1,54 +103,The Yardbirds,0.4,80 +103,The Yardbirds,3.2,337 +104,O.A.R.,1.3,200 +104,O.A.R.,5,226 +105,Elton John,1.7,379 +105,Elton John,2.4,227 +105,Elton John,2.8,282 +105,Elton John,5.2,208 +105,Elton John,3.7,199 +105,Elton John,1.9,450 +105,Elton John,6.8,228 +106,Frank Sinatra,2.6,329 +106,Frank Sinatra,8.8,354 +106,Frank Sinatra,2.9,178 +106,Frank Sinatra,6.7,189 +106,Frank Sinatra,0.1,344 +106,Frank Sinatra,1.3,200 +107,Bob Marley (and the Wailers),5.1,121 +107,Bob Marley (and the Wailers),2.7,405 +107,Bob Marley (and the Wailers),4.9,234 +107,Bob Marley (and the Wailers),6.2,138 +107,Bob Marley (and the Wailers),0.4,6 +107,Bob Marley (and the Wailers),2.3,362 +107,Bob Marley (and the Wailers),6.4,246 +108,Maroon 5,4,413 +108,Maroon 5,6.3,25 +108,Maroon 5,6.4,53 +108,Maroon 5,7.4,338 +108,Maroon 5,7.8,464 +108,Maroon 5,4.8,459 +108,Maroon 5,8.8,167 +108,Maroon 5,6.4,108 +109,Herbie Hancock,2.4,325 +109,Herbie Hancock,6.9,291 +109,Herbie Hancock,5.9,183 +109,Herbie Hancock,7.3,31 +109,Herbie Hancock,8,319 +109,Herbie Hancock,3.6,402 +109,Herbie Hancock,0.3,324 +109,Herbie Hancock,0.9,96 +109,Herbie Hancock,1.5,461 +109,Herbie Hancock,0.2,265 +110,Paul Weller,1.7,309 +110,Paul Weller,0.4,6 +110,Paul Weller,8,266 +110,Paul Weller,0.7,128 +110,Paul Weller,2.5,35 +110,Paul Weller,4,413 +110,Paul Weller,6.5,77 +110,Paul Weller,6.9,471 +110,Paul Weller,2.8,133 +110,Paul Weller,6.2,385 +110,Paul Weller,7.5,181 +111,Rick Wright,4.8,389 +111,Rick Wright,8.9,380 +111,Rick Wright,8.2,271 +111,Rick Wright,4.2,457 +111,Rick Wright,6.1,451 +111,Rick Wright,6.3,95 +111,Rick Wright,1.7,379 +111,Rick Wright,0.3,415 +111,Rick Wright,4.6,256 +111,Rick Wright,8.3,474 +111,Rick Wright,2.8,310 +112,Ian Dury,1.6,302 +112,Ian Dury,0.4,142 +112,Ian Dury,6,102 +112,Ian Dury,4.9,293 +112,Ian Dury,6.3,10 +112,Ian Dury,6.1,177 +112,Ian Dury,8.2,271 +112,Ian Dury,4.4,358 +112,Ian Dury,2.8,326 +112,Ian Dury,6.1,76 +113,Pink Floyd,0,201 +113,Pink Floyd,2.7,472 +113,Pink Floyd,1.1,54 +113,Pink Floyd,6.9,149 +113,Pink Floyd,4.8,104 +113,Pink Floyd,1.7,309 +113,Pink Floyd,3.6,402 +113,Pink Floyd,2,221 +113,Pink Floyd,5.4,355 +113,Pink Floyd,5.9,19 +114,Liam Gallagher,5.3,276 +114,Liam Gallagher,4,36 +115,The Specials,4.7,225 +115,The Specials,0.2,382 +115,The Specials,2.2,217 +115,The Specials,8.1,193 +115,The Specials,4.1,136 +115,The Specials,2.5,397 +115,The Specials,5,398 +115,The Specials,4.9,100 +115,The Specials,7.2,314 +115,The Specials,7.8,374 +115,The Specials,8,213 +116,Madness,5.5,27 +116,Madness,7.6,242 +117,Syd Barrett,7.2,360 +117,Syd Barrett,1.9,211 +117,Syd Barrett,6,102 +117,Syd Barrett,7.3,353 +117,Syd Barrett,8,469 +117,Syd Barrett,1.7,356 +117,Syd Barrett,5.8,81 +117,Syd Barrett,1.6,116 +117,Syd Barrett,0.1,195 +117,Syd Barrett,2,172 +117,Syd Barrett,0.2,69 +118,Simply Red,6.5,250 +118,Simply Red,8.4,452 +119,Björk,3.3,40 +119,Björk,7.9,445 +119,Björk,8,469 +120,The Clash,2.8,133 +120,The Clash,5.3,439 +120,The Clash,0,335 +120,The Clash,0.2,71 +120,The Clash,2.7,161 +120,The Clash,3.6,402 +120,The Clash,3.5,301 +120,The Clash,5.4,355 +120,The Clash,0.1,298 +120,The Clash,0.2,265 +120,The Clash,6.7,361 +121,The Slits,8.6,236 +121,The Slits,1.8,51 +121,The Slits,8.8,185 +121,The Slits,7.4,64 +121,The Slits,0.3,190 +121,The Slits,4.3,166 +121,The Slits,6.4,246 +122,The Beatles,4,38 +122,The Beatles,0.4,456 +122,The Beatles,9,284 +122,The Beatles,4.9,145 +122,The Beatles,2.6,61 +122,The Beatles,2.3,203 +122,The Beatles,2,172 +123,The,2.4,299 +123,The,6.1,420 +123,The,3.4,46 +124,Roxy Music,2.3,203 +124,Roxy Music,1.3,476 +124,Roxy Music,5.9,470 +124,Roxy Music,1.6,57 +124,Roxy Music,3.9,135 +124,Roxy Music,8.7,186 +124,Roxy Music,6.5,26 +124,Roxy Music,3,262 +124,Roxy Music,4.8,430 +125,Hugh Masekela,0.6,396 +125,Hugh Masekela,2.4,322 +125,Hugh Masekela,0.7,375 +126,Keith Moon,8.5,333 +126,Keith Moon,8.8,185 +126,Keith Moon,7.7,455 +126,Keith Moon,4.8,215 +126,Keith Moon,8.3,406 +126,Keith Moon,0.4,253 +126,Keith Moon,2.4,444 +126,Keith Moon,7.2,192 +126,Keith Moon,6,173 +126,Keith Moon,4.9,297 +127,Kate Bush,5.6,249 +127,Kate Bush,3.5,52 +127,Kate Bush,8.1,279 +128,The Cranberries,4.8,430 +128,The Cranberries,3.8,468 +128,The Cranberries,3.6,402 +128,The Cranberries,3.9,101 +128,The Cranberries,8.8,354 +128,The Cranberries,6.9,448 +128,The Cranberries,2.5,232 +128,The Cranberries,3.4,46 +128,The Cranberries,3.5,58 +129,Cream,8,319 +129,Cream,6.7,277 +129,Cream,0.4,456 +130,Madonna,8.5,275 +130,Madonna,4.5,87 +130,Madonna,2.7,405 +130,Madonna,4.5,240 +130,Madonna,5.3,437 +130,Madonna,7.2,17 +131,Bauhaus,6.9,291 +131,Bauhaus,4.4,352 +131,Bauhaus,1.6,116 +131,Bauhaus,2.7,405 +132,Van Morrison,8.4,416 +132,Van Morrison,5.5,99 +132,Van Morrison,7.2,17 +132,Van Morrison,5.5,231 +132,Van Morrison,4.5,129 +133,R.E.M.,4.6,160 +133,R.E.M.,2,172 +133,R.E.M.,3.9,101 +133,R.E.M.,8.9,380 +133,R.E.M.,1.3,425 +133,R.E.M.,4.5,341 +133,R.E.M.,0.3,190 +133,R.E.M.,1.2,401 +133,R.E.M.,4.9,100 +133,R.E.M.,8.2,449 +134,Ed Sheeran,4.9,293 +134,Ed Sheeran,2.7,472 +134,Ed Sheeran,3.2,465 +134,Ed Sheeran,1.7,435 +134,Ed Sheeran,7.5,296 +134,Ed Sheeran,8.2,449 +134,Ed Sheeran,5.1,466 +135,Cat Anderson,4.7,45 +135,Cat Anderson,3.1,13 +135,Cat Anderson,5.1,70 +135,Cat Anderson,1.4,285 +135,Cat Anderson,1,49 +135,Cat Anderson,6.7,361 +136,The Pretenders,5.9,169 +136,The Pretenders,5.3,30 +136,The Pretenders,4.8,215 +136,The Pretenders,8.8,238 +136,The Pretenders,4.1,136 +136,The Pretenders,2,134 +136,The Pretenders,7.1,117 +136,The Pretenders,1.9,147 +137,Stone Roses,2.3,74 +137,Stone Roses,0.3,378 +137,Stone Roses,6.7,361 +137,Stone Roses,7.7,235 +137,Stone Roses,5.8,73 +137,Stone Roses,0.7,128 +137,Stone Roses,7.5,307 +138,Michael Jackson,4.4,352 +138,Michael Jackson,8.6,236 +138,Michael Jackson,8.8,167 +138,Michael Jackson,0,373 +138,Michael Jackson,3.6,182 +139,Marc Bolan,2.6,343 +139,Marc Bolan,4.7,94 +139,Marc Bolan,4.4,23 +139,Marc Bolan,6.5,26 +139,Marc Bolan,5.5,79 +139,Marc Bolan,2.2,332 +139,Marc Bolan,6.1,76 +140,Amy Winehouse,6.7,463 +140,Amy Winehouse,0.4,66 +140,Amy Winehouse,6,268 +141,The Cramps,0.4,80 +141,The Cramps,6,102 +141,The Cramps,5.2,346 +142,Rufus Wainwright,5,204 +142,Rufus Wainwright,6,39 +143,Noel Gallagher,5.1,70 +143,Noel Gallagher,0.1,478 +143,Noel Gallagher,5.2,184 +143,Noel Gallagher,3.6,323 +143,Noel Gallagher,5,480 +143,Noel Gallagher,8.1,193 +144,Devo,5.3,30 +144,Devo,0,148 +144,Devo,7.5,244 +144,Devo,7,118 +144,Devo,8.4,452 +144,Devo,5.8,73 +144,Devo,3.5,52 +144,Devo,2.9,178 +145,Morrissey,5.8,9 +145,Morrissey,4.7,94 +145,Morrissey,0.1,478 +145,Morrissey,3.5,58 +145,Morrissey,4.2,50 +145,Morrissey,4.9,234 +145,Morrissey,1.3,388 +145,Morrissey,6.4,246 +145,Morrissey,3.8,289 +145,Morrissey,2.9,206 +146,Dr Feelgood,8.9,363 +146,Dr Feelgood,2.7,63 +146,Dr Feelgood,7.7,235 +146,Dr Feelgood,0.3,415 +146,Dr Feelgood,8.3,216 +146,Dr Feelgood,5.1,270 +146,Dr Feelgood,3.4,46 +146,Dr Feelgood,0.3,324 +146,Dr Feelgood,8.3,406 +146,Dr Feelgood,8.1,5 +146,Dr Feelgood,8.1,311 +147,Cat Stevens,0.7,127 +147,Cat Stevens,5.8,241 +147,Cat Stevens,8.5,349 +147,Cat Stevens,1.9,198 +147,Cat Stevens,0.7,157 +147,Cat Stevens,0.1,144 +148,The Cure,1.7,309 +148,The Cure,2.6,343 +149,David Gilmour,0.1,111 +149,David Gilmour,6.9,392 +149,David Gilmour,4,36 +149,David Gilmour,4.5,341 +149,David Gilmour,2.6,343 +149,David Gilmour,4.8,430 +149,David Gilmour,8.1,109 +149,David Gilmour,6.4,383 +150,Nina Simone,6.2,385 +150,Nina Simone,2.5,162 +150,Nina Simone,0.4,253 +150,Nina Simone,4.8,104 +150,Nina Simone,2.5,232 +150,Nina Simone,3.5,58 +150,Nina Simone,8.5,275 +151,Flaming Lips,8.3,431 +151,Flaming Lips,1.3,479 +151,Flaming Lips,2.1,12 +152,B.B. King,1.4,440 +152,B.B. King,4.4,352 +152,B.B. King,7.5,296 +152,B.B. King,3.6,411 +152,B.B. King,2.2,332 +152,B.B. King,5,436 +152,B.B. King,4,16 +152,B.B. King,0.4,80 +152,B.B. King,4.3,191 +153,Frank Zappa,2.5,397 +153,Frank Zappa,4.3,166 +153,Frank Zappa,7.4,164 +153,Frank Zappa,7.6,242 +153,Frank Zappa,7.8,464 +153,Frank Zappa,4.8,459 +154,Oasis,3.2,337 +154,Oasis,3.4,303 +154,Oasis,0,335 +154,Oasis,4.9,234 +154,Oasis,4.9,260 +154,Oasis,8.5,275 +154,Oasis,3.5,52 +154,Oasis,2.8,432 +154,Oasis,7.4,1 +155,The Mars Volta,4.4,330 +155,The Mars Volta,3.9,135 +155,The Mars Volta,1.1,223 +155,The Mars Volta,7.8,374 +155,The Mars Volta,7.8,315 +155,The Mars Volta,6.9,448 +155,The Mars Volta,5.6,249 +155,The Mars Volta,2,134 +155,The Mars Volta,8.8,209 +156,PJ Harvey,5.4,355 +156,PJ Harvey,6.8,228 +156,PJ Harvey,1.3,388 +156,PJ Harvey,7.1,117 +156,PJ Harvey,2.5,359 +156,PJ Harvey,6.1,451 +156,PJ Harvey,6.6,123 +156,PJ Harvey,6.7,463 +157,Florence and the Machine,5.2,194 +157,Florence and the Machine,1.5,243 +157,Florence and the Machine,0.6,295 +157,Florence and the Machine,6.6,123 +157,Florence and the Machine,2.9,206 +158,Kiss,3.8,7 +158,Kiss,2.7,390 +158,Kiss,1.2,401 +158,Kiss,7.5,296 +158,Kiss,0.5,412 +158,Kiss,0.1,427 +158,Kiss,6.7,463 +159,Cootie Williams,1.2,146 +159,Cootie Williams,4.1,274 +159,Cootie Williams,2.3,74 +159,Cootie Williams,2.5,152 +159,Cootie Williams,4.8,459 +159,Cootie Williams,5.1,466 +159,Cootie Williams,4.8,368 +159,Cootie Williams,7.8,315 +160,Joni Mitchell,0.3,415 +160,Joni Mitchell,0.5,320 +160,Joni Mitchell,3,262 +160,Joni Mitchell,2.7,267 +160,Joni Mitchell,6.9,372 +160,Joni Mitchell,4.4,222 +160,Joni Mitchell,1,163 +160,Joni Mitchell,8.1,279 +160,Joni Mitchell,5.6,426 +161,Mumford and Sons,5.3,283 +161,Mumford and Sons,5.5,280 +161,Mumford and Sons,5.4,176 +162,The Police,2.7,390 +162,The Police,8.2,422 +162,The Police,3.6,269 +162,The Police,7.5,181 +162,The Police,5,204 +163,Bob Dylan,6.1,286 +163,Bob Dylan,7.4,210 +163,Bob Dylan,4.5,93 +163,Bob Dylan,1.5,243 +163,Bob Dylan,1.4,395 +163,Bob Dylan,0.1,298 +163,Bob Dylan,1.9,248 +163,Bob Dylan,5.1,270 +163,Bob Dylan,6,39 +163,Bob Dylan,0.6,126 +164,The Faces,2.8,310 +164,The Faces,3.8,468 +164,The Faces,6.9,454 +164,The Faces,5.9,169 +164,The Faces,5,255 +164,The Faces,8.1,279 +164,The Faces,3.9,376 +164,The Faces,8.7,186 +164,The Faces,1.3,479 +164,The Faces,7.2,314 +164,The Faces,1.7,356 +165,Marianne Faithfull,4.8,430 +165,Marianne Faithfull,1.7,356 +165,Marianne Faithfull,8.7,186 +165,Marianne Faithfull,7.8,407 +165,Marianne Faithfull,5.9,89 +165,Marianne Faithfull,2.8,282 +165,Marianne Faithfull,6.1,318 +165,Marianne Faithfull,1.9,248 +165,Marianne Faithfull,6.6,123 +166,Horace Silver,6.9,392 +166,Horace Silver,2.8,44 +167,Johnny Cash,3.6,323 +167,Johnny Cash,7.2,192 +167,Johnny Cash,8.3,474 +167,Johnny Cash,5.5,280 +167,Johnny Cash,3.5,52 +168,John Lydon,6.9,471 +168,John Lydon,7.1,348 +168,John Lydon,2,134 +168,John Lydon,3.6,323 +168,John Lydon,7.2,17 +168,John Lydon,1.5,317 +168,John Lydon,4.5,240 +169,Elvis Costello,4.8,150 +169,Elvis Costello,6.7,189 +169,Elvis Costello,6.8,272 +169,Elvis Costello,6.4,53 +169,Elvis Costello,4.4,393 +169,Elvis Costello,1.2,351 +169,Elvis Costello,5.8,73 +169,Elvis Costello,4.1,55 +169,Elvis Costello,0.2,304 +170,James Brown,4.7,294 +170,James Brown,2.3,224 +170,James Brown,4.8,430 +170,James Brown,3.9,165 +170,James Brown,8.1,311 +170,James Brown,6.8,228 +170,James Brown,0.1,478 +170,James Brown,4.7,225 +171,Yumi Matsutoya,4.2,410 +171,Yumi Matsutoya,7.9,445 +171,Yumi Matsutoya,0.6,295 +171,Yumi Matsutoya,6.3,86 +171,Yumi Matsutoya,8.7,186 +171,Yumi Matsutoya,2.9,178 +171,Yumi Matsutoya,0.7,157 +171,Yumi Matsutoya,6.9,291 +172,Tina Turner,5.9,169 +172,Tina Turner,6.9,37 +173,Catherine Wheel,4.5,287 +173,Catherine Wheel,8.1,434 +173,Catherine Wheel,4.7,475 +174,Neil Young,2.8,282 +174,Neil Young,2.3,203 +175,Kasabian,8.2,422 +175,Kasabian,2.3,74 +175,Kasabian,2.6,92 +175,Kasabian,6.4,383 +175,Kasabian,9,284 +175,Kasabian,2.3,442 +175,Kasabian,5.8,421 +175,Kasabian,4.2,410 +175,Kasabian,3.8,468 +175,Kasabian,4.4,358 +175,Kasabian,0,201 +176,Run-D.M.C.,6.3,218 +176,Run-D.M.C.,2,219 +176,Run-D.M.C.,2.7,472 +177,Tom Jones,5.4,158 +177,Tom Jones,2.8,326 +177,Tom Jones,3.8,7 +177,Tom Jones,8.2,220 +177,Tom Jones,0.2,68 +177,Tom Jones,6.4,53 +178,Thin Lizzy,7.4,429 +178,Thin Lizzy,7.8,407 +179,Alan Parsons,1.2,146 +179,Alan Parsons,4.9,260 +179,Alan Parsons,5.8,122 +179,Alan Parsons,7.2,252 +179,Alan Parsons,5.1,70 +179,Alan Parsons,8.2,423 +179,Alan Parsons,2.1,12 +180,Squeeze,0.3,378 +180,Squeeze,4.5,341 +180,Squeeze,2,179 +180,Squeeze,2.4,322 +180,Squeeze,7.1,348 diff --git a/data/staff.csv b/data/staff.csv new file mode 100644 index 0000000..b8bcb98 --- /dev/null +++ b/data/staff.csv @@ -0,0 +1,229 @@ +staff_id,name,dob,role,iban,bic,location_id +3,Velva Shields,1976-07-30,Back-of-house,GB49VHZF63392981589063,AAPUGB21,1 +4,Francesco Schinner,1997-07-01,Back-of-house,GB90IBXP65333147911131,ABECGB21,18 +5,Annis Murphy,1973-08-05,Chef,GB07WSYW09428726298111,MORLGB2LSMK,15 +10,Colby Schneider,1961-09-17,Front-of-house,GB38AWWR50990562708583,ABCEGB2L,10 +10,Colby Schneider,1961-09-17,Front-of-house,GB38AWWR50990562708583,ABCEGB2L,21 +11,Ebonie Kulas,1981-07-20,Chef,GB23TWJN07114211962422,BRBAGB2LXXX,1 +11,Ebonie Kulas,1981-07-20,Chef,GB23TWJN07114211962422,BRBAGB2LXXX,8 +13,Susannah Nikolaus,2003-06-19,Front-of-house,GB34RKHB05228084942414,AAPUGB21,25 +18,Carey Stark,1983-04-12,Chef,GB09TMGC40313807115422,ANTSGB2LCHA,4 +19,Max Von,1973-06-17,Front-of-house,GB95WARH45702360813776,BOFAGB3SSWI,15 +26,Marianne Gleason,2004-04-26,Manager,GB57XLTN54112387347041,AAFMGB21,14 +26,Marianne Gleason,2004-04-26,Manager,GB57XLTN54112387347041,AAFMGB21,5 +34,Mirta Kling,1963-02-24,Chef,GB96HSLT55226111868859,BCYPGB2LSSB,25 +38,Wynell Shanahan,1999-12-19,Chef,GB51TZJE18756895115697,BARBGB2LHAR,10 +49,Steven Ullrich,1989-01-07,Manager,GB34XEOA54648220572624,AAOGGB21,13 +58,Jeromy Crooks,1985-09-16,Chef,GB82ZCKA98732193522802,BCYPGB2LCBB,18 +60,Lincoln Ratke,2001-01-17,Manager,GB63RCDH89432369051188,BOFAGB22CLS,7 +64,Elisa Walker,1992-02-15,Chef,GB96IQFC03305398810701,BARBGB2LKEN,20 +64,Elisa Walker,1992-02-15,Chef,GB96IQFC03305398810701,BARBGB2LKEN,19 +65,Letisha Kerluke,1983-11-15,Back-of-house,GB73TEBY11864260859093,ABECGB21,12 +65,Letisha Kerluke,1983-11-15,Back-of-house,GB73TEBY11864260859093,ABECGB21,21 +66,Shila Kiehn,1992-11-17,Back-of-house,GB30BPAY81605433269975,UBKLGB2LXXX,14 +71,Jess Dach,1958-09-07,Manager,GB42SCZZ31902339749661,BARBGB2LMAN,17 +71,Jess Dach,1958-09-07,Manager,GB42SCZZ31902339749661,BARBGB2LMAN,2 +71,Jess Dach,1958-09-07,Manager,GB42SCZZ31902339749661,BARBGB2LMAN,12 +74,Carmelia Windler,1994-03-27,Manager,GB24SKDY60291666614230,ABBYGB2L,20 +75,Colby Kihn,1991-12-06,Manager,GB37PGFJ39151205911792,ALEIGB22TSY,15 +77,Tim Wiza,1984-01-04,Back-of-house,GB40RQNX21706322621391,BOFAGB4TLTR,14 +78,Gail Bergstrom,1961-10-29,Front-of-house,GB34PZUQ10307892228791,BCYPGB2LHGB,11 +80,Myrl Koss,1996-04-28,Front-of-house,GB60ASPH63559871609244,BCYPGB2LMBB,13 +81,Darcel Goldner,1977-03-11,Chef,GB00QXSA90103596728736,ABMNGB21,21 +82,Robert Beatty,1998-05-10,Back-of-house,GB91LNPS34271128244937,AAPUGB21,15 +84,Ernestine Heathcote,1965-09-04,Manager,GB32NAJE75538576114320,BCYPGB2LBBB,22 +84,Ernestine Heathcote,1965-09-04,Manager,GB32NAJE75538576114320,BCYPGB2LBBB,24 +89,Kendall O'Keefe,1959-05-27,Chef,GB22OPIS36572741317495,BOFAGB4TLTR,24 +89,Kendall O'Keefe,1959-05-27,Chef,GB22OPIS36572741317495,BOFAGB4TLTR,4 +91,Adrien Kulas,1991-10-01,Manager,GB01RPQF79892788937928,BOFAGB4TLTR,4 +93,Phyliss Marquardt,1983-01-07,Manager,GB83FUGD54313704556323,BARBGB2LKIL,12 +100,Lilly Wehner,1985-04-19,Front-of-house,GB86QZUQ75703660932707,BARBGB2LWEM,7 +103,Domenic Kris,1960-02-26,Back-of-house,GB36HPTZ58057284847037,ABNAGB21VOC,14 +104,Janeth Buckridge,2004-03-15,Back-of-house,GB71SYTY08112644254057,BOFAGB4TCDO,21 +105,Adrienne Schinner,1960-04-04,Manager,GB66WLXU82175827402788,ABCMGB21,8 +105,Adrienne Schinner,1960-04-04,Manager,GB66WLXU82175827402788,ABCMGB21,23 +110,Jaye Lind,1959-01-22,Chef,GB69PPMX26820382390671,BSABGB2LXXX,4 +111,Bryon Hudson,1987-07-12,Manager,GB51TUCE94935983068812,ABECGB21,6 +112,Brant Hahn,1996-11-16,Chef,GB20FZIK02789896201935,BRBAGB2LXXX,24 +112,Brant Hahn,1996-11-16,Chef,GB20FZIK02789896201935,BRBAGB2LXXX,15 +114,Fernande Kuhlman,1968-05-07,Front-of-house,GB63VSER00877111863458,AAHOGB21,10 +115,Reid Boyle,1965-07-15,Manager,GB49WEZS91600810335229,BOFAGB22OF2,13 +115,Reid Boyle,1965-07-15,Manager,GB49WEZS91600810335229,BOFAGB22OF2,1 +116,Madelene Treutel,1967-02-13,Back-of-house,GB19SRTH94494784444193,UBKLGB2LXXX,9 +118,Almeda D'Amore,2001-12-08,Front-of-house,GB90OZQP49512525832680,AAHVGB21,5 +129,Mariella Hirthe,1999-11-03,Back-of-house,GB09IDQS36334268167330,ASTPGB2LXXX,17 +131,Justin Runolfsdottir,1969-02-17,Back-of-house,GB42BRQS71549350867095,AAPEGB21,15 +132,Libbie Marquardt,1972-02-13,Back-of-house,GB13GBBA82126884795575,BCYPGB2LCBB,20 +132,Libbie Marquardt,1972-02-13,Back-of-house,GB13GBBA82126884795575,BCYPGB2LCBB,16 +136,Mabel Miller,1964-02-29,Manager,GB63LQPV63547046367733,ANTSGB2LXXX,8 +140,Leslie Cormier,1978-01-20,Back-of-house,GB52HJCZ86854210013245,BCYPGB2LPGB,17 +140,Leslie Cormier,1978-01-20,Back-of-house,GB52HJCZ86854210013245,BCYPGB2LPGB,23 +140,Leslie Cormier,1978-01-20,Back-of-house,GB52HJCZ86854210013245,BCYPGB2LPGB,11 +141,Althea Gutkowski,1985-02-28,Back-of-house,GB67XSQK47832222689203,BCYPGB2LBBB,3 +143,Nanette Roberts,1969-01-04,Front-of-house,GB08WUMM09293671993867,BCYPGB2LHHB,17 +148,Josefina Prosacco,1961-03-20,Front-of-house,GB70BQAU70457502125560,AIBKGB2XTSY,2 +149,Jolie Bradtke,1961-04-25,Back-of-house,GB40WOTI07985236959319,BOFAGB22SEC,17 +149,Jolie Bradtke,1961-04-25,Back-of-house,GB40WOTI07985236959319,BOFAGB22SEC,15 +151,Scottie Brakus,1958-04-09,Manager,GB25ODKU55343109997511,ABNAGB21VOC,3 +151,Scottie Brakus,1958-04-09,Manager,GB25ODKU55343109997511,ABNAGB21VOC,5 +151,Scottie Brakus,1958-04-09,Manager,GB25ODKU55343109997511,ABNAGB21VOC,20 +152,Era Pagac,1969-01-08,Chef,GB00ZISY65189340417548,BCYPGB2LMBB,3 +154,Candida Smith,2003-01-02,Back-of-house,GB26SBTA15606973591833,BRBAGB2LXXX,8 +155,Keith Bashirian,1973-04-23,Chef,GB45GZLP40023366222634,AAQIGB21,4 +160,Royce Russel,1996-12-01,Front-of-house,GB43XDPJ84218986936639,ABMNGB21,24 +161,Quyen Tremblay,1982-05-21,Manager,GB49DQZK13288766743548,BCYPGB2LSSB,12 +163,Eloy Stamm,1982-03-14,Back-of-house,GB94WSEC31100971536634,BCYPGB2LSSB,8 +173,Evan Larson,1964-10-15,Chef,GB23PSXH87170236268599,BOFAGB22SEC,11 +174,Ricky Roberts,1958-04-23,Manager,GB91LAKF35479017784034,AIBKGB2XTSY,18 +176,Royce Dach,1981-05-07,Front-of-house,GB02UWOJ19036320706919,BSABGB2LXXX,5 +176,Royce Dach,1981-05-07,Front-of-house,GB02UWOJ19036320706919,BSABGB2LXXX,1 +176,Royce Dach,1981-05-07,Front-of-house,GB02UWOJ19036320706919,BSABGB2LXXX,11 +176,Royce Dach,1981-05-07,Front-of-house,GB02UWOJ19036320706919,BSABGB2LXXX,10 +177,Autumn Ernser,1989-02-07,Chef,GB24SXLS00831063800638,BCYPGB2LMBB,16 +181,Sarita Greenholt,1969-10-07,Front-of-house,GB78VZCN95056402070198,BOFAGB22SEC,10 +183,Mirella Luettgen,2000-05-14,Front-of-house,GB18VHCF48274094344569,UBKLGB2LBAK,13 +183,Mirella Luettgen,2000-05-14,Front-of-house,GB18VHCF48274094344569,UBKLGB2LBAK,23 +186,Reyes Cassin,2000-12-14,Front-of-house,GB70YXZY67553364519711,BSCHGB2LEQU,12 +190,Santiago Muller,1999-09-10,Manager,GB86IWAA52730168475899,BOFAGB4TIPA,10 +191,Emmanuel Prohaska,1995-10-12,Back-of-house,GB68WKOO29383095495107,BOFAGB4TLTR,22 +193,Alvaro Weimann,1983-11-06,Back-of-house,GB26WQCG45256708582889,BSCHGB2LEQU,17 +197,Tracy Nolan,1985-12-14,Front-of-house,GB67JCHX67255030705038,BARBGB2LLEI,13 +198,Junko Gislason,1998-11-27,Chef,GB69BCRL75628399910701,BCEYGB2LXXX,16 +199,Jarvis Maggio,1986-11-30,Back-of-house,GB38ADQO73757099056704,UBKLGB2LXXX,16 +201,Marx Leuschke,1967-10-09,Manager,GB17RWGU81603995514470,BCYPGB2LBBB,6 +201,Marx Leuschke,1967-10-09,Manager,GB17RWGU81603995514470,BCYPGB2LBBB,19 +206,Jacquie Hahn,1984-03-28,Chef,GB38HNVN77496403914738,BOFAGB4TIPA,21 +207,Kim Russel,1994-04-19,Front-of-house,GB93PPQN03427111892112,ALEIGB22TSY,13 +209,James Champlin,1979-12-14,Back-of-house,GB88AMTI52673020854343,BARBGB2LHAR,14 +211,Annamae Wehner,2001-01-04,Front-of-house,GB44WWNR72226717450213,ABDIGB21,22 +218,Santo Hills,1958-06-17,Chef,GB37KHEL41079911516428,BRBAGB2LXXX,15 +218,Santo Hills,1958-06-17,Chef,GB37KHEL41079911516428,BRBAGB2LXXX,9 +219,Emerita Wisozk,1968-05-11,Back-of-house,GB70MLLE31844854507109,BCYPGB2LCBB,12 +220,Rashad Ziemann,1999-09-05,Front-of-house,GB82XAWR57338597684711,BCEYGB2LXXX,23 +221,Shaquana Rempel,1985-08-24,Chef,GB94MUBM17190663603035,ANTSGB2LXXX,2 +223,Magdalen Dibbert,1989-09-14,Front-of-house,GB82NYOX73296512618603,BOFAGB4TCCD,5 +223,Magdalen Dibbert,1989-09-14,Front-of-house,GB82NYOX73296512618603,BOFAGB4TCCD,14 +225,Reid Lehner,1987-09-20,Manager,GB82HJYJ27514628395265,BARBGB2LKEN,4 +225,Reid Lehner,1987-09-20,Manager,GB82HJYJ27514628395265,BARBGB2LKEN,21 +226,Nancee Spencer,1963-03-28,Chef,GB51BMUU80005105824076,ABCCGB22,21 +229,Mardell McGlynn,1971-01-26,Front-of-house,GB05IHNG26518591296369,ABCEGB2L,8 +229,Mardell McGlynn,1971-01-26,Front-of-house,GB05IHNG26518591296369,ABCEGB2L,7 +235,Luke Luettgen,1967-08-14,Manager,GB69FEVO13799323085050,BCYPGB2LMBB,14 +235,Luke Luettgen,1967-08-14,Manager,GB69FEVO13799323085050,BCYPGB2LMBB,21 +239,Carson Carroll,1999-07-24,Back-of-house,GB21OGNQ19656578764086,BOFAGB4TIPA,13 +242,Buford Conroy,1996-11-27,Manager,GB85VASB86064196512823,BCYPGB2LHGB,13 +245,Mario Raynor,1967-11-24,Back-of-house,GB92QAOS11875777928022,AKBKGB22XXX,25 +251,Bennie Spencer,1998-12-31,Back-of-house,GB13TCNV29301073265943,AAPUGB21,16 +253,Jessi Schneider,1986-07-22,Chef,GB30IEXW35988459810987,ABECGB21,21 +254,Luise Leuschke,1999-04-20,Back-of-house,GB54EYAF43961303998775,AAHOGB21,16 +260,Guillermo Gutmann,1992-09-04,Chef,GB00NSYE25909808174944,BCYPGB2LPGB,24 +262,Luanna Collins,1984-09-02,Front-of-house,GB06JRWF21663302362026,BARBGB2LWEM,23 +263,Lauralee Williamson,1978-06-12,Front-of-house,GB50ORAA88271035571260,AAHOGB21,15 +264,Billy Schiller,1966-08-23,Front-of-house,GB15FBNW46106361064761,BOFAGB4TCCD,7 +265,Carlton Brekke,1992-06-12,Front-of-house,GB53KYOL23699379537776,BCYPGB2LBBB,13 +268,Ed Senger,1976-12-09,Chef,GB58VBAN89226658213395,ABDIGB21,25 +268,Ed Senger,1976-12-09,Chef,GB58VBAN89226658213395,ABDIGB21,18 +268,Ed Senger,1976-12-09,Chef,GB58VBAN89226658213395,ABDIGB21,15 +271,Seth Schoen,1986-02-17,Manager,GB12CNMG08810025994073,BARBGB2LTOO,5 +273,Clifton Gleason,1967-12-10,Front-of-house,GB35QIXA71070893506098,BOFAGB3SSWI,9 +275,Margret Becker,2002-05-18,Manager,GB81DVWU94701976935216,ANTSGB2LXXX,10 +278,Joanne Ziemann,2001-02-05,Back-of-house,GB79IUEX29901411517346,BARBGB2LKEN,2 +278,Joanne Ziemann,2001-02-05,Back-of-house,GB79IUEX29901411517346,BARBGB2LKEN,6 +278,Joanne Ziemann,2001-02-05,Back-of-house,GB79IUEX29901411517346,BARBGB2LKEN,18 +279,Markita Lang,1961-03-02,Front-of-house,GB72LNZT82005134199193,UBKLGB2LBAK,1 +280,Lakesha Jacobson,1993-03-22,Manager,GB16CHLP30129504586626,BKCHGB2UXXX,12 +281,Richard Smitham,1978-06-24,Front-of-house,GB61CQLD98537039076825,ABFIGB21,1 +286,Noma Kreiger,1965-06-05,Manager,GB37URCV31077452213083,BSABGB2LXXX,15 +286,Noma Kreiger,1965-06-05,Manager,GB37URCV31077452213083,BSABGB2LXXX,24 +291,Ellis Murphy,1980-05-28,Back-of-house,GB91HZFA74863292613872,BARBGB2LKEN,19 +292,Chana Runolfsdottir,1981-10-15,Front-of-house,GB02GLWW00629724502045,UBKLGB2LBAK,13 +292,Chana Runolfsdottir,1981-10-15,Front-of-house,GB02GLWW00629724502045,UBKLGB2LBAK,19 +293,Charlyn Harris,1968-10-18,Front-of-house,GB82MRSO10976367246513,BCYPGB2LMBB,16 +296,Kurt Dibbert,2003-09-16,Manager,GB70BXJC98529333415690,ABBEGB21,5 +296,Kurt Dibbert,2003-09-16,Manager,GB70BXJC98529333415690,ABBEGB21,16 +297,Kyle Herman,1979-10-21,Back-of-house,GB45SWWV65883222447496,BCYPGB2LCSB,13 +298,Lorenzo Will,1985-11-29,Chef,GB95DUHL01106945496092,AIBKGB2XTSY,1 +300,Junko Blanda,1984-11-28,Manager,GB55ECCI27681943552413,BOFAGB4TIPA,16 +302,Cary Beatty,1968-04-27,Back-of-house,GB21AWZX39530849623512,ANTSGB2LCHA,12 +306,Maren Moore,1996-04-11,Manager,GB34IXOE09052502094150,ABBYGB2L,5 +308,Roseline Jacobi,1958-10-10,Manager,GB22JMCG75349293299324,BOFAGB4TIPA,13 +309,Cherlyn Koepp,1973-06-04,Chef,GB22IQQG23431684835478,ASTPGB2LXXX,2 +310,My Schaefer,1962-04-16,Front-of-house,GB53VHXY47777604981466,BOFAGB4TIPA,2 +312,Jessika Kling,1997-02-25,Chef,GB14LSVJ51479057766494,AIBKGB2XTSY,19 +313,Peggy Maggio,1970-12-21,Chef,GB18GWTO74196264110446,BCYPGB2LCBB,1 +314,Wilson Durgan,1971-10-14,Chef,GB75RKAH26591122206664,BOFAGB4TCCD,10 +315,Johnson Connelly,1982-04-23,Back-of-house,GB70ZDJS85044035206092,BARBGB2LWEM,17 +316,Glynis Kihn,1991-04-28,Chef,GB54EDQZ43797101888275,BOFAGB22OF2,20 +318,Winfred Dibbert,1993-06-28,Front-of-house,GB90MPRB02866286298245,ABAZGB21,16 +318,Winfred Dibbert,1993-06-28,Front-of-house,GB90MPRB02866286298245,ABAZGB21,18 +320,Ilda Spinka,1985-01-18,Manager,GB53WUAT54464473700585,UBKLGB2LBAK,21 +320,Ilda Spinka,1985-01-18,Manager,GB53WUAT54464473700585,UBKLGB2LBAK,24 +321,Clifton Dooley,1974-08-27,Chef,GB16UHLC32299347006143,BARBGB2LKEN,9 +322,Vella Altenwerth,1959-10-28,Back-of-house,GB37OUGN96362439079882,BOFAGB22XXX,14 +323,Nicholas Mertz,1983-02-12,Back-of-house,GB54IWTO90065286341923,BOFAGB4TCDO,24 +323,Nicholas Mertz,1983-02-12,Back-of-house,GB54IWTO90065286341923,BOFAGB4TCDO,3 +324,Hang Muller,1998-09-19,Manager,GB49VNSE78610138519613,BCYPGB2LXXX,8 +330,Christian Cummings,1978-10-31,Chef,GB42YVWL91685131924615,AACCGB21,4 +333,Johnie Jacobi,1966-12-14,Chef,GB94EVHL52135366712909,AANLGB2L,1 +335,Karlyn Wuckert,1968-05-19,Back-of-house,GB04NMRI69140606117340,BARBGB2LHAR,11 +343,Kim Cormier,1978-06-10,Back-of-house,GB56KRMR85768072537308,BCEYGB2LXXX,18 +349,Raymond Luettgen,2003-10-03,Back-of-house,GB72RPRN15357469606200,ABDIGB21,22 +356,Marlana Schmitt,1967-12-26,Back-of-house,GB74RKVA49130710136014,BKCHGB2LXXX,12 +356,Marlana Schmitt,1967-12-26,Back-of-house,GB74RKVA49130710136014,BKCHGB2LXXX,3 +357,August Blanda,1958-11-07,Front-of-house,GB02RBPS78918948314709,ABECGB21,7 +357,August Blanda,1958-11-07,Front-of-house,GB02RBPS78918948314709,ABECGB21,20 +360,Hildegarde Kertzmann,1959-06-11,Manager,GB36DLAX06490893415041,BCYPGB2LMBB,19 +366,Tawnya Hyatt,1965-08-03,Back-of-house,GB17KAKR50141723831870,ABBEGB21,3 +367,Tequila Emmerich,1987-04-01,Chef,GB06DCSW97790727357715,AKBKGB22XXX,24 +372,Bunny Kilback,1971-02-09,Back-of-house,GB80QCAY09507481240532,BSABGB2LXXX,10 +373,Elfriede Jacobi,1995-09-25,Manager,GB31IFPX90423907352124,ABNAGB21VOC,19 +377,Jerry Rempel,1989-02-22,Front-of-house,GB87RCBN53791063991064,BOFAGB4TLTR,5 +377,Jerry Rempel,1989-02-22,Front-of-house,GB87RCBN53791063991064,BOFAGB4TLTR,3 +384,Ranee Bartell,1974-07-26,Chef,GB01YWJA72052400428829,BARBGB2LBIR,6 +386,Rubi Fritsch,1970-01-31,Front-of-house,GB77BPVY06703409069655,BSABGB2LXXX,2 +390,Kenna Ferry,1994-09-22,Manager,GB78SLAB80969820069354,BARBGB2LKIL,17 +390,Kenna Ferry,1994-09-22,Manager,GB78SLAB80969820069354,BARBGB2LKIL,9 +396,Florinda Prosacco,1993-08-12,Back-of-house,GB41AUIV64749023438373,AKBKGB22XXX,12 +403,Stevie Powlowski,1974-04-06,Front-of-house,GB47MPTC99896003728480,BARBGB2LLEI,5 +404,Edna Ortiz,1997-06-26,Chef,GB18ELGL36039636565048,BCYPGB2LCSB,14 +406,Frankie Russel,2004-02-21,Front-of-house,GB52PZMR99168879708814,BKCHGB2LXXX,22 +409,Chance Gorczany,1959-01-29,Chef,GB79PPWI12566603159198,ASTPGB2LXXX,9 +414,Michael Carter,1987-07-23,Front-of-house,GB34SFTB98334800926096,BCYPGB2LCSB,1 +421,Roman Nolan,1994-10-14,Front-of-house,GB15VDAF88477079361438,AAPUGB21,19 +422,Roosevelt Lind,2003-11-01,Front-of-house,GB75VDPY08273138633156,MORLGB2LSMK,7 +424,Gayla Hilpert,1967-01-01,Back-of-house,GB10IYLT57324632437626,BCYPGB2LHGB,6 +425,Jeanette Jacobi,1963-02-27,Manager,GB54GVLY70250424583368,BCEYGB2LXXX,22 +429,Tyson Bernier,1987-01-29,Front-of-house,GB95CHGF68420957192643,BCYPGB2LHHB,4 +430,Georgine Boyle,1982-08-01,Chef,GB32ZWMU21260218944063,BKCHGB2LXXX,24 +431,Mason Fahey,1965-05-20,Back-of-house,GB34KJGK14413091739827,BCYPGB2LPGB,19 +433,King Heaney,1968-10-15,Chef,GB17SXNT72071823673394,ABAZGB21,25 +437,Osvaldo Wisoky,1972-06-11,Manager,GB51RGYQ49033418528530,UBKLGB2LXXX,21 +439,Claretha Beier,1974-01-24,Manager,GB17SDUM14959436448069,BCYPGB2LSSB,7 +439,Claretha Beier,1974-01-24,Manager,GB17SDUM14959436448069,BCYPGB2LSSB,21 +440,Demetria Schmitt,1964-02-07,Manager,GB89NNVJ54845695863663,ASTPGB2LXXX,25 +442,George Abernathy,1984-10-02,Back-of-house,GB00BCCR18231392388996,BOFAGB4TCDO,23 +447,Nickolas Howe,1976-02-08,Back-of-house,GB86BRUQ04702361093153,UBKLGB2LXXX,1 +448,Cammy Muller,1984-03-28,Back-of-house,GB04SKFC31409034650989,UBKLGB2LXXX,5 +449,Ike Ruecker,1986-01-26,Front-of-house,GB46WFSE63089961441180,ASTPGB2LXXX,15 +456,Adrianna Dickinson,1987-08-09,Front-of-house,GB78MYGW38696733074867,BOFAGB22OF2,2 +457,Jerrie Labadie,1994-12-10,Front-of-house,GB47KDFE10105521463798,BRBAGB2LXXX,18 +457,Jerrie Labadie,1994-12-10,Front-of-house,GB47KDFE10105521463798,BRBAGB2LXXX,22 +458,Marcel Lebsack,1994-10-13,Chef,GB22STYO02079918033997,AIBKGB2XTSY,8 +459,Moshe Keebler,1993-08-03,Chef,GB55BDUF11490242201350,BRBAGB2LXXX,2 +460,Efren Stoltenberg,1976-07-23,Manager,GB36AKGB65642692847818,BCYPGB2LMBB,1 +461,Tangela Macejkovic,1984-06-01,Chef,GB86FLOZ05076268461191,BARBGB2LHAR,20 +462,Erika Wuckert,1996-09-04,Manager,GB68XNMT42931830204463,AAPUGB21,19 +463,Cordie Boyer,2002-02-14,Chef,GB51BNED64923491051047,BCYPGB2LHHB,17 +465,Phyllis Kozey,1991-01-20,Front-of-house,GB61DICT11998888045934,ABCCGB22,6 +465,Phyllis Kozey,1991-01-20,Front-of-house,GB61DICT11998888045934,ABCCGB22,13 +474,Patricia Collier,2004-07-22,Back-of-house,GB59OZLT98945727739997,BARBGB2LLEI,3 +476,Deangelo Herzog,1959-11-23,Back-of-house,GB74ACOA59973202032648,ABNAGB21VOC,18 +476,Deangelo Herzog,1959-11-23,Back-of-house,GB74ACOA59973202032648,ABNAGB21VOC,8 +478,Earle Mohr,1978-07-26,Chef,GB25IZTM25490432605241,UBKLGB2LBAK,13 +483,Tonie Harber,1994-02-22,Manager,GB74LSMD34310759229259,BOFAGB4TCCD,19 +485,Francisca Reinger,1963-10-30,Manager,GB96MJUQ10456090300226,BCYPGB2LSSB,8 +486,Rod Klocko,1984-08-30,Manager,GB42BGMY93659098949023,BCYPGB2LHHB,11 +488,Cary Monahan,2002-08-05,Chef,GB02ELWE14707152246450,BKCHGB2UXXX,18 +495,Francis Johns,1997-01-30,Manager,GB04ORUU51864585813658,AAHOGB21,1 +499,Tai Gorczany,1979-10-31,Back-of-house,GB65GBYV05951692415736,BCYPGB2LPGB,4 +500,Rhett Lockman,1991-01-02,Manager,GB00QALG59442278795275,ASTPGB2LXXX,24 diff --git a/database/migrations/env.py b/database/migrations/env.py index 5f843ff..b16ed80 100644 --- a/database/migrations/env.py +++ b/database/migrations/env.py @@ -3,6 +3,7 @@ from alembic import context from sqlalchemy import engine_from_config, pool +from weird_salads.inventory.repository import models as inv_models # noqa: 402 from weird_salads.orders.repository import models as orders_models # noqa: 402 from weird_salads.utils.sqlalchemy_base import Base diff --git a/database/migrations/versions/357a74ba46e5_add_tables.py b/database/migrations/versions/357a74ba46e5_add_tables.py new file mode 100644 index 0000000..d9e01d7 --- /dev/null +++ b/database/migrations/versions/357a74ba46e5_add_tables.py @@ -0,0 +1,107 @@ +"""add tables + +Revision ID: 357a74ba46e5 +Revises: d5be4204230b +Create Date: 2024-08-05 11:05:54.345842 + +""" +from typing import Sequence, Union + +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision: str = "357a74ba46e5" +down_revision: Union[str, None] = "d5be4204230b" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.create_table( + "ingredients", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("name", sa.String(), nullable=False), + sa.Column("description", sa.String(), nullable=True), + sa.PrimaryKeyConstraint("id"), + sa.UniqueConstraint("name"), + ) + op.create_table( + "menu", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("name", sa.String(), nullable=False), + sa.Column("description", sa.String(), nullable=True), + sa.Column("price", sa.Float(), nullable=False), + sa.Column("created_on", sa.DateTime(), nullable=True), + sa.Column("on_menu", sa.Boolean(), nullable=True), + sa.CheckConstraint("price >= 0.0", name="check_price_non_negative"), + sa.PrimaryKeyConstraint("id"), + ) + op.create_table( + "recipe_ingredients", + sa.Column("recipe_id", sa.Integer(), nullable=False), + sa.Column("ingredient_id", sa.Integer(), nullable=False), + sa.Column("quantity", sa.Float(), nullable=False), + sa.Column( + "unit", + sa.Enum( + "liter", "deciliter", "centiliter", "milliliter", name="unitofmeasure" + ), + nullable=False, + ), + sa.CheckConstraint("quantity >= 0.0", name="check_quantity_non_negative"), + sa.ForeignKeyConstraint( + ["ingredient_id"], + ["ingredients.id"], + ), + sa.ForeignKeyConstraint( + ["recipe_id"], + ["menu.id"], + ), + sa.PrimaryKeyConstraint("recipe_id", "ingredient_id"), + ) + op.create_index( + "idx_recipe_ingredient", + "recipe_ingredients", + ["recipe_id", "ingredient_id"], + unique=False, + ) + op.create_table( + "stock", + sa.Column("id", sa.String(), nullable=False), + sa.Column("ingredient_id", sa.Integer(), nullable=True), + sa.Column( + "unit", + sa.Enum( + "liter", "deciliter", "centiliter", "milliliter", name="unitofmeasure" + ), + nullable=False, + ), + sa.Column("quantity", sa.Float(), nullable=False), + sa.Column("cost", sa.Float(), nullable=False), + sa.Column("delivery_date", sa.DateTime(), nullable=True), + sa.Column("created_on", sa.DateTime(), nullable=True), + sa.CheckConstraint("cost >= 0.0", name="check_cost_non_negative"), + sa.CheckConstraint("quantity >= 0.0", name="check_quantity_non_negative"), + sa.ForeignKeyConstraint( + ["ingredient_id"], + ["ingredients.id"], + ), + sa.PrimaryKeyConstraint("id"), + ) + op.create_index("idx_stock_delivery_date", "stock", ["delivery_date"], unique=False) + op.create_index("idx_stock_ingredient", "stock", ["ingredient_id"], unique=False) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.drop_index("idx_stock_ingredient", table_name="stock") + op.drop_index("idx_stock_delivery_date", table_name="stock") + op.drop_table("stock") + op.drop_index("idx_recipe_ingredient", table_name="recipe_ingredients") + op.drop_table("recipe_ingredients") + op.drop_table("menu") + op.drop_table("ingredients") + # ### end Alembic commands ### diff --git a/docker/Dockerfile b/docker/Dockerfile index f26ed12..cf761d6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,7 +20,8 @@ COPY ../database/ /app/database ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MY_PACKAGE=0.0 RUN pip install --root-user-action=ignore --no-cache-dir . +ARG LOCATION_ID # Command to run FastAPI using Uvicorn # CMD ["uvicorn", "weird_salads.api.app:app", "--host", "0.0.0.0", "--port", "8000"] -CMD ["sh", "-c", "alembic upgrade head && uvicorn weird_salads.api.app:app --host 0.0.0.0 --port 8000"] +CMD ["sh", "-c", "alembic upgrade head && python weird_salads/utils/database/seed_db.py --location_id ${LOCATION_ID} --base_path data/ && uvicorn weird_salads.api.app:app --host 0.0.0.0 --port 8000"] # CMD ["sleep", "365d"] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c12b5b1..b6b28c5 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -9,6 +9,7 @@ services: - ../data/:/app/data/ # Mount the data environment: - DATABASE_URL=sqlite:///data/orders.db + - LOCATION_ID=1 # put as an environment variable streamlit: build: diff --git a/weird_salads/inventory/repository/models.py b/weird_salads/inventory/repository/models.py new file mode 100644 index 0000000..10c13d4 --- /dev/null +++ b/weird_salads/inventory/repository/models.py @@ -0,0 +1,144 @@ +""" +SQLalchemy Models +""" + +from datetime import datetime, timezone +from enum import Enum + +from sqlalchemy import Boolean, CheckConstraint, Column, DateTime +from sqlalchemy import Enum as SQLAEnum +from sqlalchemy import Float, ForeignKey, Index, Integer, String +from sqlalchemy.orm import relationship + +from weird_salads.utils.sqlalchemy_base import Base +from weird_salads.utils.utils import generate_str_uuid + +__all__ = [ + "UnitOfMeasure", + "MenuModel", + "IngredientsModel", + "RecipeIngredientModel", + "StockModel", +] + + +class UnitOfMeasure(Enum): + liter = "liter" + deciliter = "deciliter" + centiliter = "centiliter" + milliliter = "milliliter" + + +class MenuModel(Base): + __tablename__ = "menu" + + id = Column(Integer, primary_key=True) + name = Column(String, nullable=False) + description = Column(String, nullable=True) + price = Column(Float, nullable=False) + created_on = Column(DateTime, default=datetime.now(timezone.utc)) + on_menu = Column(Boolean, default=True) + + # is this why you can use "on_orm" ? + def dict(self): + return { + "id": self.id, + "name": self.name, + "description": self.description, + "price": self.price, + "created_on": self.created_on, + "on_menu": self.on_menu, + } + + __table_args__ = (CheckConstraint("price >= 0.0", name="check_price_non_negative"),) + + # Define relationship to RecipeIngredient + ingredients = relationship("RecipeIngredientModel", back_populates="recipe") + + +class IngredientsModel(Base): + __tablename__ = "ingredients" + + id = Column(Integer, primary_key=True) + name = Column(String, nullable=False, unique=True) + description = Column(String, nullable=True) + # standard_unit = Column(SQLAEnum(UnitOfMeasure), nullable=False) + # -- assume everything is in volume so not required + # cost = Column(Float, nullable=False) # this needs to come from the stock + + # Define relationship to RecipeIngredient + recipe_ingredients = relationship( + "RecipeIngredientModel", back_populates="ingredient" + ) + stock_entries = relationship("StockModel", back_populates="ingredient") + + def dict(self): + return { + "id": self.id, + "name": self.name, + "description": self.description, + } + + +class RecipeIngredientModel(Base): + __tablename__ = "recipe_ingredients" + + recipe_id = Column(Integer, ForeignKey("menu.id"), primary_key=True) + ingredient_id = Column(Integer, ForeignKey("ingredients.id"), primary_key=True) + quantity = Column(Float, nullable=False) + unit = Column(SQLAEnum(UnitOfMeasure), nullable=False) + # unit = Column(String, nullable=False) + + __table_args__ = ( + CheckConstraint("quantity >= 0.0", name="check_quantity_non_negative"), + Index( + "idx_recipe_ingredient", "recipe_id", "ingredient_id" + ), # Composite index on recipe_id and ingredient_id + ) + + # Define relationships with back_populates + recipe = relationship("MenuModel", back_populates="ingredients") + ingredient = relationship("IngredientsModel", back_populates="recipe_ingredients") + + def dict(self): + return { + "recipe_id": self.recipe_id, + "ingredient_id": self.ingredient_id, + "quantity": self.quantity, + "unit": self.unit, + } + + +class StockModel(Base): + __tablename__ = "stock" + + id = Column(String, primary_key=True, default=generate_str_uuid) + ingredient_id = Column(Integer, ForeignKey("ingredients.id")) + unit = Column(SQLAEnum(UnitOfMeasure), nullable=False) # this might actually work + # unit = Column(String, nullable=False) + quantity = Column(Float, nullable=False) + cost = Column(Float, nullable=False) + # expiry_date = Column(DateTime, nullable=False) # !TODO ? + delivery_date = Column(DateTime, default=datetime.now(timezone.utc)) + created_on = Column(DateTime, default=datetime.now(timezone.utc)) + + __table_args__ = ( + CheckConstraint("quantity >= 0.0", name="check_quantity_non_negative"), + CheckConstraint("cost >= 0.0", name="check_cost_non_negative"), + Index("idx_stock_ingredient", "ingredient_id"), + Index("idx_stock_delivery_date", "delivery_date"), + ) + + # Define relationship with Ingredient + ingredient = relationship("IngredientsModel", back_populates="stock_entries") + + def dict(self): + return { + "id": self.id, + "ingredient_id": self.ingredient_id, + "unit": self.unit, + "quantity": self.quantity, + "cost": self.cost, + "delivery_date": self.delivery_date, + "created_on": self.created_on, + } diff --git a/weird_salads/utils/database/README.rst b/weird_salads/utils/database/README.rst new file mode 100644 index 0000000..a45f8e9 --- /dev/null +++ b/weird_salads/utils/database/README.rst @@ -0,0 +1,6 @@ +utils.database +-------------- +These should be executed from the root directory... (need to update this) + +* `clear_db.py` to clear all tables (by default this DOES NOT clear `alembic_versions`) +* `seed_db.py` to seed db with a location (and optionally, a quantity) diff --git a/weird_salads/utils/database/__init__.py b/weird_salads/utils/database/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/weird_salads/utils/database/clear_db.py b/weird_salads/utils/database/clear_db.py new file mode 100644 index 0000000..9c978ea --- /dev/null +++ b/weird_salads/utils/database/clear_db.py @@ -0,0 +1,56 @@ +import logging +import sys + +from sqlalchemy import MetaData, text + +from weird_salads.utils.unit_of_work import UnitOfWork + +# Set up logging +logging.basicConfig( + level=logging.DEBUG, + format="%(asctime)s - %(levelname)s - %(message)s", + handlers=[logging.StreamHandler(sys.stdout)], # Send logs to stdout +) + +logger = logging.getLogger(__name__) + +# List tables to exclude +EXCLUDE_TABLES = {"alembic_version"} + +# !TODO currently only runs if invoked from the root dir. + + +def clear_data(): + """Clears all data from all tables in the database.""" + with UnitOfWork() as uow: + session = uow.session + try: + # Reflect the database schema to get table names + # https://docs.sqlalchemy.org/en/20/core/reflection.html#reflecting-all-tables-at-once + metadata_obj = MetaData() + metadata_obj.reflect(bind=session.bind) + + tables_to_clear = [ + str(table.name) + for table in metadata_obj.sorted_tables + if table.name not in EXCLUDE_TABLES + ] + + # Print tables that will be cleared + print("Tables to be cleared:") + for table in tables_to_clear: + print(f" - {table}") + + for table in metadata_obj.sorted_tables: + if table.name not in EXCLUDE_TABLES: + quoted_table_name = f'"{table.name}"' + session.execute(text(f"DELETE FROM {quoted_table_name}")) + + uow.commit() + logging.info("Data cleared successfully.") + except Exception as e: + logging.warning(f"An error occurred while clearing data: {e}") + + +if __name__ == "__main__": + clear_data() diff --git a/weird_salads/utils/database/seed_db.py b/weird_salads/utils/database/seed_db.py new file mode 100644 index 0000000..ce96f02 --- /dev/null +++ b/weird_salads/utils/database/seed_db.py @@ -0,0 +1,245 @@ +""" +This only currently contains ingredients relevant to the recipes. +We should add all ingredients +""" + +import argparse +import logging +import sys +from datetime import datetime, timezone +from pathlib import Path + +import pandas as pd +from sqlalchemy.orm import Session + +from weird_salads.inventory.repository.models import ( + IngredientsModel, + MenuModel, + RecipeIngredientModel, + StockModel, +) +from weird_salads.utils.unit_of_work import UnitOfWork +from weird_salads.utils.utils import generate_str_uuid + +# from typing import List, Dict, Any + +# Set up logging +logging.basicConfig( + level=logging.DEBUG, + format="%(levelname)s - %(message)s", + handlers=[logging.StreamHandler(sys.stdout)], # Send logs to stdout +) + +logger = logging.getLogger(__name__) + + +def is_database_empty(session: Session) -> bool: + """ + Check if the menu table in the database is empty. + + Parameters + ---------- + session : Session + The SQLAlchemy session used to query the database. + + Returns + ------- + bool + True if the menu table is empty, False otherwise. + """ + return not session.query(MenuModel).first() + + +def validate_menu_data(): + # !TODO validate against a pydantic schema + pass + + +def insert_menu_and_related_data( + session: Session, + menus_df: pd.DataFrame, + recipes_df: pd.DataFrame, + ingredients_df: pd.DataFrame, + quant_to_inject: int, +) -> None: + """ + Insert menu items, recipes, and ingredients into the database. + + + Parameters + ---------- + session : Session + The SQLAlchemy session used to query the database. + menus_df : pd.DataFrame + DataFrame for menu items + recipes_df : pd.DataFrame + DataFrame for recipes + ingredients_df : pd.DataFrame + DataFrame for the ingredients table + + Notes + ----- + This is achieved by: + 1. Iterating through `Menu` items + 2. For each Menu item inject `Ingredients` (if they do not exist) + 3. Inject into recipe_id, ingredient_id into `RecipeIngredients` + """ + + # !TODO validate against the schemas before injecting + + # Iterate through menu items + for _, menu_row in menus_df.iterrows(): + recipe_id = menu_row["recipe_id"] + + # Get recipes for the current recipe_id + recipe_rows = recipes_df[recipes_df["recipe_id"] == recipe_id] + + # Check if Menu already exists + existing_menu = session.query(MenuModel).filter_by(id=recipe_id).first() + if not existing_menu: + # Insert Menu + menu = MenuModel( + id=int(recipe_id), + name=recipe_rows["name"].iloc[0], # get first example + description=menu_row.get("description", ""), # Optional field + price=float(menu_row["price"]), + created_on=datetime.now(timezone.utc), + on_menu=True, + ) + try: + session.add(menu) + session.commit() # Commit after adding menu + except Exception as e: + logger.warning(f"Failed to add menu {recipe_id}: {e}") + session.rollback() # Rollback on failure + + # Insert menu_id-associated ingredients + for _, recipe_row in recipe_rows.iterrows(): + ingredient_id = int(recipe_row["ingredient_id"]) + existing_ingredient = ( + session.query(IngredientsModel).filter_by(id=ingredient_id).first() + ) + # try add if ingredient doesn't exist + if not existing_ingredient: + ingredient_data = ingredients_df[ + ingredients_df["ingredient_id"] == ingredient_id + ] + + if len(ingredient_data) != 1: + logger.warning( + f"Ingredient data not found or ambiguous for ID {ingredient_id}" + ) + continue # Skip this ingredient if data is not exactly one row + + ingredient_unit = ingredient_data.iloc[0]["unit"] + ingredient_cost = ingredient_data.iloc[0]["cost"] + + ingredient = IngredientsModel( + id=int(ingredient_id), + name=str(ingredient_data.iloc[0]["name"]), + description="", + ) + + try: + session.add(ingredient) + session.commit() # Commit after adding ingredient + except Exception as e: + logger.warning(f"Failed to add ingredient {ingredient_id}: {e}") + session.rollback() # Rollback on failure + + stock = StockModel( + id=generate_str_uuid(), + ingredient_id=int(ingredient_id), + unit=ingredient_unit, + quantity=quant_to_inject, + cost=ingredient_cost, + delivery_date=datetime.now(timezone.utc), + created_on=datetime.now(timezone.utc), + ) + + try: + session.add(stock) + session.commit() # Commit after adding stock + except Exception as e: + logger.warning( + f"Failed to add stock for ingredient {ingredient_id}: {e}" + ) + session.rollback() # Rollback on failure + + # Finaply insert into RecipeIngredients + recipe_ingredient = RecipeIngredientModel( + recipe_id=recipe_id, + ingredient_id=ingredient_id, + quantity=recipe_row["quantity"], + unit=ingredient_unit, + ) + try: + session.add(recipe_ingredient) + session.commit() # Commit after adding recipe_ingredient + except Exception as e: + logger.warning( + f"Failed to add recipe ingredient for recipe {recipe_id} and ingredient {ingredient_id}: {e}" # noqa: E501 + ) + session.rollback() # Rollback on failure + + +def main(location_id: int, quantity: int, base_path: Path) -> None: + logger.info("Starting data seeding process") + + with UnitOfWork() as uow: + try: + if is_database_empty(uow.session): + # Load all data into DataFrames + # locations_df = pd.read_csv('../data/locations.csv') + menus_df = pd.read_csv(base_path / "menus.csv") + recipes_df = pd.read_csv(base_path / "recipes.csv") + ingredients_df = pd.read_csv(base_path / "ingredients.csv") + + # Filter menus by location_id + if location_id not in menus_df["location_id"].values: + raise ValueError( + f"location_id {location_id} not found in menus data." + ) + + filtered_menus_df = menus_df[ + menus_df["location_id"] == location_id + ].reset_index(drop=True) + + # Insert menus, recipes, and ingredients + insert_menu_and_related_data( + uow.session, filtered_menus_df, recipes_df, ingredients_df, quantity + ) + + logger.info( + f"Seeding completed successfully for location {location_id}." + ) + else: + logger.info("Database already contains data. Skipping seeding.") + except Exception as e: + logger.error(f"An error occurred during seeding: {e}") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Data Seeding Script") + parser.add_argument( + "--location_id", + type=int, + required=True, + help="The ID of the location to seed data for.", + ) + parser.add_argument( + "--quantity", + type=int, + default=0, + help="The quantity of data to seed (in respective units).", + ) + parser.add_argument( + "--base_path", + type=Path, + default=Path("../../../../data"), + help="The base path for data files.", + ) + + args = parser.parse_args() + + main(location_id=args.location_id, quantity=args.quantity, base_path=args.base_path)